Re: Change schema owner



I'm sorry, I found the schemas under the security in the SQL server management studio and there it was simple to change

It is also simple to change the schema owner using Transact-SQL with ALTER AUTHORIZATION. For example

ALTER AUTHORIZATION ON SCHEMA::SomeSchema TO dbo;

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/

"jonte@xxxxxxx" <jonasberthelsson@xxxxxxxxxxx> wrote in message news:ucUMXwtmIHA.1280@xxxxxxxxxxxxxxxxxxxxxxx
I'm sorry, I found the schemas under the security in the SQL server management studio and there it was simple to change

\\Jonas B

"jonte@xxxxxxx" <jonasberthelsson@xxxxxxxxxxx> skrev i meddelandet news:%23zsN4ltmIHA.3400@xxxxxxxxxxxxxxxxxxxxxxx
I have a database with a user who owns schemas, so I can't drop the user and I am not allowed to drop the associated login because it's used in another database.
First I want to list all schemas for that user which he own but I havn't found how because when you are to change schema owner you must name the schema !?
I have changed DBO to another user.

I have read a little about it but I'm still confused.

Could you help me out ?

Sincerely

\\Jonas B




.



Relevant Pages

  • Re: sql server
    ... managment studio is connected to a sql server 2000 standard edition database. ... the default schema name for me on sql server 2005 management studio ... Assuming your database is using objects only in the dbo schema here is what ...
    (microsoft.public.sqlserver.setup)
  • Please help with deleting a user.
    ... I created a in sql server 2005. ... ALTER AUTHORIZATION ON SCHEMA::dbo TO guest; ... it says that it can not alter "dbo" schema. ...
    (microsoft.public.sqlserver.security)
  • Permision and Users Question
    ... I have a SQL Serevr 2000 DB and using MS SQL 2005 Management Studio to ... I need to configure MS SQL 2005 Management Studio to on defualt use the dbo ... Windows Login details. ...
    (microsoft.public.sqlserver.setup)