Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Alter Schema Expand / Collapse
Author
Message
Posted Tuesday, November 18, 2008 7:18 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, February 10, 2010 12:09 AM
Points: 31, Visits: 93
Hi folks,

i have a SQL Server 2000 database. i need to change the schema for a table. i have table table TB_TEST. i need to change the schema from test.TEST to dbo.TEST.

"ALTER SCHEMA dbo TRANSFER test.TEST", I tried this in SQL Server 2005 it is working fine BUT when i tried to execute this from SQL Server 2000 i am getting "Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'SCHEMA'."

thanks in advance...

- Ramu
Post #604370
Posted Tuesday, November 18, 2008 7:25 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:15 PM
Points: 12,910, Visits: 32,018
2000 doesn't have a Schema, just object owners...for each test.object, you want to use sp_changeObjectOwner instead.

sp_changeObjectOwner 'test.table','dbo'



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #604378
Posted Tuesday, November 18, 2008 8:44 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, February 10, 2010 12:09 AM
Points: 31, Visits: 93
I got it....

thank you.....
Post #604820
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse