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 |
timoqvist
Starting Member
8 Posts |
Posted - 2006-09-21 : 04:39:25
|
Hi, just wondering if there is any way to force compilation of an arbitrary SP without actually running the SP./TQ |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-09-21 : 04:46:01
|
Use sp_recompile 'proc_name'or create procedure with RECOMPILE option.Harsh AthalyeIndia."Nothing is Impossible" |
|
|
timoqvist
Starting Member
8 Posts |
Posted - 2006-09-21 : 05:26:26
|
sp_recompile only tells the server to recompile the next time the SP is executed, that's not what I want, I want it to recompile a bunch of procedures in one go *without* running them./tq |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-09-21 : 07:30:55
|
you have to run the sproc to have it recompile.Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-09-21 : 11:23:12
|
"sp_recompile only tells the server to recompile the next time the SP is executed, that's not what I want, I want it to recompile a bunch of procedures in one go *without* running them"Sounds like, more or less!, the same thing to me - what are you wanting to achieve? (Might be something different we can suggest)Kristen |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-09-21 : 15:12:02
|
Not much point in compiling a procedure if it never gets executed. Best option is sp_recompile as was already mentioned. |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-09-22 : 02:22:59
|
Well, guessing at the underlying question, I have an opinion that it would be quick good to get the query recompiled AND cached in Quiet Time ...Kristen |
|
|
|
|
|