proper Save location for SQL stored procedures

Please support our MS SQL advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Nov 2008
Posts: 80
Reputation: BobLewiston is an unknown quantity at this point 
Solved Threads: 0
BobLewiston BobLewiston is offline Offline
Junior Poster in Training

proper Save location for SQL stored procedures

 
0
  #1
Apr 2nd, 2009
I saved a few stored procedures in SQL Server Management Studio. The default Save location, which I accepted, was C:\Documents and Settings\BobLewiston\My Documents\SQL Server Management Studio\Projects. (And yes, each stored procedure was in the form of an .sql file, and I assigned each file name root to be the same as the contained procedure's name.) But this Projects folder must be the wrong place, because my apps aren't finding these stored procedures.

I see a lot of .sql files in various places on my hard drive, but I can't find any by the names of the stored procedures listed in Management Studio's Stored Procedures folder (none of which I wrote). For that matter, I'm not even finding the Stored Procedures folder on my hard drive.

Where are stored procedures SUPPOSED to be saved?
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: proper Save location for SQL stored procedures

 
0
  #2
Apr 3rd, 2009
Stored procedures need to be created using the CREATE PROCEDURE statement and then executed (F5 or the green play button in the toolbar). They are compiled and stored in the database itself. If you choose save in the Mangement Studio file menu this is just a convenient way to save your TSQL as a text file for use elsewhere, or to send to someone else, or to re-create it as part of a deployment script if you want to set up the same database on another Sql Server instance.
Last edited by hollystyles; Apr 3rd, 2009 at 9:26 am.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 80
Reputation: BobLewiston is an unknown quantity at this point 
Solved Threads: 0
BobLewiston BobLewiston is offline Offline
Junior Poster in Training

Re: proper Save location for SQL stored procedures

 
0
  #3
Apr 3rd, 2009
Thanks, problem solved. It turns out that although I had been told to save stored procedures via Ctrl-F5, it's actually F5. Again, thanks.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the MS SQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC