I've been reading some posts that indicate that it is best to invoke a
Stored Procedure with the owner name. Example
exec dbo.MyStoredProc
instead of
exec MyStoredProc
I never really understood why this makes a difference.
I would appreciate it if someone could shed some light on this
Thanks in advanceWell, what about if some user 'user1' have created a procedure which is
owned by 'user1'
If you do "Exec UserProc" you will get an error, you need to use "Exec
user1.UserProc" generally it is advisable to qualify owner name before
database objects.
Things are changed in SQL 2005 where you have to qualify schema name
instead of user name for database objects
chirag shah|||in my database all objects are owned by dbo. I have read that there is a
performance impact by not qualifying the owner of the SP (even in a case
like mine where all objects are owned by dbo)
"c_shah" <shah.chirag@.netzero.net> wrote in message
news:1142951587.510508.143150@.g10g2000cwb.googlegroups.com...
> Well, what about if some user 'user1' have created a procedure which is
> owned by 'user1'
> If you do "Exec UserProc" you will get an error, you need to use "Exec
> user1.UserProc" generally it is advisable to qualify owner name before
> database objects.
> Things are changed in SQL 2005 where you have to qualify schema name
> instead of user name for database objects
> chirag shah
>|||"TJT" <TJT@.nospam.com> wrote in message
news:u0kJDZPTGHA.4864@.TK2MSFTNGP12.phx.gbl...
> in my database all objects are owned by dbo. I have read that there is a
> performance impact by not qualifying the owner of the SP (even in a case
> like mine where all objects are owned by dbo)
>
http://support.microsoft.com/default.aspx?scid=kb;en-us;263889
David|||see
http://www.sqlservercentral.com/columnists/chedgate/worstpracticenotqualifyingobjectswiththeowner.asp
for a discussion of why objects should always be qualified.
"TJT" wrote:
> in my database all objects are owned by dbo. I have read that there is a
> performance impact by not qualifying the owner of the SP (even in a case
> like mine where all objects are owned by dbo)
>
> "c_shah" <shah.chirag@.netzero.net> wrote in message
> news:1142951587.510508.143150@.g10g2000cwb.googlegroups.com...
> > Well, what about if some user 'user1' have created a procedure which is
> > owned by 'user1'
> > If you do "Exec UserProc" you will get an error, you need to use "Exec
> > user1.UserProc" generally it is advisable to qualify owner name before
> > database objects.
> >
> > Things are changed in SQL 2005 where you have to qualify schema name
> > instead of user name for database objects
> >
> > chirag shah
> >
>
>
No comments:
Post a Comment