Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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 @ 9:09 AM
Points: 14,322, Visits: 37,398
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
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