By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,378 Members | 1,453 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,378 IT Pros & Developers. It's quick & easy.

saving stored procedures in sql server 2005

P: 58
There r some stored procedures in the database I m working with. When I create new stored procedure and save it, it does not appear in the list of existing procedures. Why so? Where should I store it?
Where r stored procedures physically stored?
thks
Mar 21 '08 #1
Share this Question
Share on Google+
4 Replies


ck9663
Expert 2.5K+
P: 2,878
There r some stored procedures in the database I m working with. When I create new stored procedure and save it, it does not appear in the list of existing procedures. Why so? Where should I store it?
Where r stored procedures physically stored?
thks
What version are you using? How did you create the stored proc?

-- CK
Mar 21 '08 #2

P: 58
using sql server 2005.
expnded database, then programmability,right clicked on stored procedure,selected create new. Window with sp structure got open. changed as per requirement and using file menu clicked on save, it asks for name f file.there specified. Now it is storing by default in sql management studio(under my documents). So where should I store? and the main thing is if I create new sp, then now it should be included in the list of existing stored procedures. but it is not storing. can u pls guide?
thks
Mar 22 '08 #3

ck9663
Expert 2.5K+
P: 2,878
When you click Save, you are saving the script and not actually running it. You may still save the script for reference. But saving it does not mean the stored proc has been created. Instead, click Execute.

-- CK
Mar 22 '08 #4

P: 4
to view the user created stored procedures

use below script

exec sp_stored_procedures <stored_procedure_name>

It is recommended to give a specific prefix name before any stored procedure.

if your stored procedure starts with 'sp_', for example: sp_showempinfo,

then, execute like below

exec sp_stored_procedures 'sp%'

that's it my friend.
Mar 22 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.