On SQL Server 2008, how can I place my stored procedures in "Stored Procedures" folder of my DB?
When I declare it this way:
CREATE PROCEDURE mySchema.myProc
It goes to:
MYSERVER\System Databases\Master\Programmability\Stored procedures folder.
How to tell server, to store it in:
MYSERVER\System Databases\MYDB\Programmability\Stored procedures folder.
EDIT:
If I declare it like that:
CREATE PROCEDURE [myDB].mySchema.myProc
It complains about:
'CREATE/ALTER PROCEDURE' does not allow specifying the database name as a prefix to the object name.
If I use the 'USE' keyword, It complains:
a USE database statement is not allowed in a procedure, function or trigger.
Maybe the problem is that I'm using MS Management Studio, and connecting directly to the server, and not to any particular DB?