Re: object reference in stoed proc
From: Andrew J. Kelly (sqlmvpnoooospam_at_shadhawk.com)
Date: 04/01/04
- Next message: hir: "event ID 17052 when setting Separate service account(non-admin) for SQLServer/Agent"
- Previous message: Stephen Strong: "Re: most restrictive or least?"
- In reply to: Jim Stallings: "object reference in stoed proc"
- Next in thread: Jim Stallings: "Re: object reference in stored proc"
- Reply: Jim Stallings: "Re: object reference in stored proc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 31 Mar 2004 20:36:27 -0600
If you don't qualify the object sql server will first look for the object
under the owner of the current user (not the role) and if it doesn't find it
as such it will eventually try dbo. There are definite performance
implications by not qualifying the objects with the owner. See here for
more details:
http://support.microsoft.com/default.aspx?scid=kb;en-us;263889&Product=sql2k
-- Andrew J. Kelly SQL MVP "Jim Stallings" <anonymous@discussions.microsoft.com> wrote in message news:BE7D2D54-F315-4D80-912F-02E4E7B0C26E@microsoft.com... > Hello, > We have multiple databases that are accessed by stored procedures in a central database via views. We have replication set up for these databases and an issue came up about security and object owners. It has been suggested that we should fully qualify all table reference within stored procedures to prevent issues with security and object ownership. > > My question is if whether qualifying the stored procedure declaration with the owner name (dbo) defaults the internal object references to dbo? Aren't all object refences dbo by default anyway within a stored procedure? >
- Next message: hir: "event ID 17052 when setting Separate service account(non-admin) for SQLServer/Agent"
- Previous message: Stephen Strong: "Re: most restrictive or least?"
- In reply to: Jim Stallings: "object reference in stoed proc"
- Next in thread: Jim Stallings: "Re: object reference in stored proc"
- Reply: Jim Stallings: "Re: object reference in stored proc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|