Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Tuesday, August 10, 2010 9:29 AM
Hi all,
I am using SQL Server mgmt studio with 2005 db. I accidentally clicked the
owned schema while in a database user in security. When I went back to
remove the check boxes they were greyed out. How do I remove them?
Regards,
anjali
Tuesday, August 10, 2010 9:36 AM ✅Answered | 9 votes
go to the schema > choose the schema which is disabled for the user > properperties > change the schema owner = schema name
I you want T-SQL then use below (change the greyed out schema name)
USE [DatabaseName]
GO
ALTER AUTHORIZATION ON SCHEMA::[db_owner] TO [db_owner]
GO
Balmukund Lakhani | Please mark solved if I've answered your question
This posting is provided "AS IS" with no warranties, and confers no rights.
My Blog: http://blogs.msdn.com/blakhani
Team Blog: http://blogs.msdn.com/sqlserverfaq
Monday, September 3, 2012 6:02 AM
I you want T-SQL then use below (change the greyed out schema name)
USE [DatabaseName] GO ALTER AUTHORIZATION ON SCHEMA::[db_owner] TO [db_owner] GO
Works perfectly! Just what I've been looking for.
Thanks!
Wednesday, February 19, 2014 5:39 AM
To Change DataBase Owner :
_________
Use Database_Name
EXEC sp_changedbowner 'sa'
Thursday, December 4, 2014 9:53 PM
Thanks a bunch!!! Its kind of scary when it looks grayed out in a production box..!
Thursday, November 3, 2016 6:55 AM | 3 votes
HI
GO TO SCHEMA AND CLICK PROPERTIES , THEN CHANGE SCHEMA OWNER TO YOUR USER ID