How can we help you today? How can we help you today?

Moving/Renaming a Table to a new Schema not working

I used the File Mapping to rename a table from "misc.Audit" to "audit.General_Audit"

The SQL created was thus:
IF (OBJECT_ID(N'[misc].[Audit]', 'U') IS NOT NULL) AND (OBJECT_ID(N'[audit].[General_Audit]', 'U') IS NULL)
EXEC sp_rename N'[misc].[Audit]', N'General_Audit', N'OBJECT'
GO
IF (OBJECT_ID(N'[misc].[Audit]', 'U') IS NOT NULL) AND (OBJECT_ID(N'[audit].[General_Audit]', 'U') IS NULL)
ALTER SCHEMA [audit] TRANSFER [misc].[General_Audit]

#2 will not execute as misc.Audit has been renamed in #1

After a successful running of the script, I have a table
misc.General_Audit
Steve Burrows
0

Comments

3 comments

  • sburrows
    Have tried 12.2, it does the same
    sburrows
    0
  • Rob C
    I'm sorry you're experiencing this problem. It seems to be a bug in SQL Compare. I've filed a bug report with ID SC-9455 and I'll let you know when I have any updates about a possible bugfix.

    Apologies.
    Rob C
    0
  • Dan B
    Hi sburrows,

    This has been resolved in the latest version of SQL Compare which was released yesterday 12.4.2.4681.

    please let me know if after installing this your issue remains.
    Dan B
    0

Add comment

Please sign in to leave a comment.