Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Stored procedure sp_ naming question

Author  Topic 

tribune
Posting Yak Master

105 Posts

Posted - 2006-01-13 : 14:27:27
We have a developer here at work who wrote a mid-sized database (25 tables, 55 stored procedures), and unfortunately all of his stored procedures follow the naming convention "sp_companyname_procedurename".

Since sql server looks in the master database first for any sprocs with the prefix "sp_", do you believe this might incur any large negative performance impacts? Will sql server will check in the master database if these procedures are called from ado.net code where the database connection string is specified and the stored procedure name is specified?

I'm just curious if I should advice him to rename all 55 procedures!

Thank you

--------------------
"dell never told me i'd get free fried nut sandwiches with my laptop"

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2006-01-13 : 14:53:57
You should advise him to change it all, since

1) changing it later is a pain
and
2) not using sp_ is a much better habit to get into

How many .dlls/pages/exe's will he have to comb through?
Go to Top of Page

tribune
Posting Yak Master

105 Posts

Posted - 2006-01-13 : 15:22:28
perhaps 50 or so web pages

--------------------
"dell never told me i'd get free fried nut sandwiches with my laptop"
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-01-13 : 15:29:01
That's what search and replace is for.

And the fact that the procedure names contain a company name makes me seriously question the design of the entire database.
Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2006-01-13 : 16:20:22
50 pages? It will barely interrupt his afternoon nap.
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-01-15 : 11:34:53
And it will be a learning experience too. While you are at it, rub his nose in the code while swatting him with a rolled up newspaper. Works well for training my dog...
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-01-15 : 14:21:57
see this
http://sqlteam.com/forums/topic.asp?TOPIC_ID=50298
Go to Top of Page
   

- Advertisement -