Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange SQL 2005 Stored Proc Storage

Status
Not open for further replies.

Trusts

Programmer
Feb 23, 2005
268
US
Hi all,

While creating SPs in the new SQL 2005 management studio, I didn't have any choice but to save them as external .sql files. Inside the database, they do not appear, and I have to open them similar to the way you would open .sql files in the old Query Analyzer. But this is not helpful. I need the stored procedures to be in the database so I can call them from my app (vb.net).

Any clue why these are being saved as external files or what I can do to change this?

Thanks,
KB
 
You need to run the code to compile the SP.

Load the SP, then smash the F5 button (to run the code).

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
When creating stored procedures I will right click on the "stored procedures" folder in the database and select "new stored procedure" from the popup menu. After completing the SP, I create the procedure using the "execute" button on the SQL editor toolbar.
 
Hi,
I smashed the F5 key, kinda cracked it. Oh well.

Anyway, I still am no further. I get an error that the SP doesn't like it's own name:

Msg 208, Level 16, State 6, Procedure get_role_for_user, Line 18
Invalid object name 'get_role_for_user'.

I don't get that.
 
When create a stored procedure for the first time, you need "Create Procedure Blah"

When modifying it.... "Alter Procedure Blah"

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
I got to work after all. Sure seems more complicated than 2000. The sp now does show up in the db, but even so if I make a change it also wants to save it as an external .sql file. Invonvenient but as long as the sp stays in the database too I'll live with it.

Thanks all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top