snippetsqlMinor
Is there anybody using the SQL Server feature to create groups of stored procedures differentiated by number?
Viewed 0 times
storedproceduresthegroupsnumbercreatesqldifferentiatedusingserver
Problem
The question refers to the number parameter in this msdn documentation
If you don't you can create multiple stored procedures in SQL-Server differentiated by number and drop them with a single drop.
I wonder if this feature is used by anybody for something useful or if it is just a historic curiosity.
If you don't you can create multiple stored procedures in SQL-Server differentiated by number and drop them with a single drop.
create procedure dbo.stored_proc1 as select 1
go
create procedure dbo.stored_proc1;2 as select 2
go
exec stored_proc1
-- returns 1
go
exec stored_proc1;2
-- returns 2
go
drop stored_proc1
-- drops both
goI wonder if this feature is used by anybody for something useful or if it is just a historic curiosity.
Solution
Numbered stored procedures are deprecated.
msdn
Numbered procedures are deprecated.
Use of numbered procedures is
discouraged. A
DEPRECATION_ANNOUNCEMENT event is
fired when a query that uses this
catalog view is compiled.
My team encountered this in a maintenance project. We couldn't figure it out at first. Then, we did some research and found out that it is deprecated. We had to rebuild it to normal stored procs.
Numbered stored procedures won't show up in SSMS's Object Explorer tree.
Numbered Stored Procedures
msdn
Numbered procedures are deprecated.
Use of numbered procedures is
discouraged. A
DEPRECATION_ANNOUNCEMENT event is
fired when a query that uses this
catalog view is compiled.
My team encountered this in a maintenance project. We couldn't figure it out at first. Then, we did some research and found out that it is deprecated. We had to rebuild it to normal stored procs.
Numbered stored procedures won't show up in SSMS's Object Explorer tree.
Numbered Stored Procedures
Context
StackExchange Database Administrators Q#390, answer score: 7
Revisions (0)
No revisions yet.