Link to home
Start Free TrialLog in
Avatar of diegomirner
diegomirnerFlag for Switzerland

asked on

The proposed new database owner is already a user or aliased in the database. (Microsoft SQL Server, Error: 15110)

Dear E,

Im getting error :

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Attach database failed for Server 'IIS\SQLEXPRESS'.  (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------

The proposed new database owner is already a user or aliased in the database. (Microsoft SQL Server, Error: 15110)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=15110&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------



Need help to solve this problem when Im trying to attach an WSS 3.0 database in order to move it to a new server. I have try before with success but I have detach it to do same changes on system and now I can't attach it back.

Thanks in advance
Avatar of tigin44
tigin44
Flag of Türkiye image

can you provide the command that you issue...
Avatar of diegomirner

ASKER

I the command I was using the the attach database on the GUI
what is the default schema of the user that you are using while doing the attach db process
Just create a new webapp on wss 3 to comaparate database configs m and first i find its that on permission tab have this diferents:

test db

Permission: IIS/administrator

------------------
bod db

mydoman/administrator

try to change the owner of the current databases by isueing the command
ALTER AUTHORIZATION ON DATABASE::MyDatabase to sa;
after that try to attach your new db.


in your case probably the user already has access to the database through an
existing alias or user security account within the database. To avoid this, drop the alias or 'user' within the current database first. then make it the owner of the db...
But it would be best practice to make the owner of dbs as sa..
its the admin doman
how you do so ?
by a querry ?
I have try it , i have paste your command on the query windows and nothing
find it , and i got this as result

Msg 15151, Level 16, State 1, Line 1
Cannot find the database 'org', because it does not exist or you do not have permission.

What I prefer to do now its to get the same config on my db that i have in my test db and i can't

in test looks like :

owner :

mydomain/administrator

user:

server/administrator

-----

in my db:

owner

mydoman/administrator

user:

mydoman/administrator

all of this its because I can't attach it normally because the error I mention in the beginning.

Avatar of geek_vj
geek_vj

Firstly, were you able to see the new attached database in the database list?

If not, kindly login using 'sa' credentials and try executing the following query:

EXEC sp_attach_db @dbname = N'<dbname here>',
    @filename1 = N'<.mdf file location here>',
    @filename2 = N'<.ndf file location here>'
Yes database Its attach all ready
ASKER CERTIFIED SOLUTION
Avatar of geek_vj
geek_vj

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes I can  access it.
Will do your suggestion , sorry my delay , was tooooo busy.
thanks again

Not a prob diegomirner...Please revert in case of any clarifications.