how to change new schema name from existing schema - Table

  • Hi,

    I want change schema name on Table.


    to change


    I tried as below

    ALTER SCHEMA HWData TRANSFER dbo.DesktopSoft_Master;


    Msg 15530, Level 16, State 1, Line 1

    The object with name "DesktopSoft_Master" already exists.

    Can you give me script for change new schema Object.


  • that error says the table already exists in the hwdata schema.

    do a quick

    select * from hwdata.DesktopSoft_Master

    select * from dbo.DesktopSoft_Master

    decide which one to keep (say dbo was the "good one"

    then drop table hwdata.DesktopSoft_Master

    and try to transfer again.


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

  • This was removed by the editor as SPAM

  • There are no such object in the destination schema, must be something else.

    • This reply was modified 1 year, 2 months ago by  clin27.
  • ALTER SCHEMA [dbo] TRANSFER HWData.DesktopSoft_Master;

    SQL DBA,SQL Server MVP(07, 08, 09) Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."

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

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