database owner 'dbo'

wojtekwojtek Posts: 4
edited March 29, 2007 1:33PM in SQL Compare Previous Versions
Hallo,
I synchronized the local database with the production database but the production database does not have any tables.
The local database and the production database have different owners. Nevertheless I get for a new table in the production database a 'dbo' owner: [dbo].[tbl_name].

How can I prepare the property for the synchronization in order to get the correct owner.

Thank you for your help.

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    This is a common issue with SQL Compare migration scripts.

    What happens is that if the table was created with implicit ownership:

    CREATE TABLE MyTable

    it inherits the ownership of the logged-in user, ie dbo. The same things happens when you run the SQL Compare migration script. If the script is creating table names with no owner name, you need to be logged into the SQL Server as that user so the correct ownership is inherited.

    Any user who is a member of the db_owner role will cause the object to be created with dbo ownership as well!
  • Many thanks for your answer,
    what this of course is, has to be seen clearly simply sometimes :oops:
Sign In or Register to comment.