Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-10-20 : 08:02:28
|
| Balajee writes "I want to Obtain the Query execution plan in a File (Text File will do for Me). Is there any command available in SQL Server to generate the execution plan in a File (I am aware of Query Analyzer and also copying the Plan obtained in to XML etc..- These things will not serve my Purpose.).My Actual requirement is some thing like this:I am working on a Migration application. Migrating the Exisintg application present in Informix to SQL server. In Informix if we set the Explain Plan "ON" informix will generate the plan in a file called sqexplain.out in the server side. Now in the exisintg application end user can set some key strokes and the plan can get saved automatically. Support People will just take that plan and optimize the queries or SP's. Now When we are migrating the existing application to SQL Server we have to replicate the same functionality and hence if there are commands like in Informix we can use them.I have browsed few sites and also studied few things in MSDN but i could not find any answer to this. If you can provide me a Solution it will be a great help to me.Thanks and RegardsBalajee.T.Y.V" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-10-20 : 08:06:54
|
| Best I can think of is to SET SHOWPLAN_TEXT ON, but you'll have to copy and paste it to a file.Please make sure your support people realize that tuning SQL Server queries is different from tuning Informix (or Oracle, or MySQL). Shifting tables and joins around will have little or no impact. Nor should you consider a straight port of the code, especially if the Informix code has a bunch of cursors, WHERE clause joins, etc. Take the time to learn T-SQL and write the queries to use it properly. |
 |
|
|
|
|
|