BUG: SEM Scripts of User Table Permissions Do Not Have Owner

Last reviewed: March 16, 1998
Article ID: Q182449
The information in this article applies to:
  • Microsoft SQL Server, version 6.5
BUG #: 1344 (starfighter65)

SYMPTOMS

When a user-created table with permissions is scripted in SQL Enterprise Manager, the script does not include the owner name in the GRANT statements which are produced. The resultant script fails to run and you receive the following error message:

   Msg 208, Level 16, State 2
   Invalid object name '<your table name>'.

WORKAROUND

Edit the script to add SETUSER statements before the permissions on the tables are executed. The SETUSER statement allows a database owner to impersonate another user. The SETUSER statement permits the system administrator or a database owner to adopt the identity of another user to allow use of someone else's database object, to grant permissions to that object, or to create an object.

Use the following syntax:

   SETUSER ['username' [WITH NORESET]]

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: SEM
Keywords : kbbug6.50 SSrvEntMan
Version : WinNT:6.5
Platform : winnt
Issue type : kbbug
Solution Type : kbpending


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 16, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.