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

How to publish Stored Procedures into a database

Expert 100+
P: 295
Hello folks,

I am not sure if I am using the right terminology so let me explain. I have a database that has multiple stored procedures inside a stored procedure directory in the database. I want to create a new stored procedure and save it inside the same structure. My problem is that every time I create a new stored procedure it saves it as .sql file and it does not show up inside the store procedure directory. How can I save my store procedure so that it shows inside the directory.

I am currently using SQL Server 2005.

Any links and help are always appreciated.
Nov 5 '09 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 295
So this is what I have learned on the web about this issue. Someone please correct me if I am wrong.

To save a stored procedure you must only execute, once executed the procedure is part of the procedure list. If this is inaccurate someone please let me know.
Nov 5 '09 #2

Expert 100+
P: 1,134
I use SQL Server 2000 but....
It sounds like are you writing the stored proc in query analyser and then saving it.

If that is the case then you should be able to do the same as you have done but put

Expand|Select|Wrap|Line Numbers
  1. create proc YourDesiredPocName
  2. as
  3. ....
  4. your code here
  5. ....
and then execute it instead of saving it
So long as query analyser is pointing at the correct database ;)

more usually, you need to goto the "stored procedures directory"
and there will be a way to create a new stored procedure there
Possibly, right click on the "stored procedures directory"

hopefully you can gain some help from that
Nov 5 '09 #3

Expert 100+
P: 295
Thanks I just tried that right before you sent me your information and it worked great!
Nov 5 '09 #4

Post your reply

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