Alter Schema

  • 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

  • 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!

  • I got it....

    thank you.....

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply