Make a login into dbo for a database in SQL Server -
i attempting migrate sql server 2005 sql server 2008. both of these database instances hosted on 3rd party shared servers not have full permissions to. using mixed mode authentication.
i running trouble setting new database same way old 1 set up. specifically, new web-based control panel doesn't allow dbo specified when creating new database , when using red gate sql compare sync schemas having problems because objects (that don't explicitly specify dbo in script) being created prefix of user account rather dbo.
i have poured on documentation trying find way force login "user1" dbo "db1" database. came conclusion script should this:
alter authorization on database::db1 user1 before running script, login "user1" exists, not user database "db1". note had submit script support of hosting company in order run it. according hosting company statement executes, when compare databases using sql compare user "user1" has not been physically added database under sql server 2005. when trying add using script:
create user [user1] login [user1] default_schema=[dbo] i error message:
"the login has account under different username" i have tried dropping of other users database, error message still persists - find odd.
while fix scripts explicitly specifying dbo, inevitably time bomb waiting go off because if new script introduced didn't explicitly specify dbo there failure during synchronization. since of scripts 3rd parties, not solution.
so questions: there statement need run in order add "user1" database user dbo? there has changed in implementation between sql server 2005 , sql server 2008 r2 cause these inconsistencies?
i unfortunately not able test find answer second 1 because don't have sql server 2008 database test , don't have full access want on one.
the old database created through control panel forced dbo specified , new 1 doesn't allow dbo specified when creating database.
from have gathered following should suffice.
alter user [user1] default_schema=[dbo] the create wasnt working existed.
Comments
Post a Comment