Wednesday, February 15, 2012

Error while creating assembly

I am trying to create an assembly on a sql server 2005 machine but it gives me following error:

Msg 33009, Level 16, State 2, Line 2
The database owner SID recorded in the master database differs from the database owner SID recorded in database 'XYZ'. You should correct this situation by resetting the owner of database 'XYZ' using the ALTER AUTHORIZATION statement.

I tried using the alter authorization statement to change the owner.
It did not work.

I am able to create same assembly on another test database but can not create it on this database.

Is this because of orphan logins?

Thanks for the help.

Harshal.Hi

Was this db attached from another instance or upgraded from 2k?

I have had this problem - changing the owner is simple. What do you mean by it didn't work? It should be pretty easy e.g.

USE Mydb
GO

EXEC dbo.sp_changedbowner @.loginame = N'sa', @.map = false
GO|||More info:
http://support.microsoft.com/kb/918040|||Thanks for the reply.
Yes this database was restored from a backup taken from another machine. I fixed the orphaned user and changed the db owner to other user. but still the error persists. though i did not change sa owner.
will try fixin the SA login.


Hi

Was this db attached from another instance or upgraded from 2k?

I have had this problem - changing the owner is simple. What do you mean by it didn't work? It should be pretty easy e.g.

USE Mydb
GO

EXEC dbo.sp_changedbowner @.loginame = N'sa', @.map = false
GO|||Thanks a lot pootle flump.
It worked.

No comments:

Post a Comment