Tuesday, March 20, 2012

changing table ownership

Did something change with the sp_changeobject owner with SQL2005. The
command does not seem to work. I am looking to change the owner of all the
tbale of a SQL2005 database. Is there a quick way to do it? Thanks.Tom
ALTER SCHEMA targetschema TRANSFER sourceschema.Tblname;
"Tom Reis" <reistom@.cdnet.cod.edu> wrote in message
news:umlac5lnIHA.5472@.TK2MSFTNGP03.phx.gbl...
> Did something change with the sp_changeobject owner with SQL2005. The
> command does not seem to work. I am looking to change the owner of all the
> tbale of a SQL2005 database. Is there a quick way to do it? Thanks.
>|||Did you read the 2005 Books Online regarding this procedure? It should work, but since we now have
user-schema separation it is better to use the more modern what, where you can decide whether it is
the schema (ALTER SCHEMA) or the owner (ALTER AUTHORIZATION) to change.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Tom Reis" <reistom@.cdnet.cod.edu> wrote in message news:umlac5lnIHA.5472@.TK2MSFTNGP03.phx.gbl...
> Did something change with the sp_changeobject owner with SQL2005. The command does not seem to
> work. I am looking to change the owner of all the tbale of a SQL2005 database. Is there a quick
> way to do it? Thanks.
>

No comments:

Post a Comment