error while trying to move objects from dbo to new schema

  • incorrect syntax near 'newschema' .expecting a doublecolon.

    Does the error message read out "expecting a doublecolon"? Why not put a GO keyword after each statement?

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • It seems the issue is specific to SQL server 2008..I tried it on SQL server 2005 and it worked just fine:

    CREATE SCHEMA DBA

    ALTER SCHEMA DBA TRANSFER dbo.myTable

    ALTER SCHEMA DBA TRANSFER dbo.Table1

    --------------------------------------------

    Command(s) completed successfully.

  • I just ran this:

    ALTER SCHEMA sk TRANSFER dbo.Names

    That ran without issue on a SQL 2008 system running build 2734 (SP1 CU6 I believe).

    What is the owner of your schema? dbo was the owner of my sk schema.

    Steve

  • its working now guyz..thank you very much for all ur time and answers..

Viewing 4 posts - 1 through 5 (of 5 total)

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