Error while running migration script, Invalid object in MV2

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

Error while running migration script, Invalid object in MV2

Postby joseph.tg » Mon Mar 17, 2014 2:09 pm

Hi Team,
I am facing and issue in Red Gate Source Control beta

My source control version is Red Gate Source Control 3.9.6.67 (migration V2 beta version)

I have a table called 'CustomMigration' in a database and the database is already source controlled.
I am trying to add a migration script for inserting the data into 'CustomMigration' table

migration script is:
insert into CustomMigration(Id) values(12345)

Added this migration script and executed using F5 button and clicked on save and close button.
Clicked on commit changes tab, getting below error

Error while running migration script:
Invalid object name 'CustomMigration'.

Thanks,
Joseph
joseph.tg
 
Posts: 11
Joined: Thu May 30, 2013 7:53 am

Postby andy.campbell.smith » Thu May 15, 2014 3:34 pm

Hi Joseph,

I noticed you never got an answer here, sorry! It looks like that ought to work - have you tried using the multi part identifier for the table name instead, like [dbo].[CustomMigration]? I've tested this a couple of different ways (with/without multi part identifiers and guard clauses) here and they all seemed to work, but it's worth a try.
Andy Campbell Smith

Red Gate Technical Support Engineer
andy.campbell.smith
 
Posts: 173
Joined: Thu Oct 20, 2011 11:19 am
Location: Red Gate Software


Return to SQL Source Control 3

Who is online

Users browsing this forum: Wakwau and 1 guest