March 17, 2008 at 8:04 am
HELLO EVERY ONE,
to drop a user from database i followed below steps. but still i see error .
1. changed objects ownership (i did check table schema, routins. This database in SQL2000 Compatability.
select 'sp_changeobjectowner ''[' + table_schema + '].[' + table_name + ']'', ''' + 'DBO' + ''' go' from information_schema.tables where Table_schema = 'NEWOWNER' select 'sp_changeobjectowner ''[' + ROUTINE_schema + '].[' + ROUTINE_name + ']'', ''' + 'DBO' + ''' go' from information_schema.ROUTINESwhere ROUTINE_schema = 'NEWOWNER' /* This method uses the INFORMATION_SCHEMA views */SELECT * FROM INFORMATION_SCHEMA.SCHEMATAWHERE SCHEMA_NAME = 'newowner';GO
EXEC sp_dropalias 'userid'
EXEC sp_helprolemember )
i am checking this many ways but when i try to drop user it thoughs error again
Msg 15183, Level 16, State 1, Procedure sp_MScheck_uid_owns_anything, Line 17
The user owns objects in the database and cannot be dropped.
what piece of information missing here.
March 17, 2008 at 8:42 am
If you see the property of this procedure sp_MScheck_uid_owns_anything, does it shows the owner as old user or new?
Follow this link.
http://support.microsoft.com/kb/275312
SQL DBA.
March 17, 2008 at 11:09 am
Thanks man really it works perfect.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply