Wednesday, March 28, 2012

Production Ready Procedures

Hello, I have a couple of "simple" questions.
I have been told, that with rare exception, all my "production procedures
and tables" should all be owned by "dbo". Does this represent reality.
What are some "common" examples of of where there is a need for different
naming conventions.
When Executing a procedure, should it always be qualified with the Database
name.owner? Are there different rules for client applications? I believe
as part of the connection string for a C# or VB application, it requires
the "Catalog", which equates to the database name. So is there any reason
to specify the DataBase name in these situations?
Thanks in advance for your assistance!!!!!!!Whether it's owned by dbo or some other user depends on your requirements.
Unless you have a specific reason to have the objects owned by individual
users keeping them owned by dbo makes life much simpler and cleaner. You
should always preference a call to an object (sp, table etc) by the
owner.object regardless of who the owner happens to be. Never use the
db.owner.object syntax unless you are calling an object in another db. Doing
these helps the compiler to work most efficiently and reduces the work sql
server must do to properly determine which object you are calling.
--
Andrew J. Kelly
SQL Server MVP
"Jim Heavey" <JimHeavey@.nospam.com> wrote in message
news:Xns945A6552D56CAJimHeaveyhotmailcom@.207.46.248.16...
> Hello, I have a couple of "simple" questions.
> I have been told, that with rare exception, all my "production procedures
> and tables" should all be owned by "dbo". Does this represent reality.
> What are some "common" examples of of where there is a need for different
> naming conventions.
> When Executing a procedure, should it always be qualified with the
Database
> name.owner? Are there different rules for client applications? I believe
> as part of the connection string for a C# or VB application, it requires
> the "Catalog", which equates to the database name. So is there any reason
> to specify the DataBase name in these situations?
> Thanks in advance for your assistance!!!!!!!sql

No comments:

Post a Comment