BUG: 2710 Error When Executing St. Proc. w/ UPDATE STATISTICS (123330)
The information in this article applies to:
- Microsoft SQL Server 4.2x
This article was previously published under Q123330
BUG# NT: 936 (4.21a)
SYMPTOMS
If a user executes a stored procedure with UPDATE STATISTICS <object>
and is not the object owner or the dbo of the database the object is
in, SQL Server returns error 2710:
Msg 2710, Level 16, State 2
You are not the owner specified for the object 'xyz' in this command
(CREATE, ALTER, TRUNCATE, UPDATE STATISTICS, or BULK INSERT). The
database user can use the SETUSER command to assume the identity
of another user.
This error appears regardless of satisfying the following condition
that is specified on page 233 of "Transact-SQL Reference":
Inside a stored procedure, object names used with certain statements
(the so-called utility statements) must be qualified with the object
owners' name if other users are to use the stored procedure. The
utility states are ALTER TABLE, CREATE TABLE, DROP TABLE, TRUNCATE
TABLE, CREATE INDEX, DROP INDEX, UPDATE STATISTICS, and DBCC.
WORKAROUND- Write a stored procedure that accepts the user's userid and
password, authenticates it, and executes a SQL script using
xp_cmdshell. The SQL script logins as dbo and executes the UPDATE
STATISTICS.
- Write a DB-Library (DB-Lib) application and execute it using
xp_cmdshell.
STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 4.21a. We are researching this problem and will post new
information here in the Microsoft Knowledge Base as it becomes available.
Modification Type: | Minor | Last Reviewed: | 3/14/2005 |
---|
Keywords: | kbbug kbprogramming KB123330 |
---|
|