February 24, 2016 at 4:41 pm
Hi, I have sp_master which calls other sp like below, is it true that sp_B will never start unless sp_A will successfully finished ?
Assume that it's default system config, I'm on 2012.
EXEC dbo.sp_A
EXEC dbo.sp_B
EXEC dbo.sp_C
Thanks
Mario
February 24, 2016 at 4:49 pm
Your stored procedures aren't really prefixed with sp_ ? You know that's for system stored procedures, right?
February 24, 2016 at 4:57 pm
Tx,
They are not really mine, but yes - they are named sp_*, which is doesn't matter for my case I thought.
+ they have at the very top like below, so I think they don't go to Master.
Use Alpha
Go
M
February 24, 2016 at 8:00 pm
mario17 (2/24/2016)
Tx,They are not really mine, but yes - they are named sp_*, which is doesn't matter for my case I thought.
+ they have at the very top like below, so I think they don't go to Master.
Use Alpha
Go
M
Because you used the 2 part naming convention (a really good practice, BTW), it probably doesn't matter one bit except that it flies in the face of most best practices. It's a form of Hungarian Notation that's generally frowned on even if sp_ had no special meaning. It can also be a real PITA when you have a table that you need to rename and put a view with the former table name on. Nothing like having a view with the tbl_ prefix to confuse the hell out of people and it happens more than you might thing especially if the original table was poorly designed and needs to be fixed without breaking code.
That, notwithstanding, if that's the mistake a given shop wants to have in their standards, I'll follow their standards but still warn them. And I always use the 2 part naming convention even if 3 or 4 parts are required. Synonyms and pass-through views make that possible. It's so I don't have to change code if they want to point to a different database or server.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 24, 2016 at 10:53 pm
Tx,
and how about my question, can be those ABC called simultaneously ?
February 25, 2016 at 12:37 am
No, they will run sequentially.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply