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 |
|
vipinspg
Starting Member
12 Posts |
Posted - 2005-05-17 : 05:46:21
|
| Hi AllI'm having an SP where I execute dynamic sql statements. Earlier I was using "execute" to execute the dynamic sql statements and recently changed to sp_execute_sql for executing the dynamic sql statements (only for fetching data). But its a very long SP and after replacing execute with sp_execute_sql, I have experienced one peculiar issue,ie, some other SPs(not related to this sp, but using similar tables) taking too much time to execute. Later I removed sp_execute_sql and again started using execute, and now all the issues resolved.Could you please tell me how this happens ?Thank you very much for your time.ThanksVipins. |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2005-05-17 : 15:59:52
|
| I read somewhere that it is better not to put "sp" in front of the name because when you do it uses the master database. If there is not "sp" then it goes to exactly where it is supposed to. Make sense?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
|
|
|