Forcing owner (dbo)

sevdersevder Posts: 3
edited October 24, 2006 12:06PM in SQL Compare Previous Versions

Whenever I try to sync my development to hosted SQL, I see that I always have differences. Because dbo is not forced as owner.

E.g. script:
PRINT N'Creating [dbo].[sp_SevDerTabsGet]'

AS you see it prints with [dbo] but not executing with [dbo].

How can I force this?
Right now I need to open the script add them 1 by one.


  • Brian DonahueBrian Donahue Posts: 6,590 New member

    This is caused by information that is inconsistent between the actual object definition, and the owner name as it appears in the database's system tables. This happens normally as the result of implicit ownership because the owner name was not specified when the object was created.

    In SQL 2000, the only way to fix this is to edit the stored procedure (alter or drop and recreate it), as you've found out.
  • Hi,

    What about SQL 2005? I am using 2005.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    I don't know of a way to do this in SQL 2005, either. Unless someone else does?
Sign In or Register to comment.