"Invalid Object Name" When Executing Script

Packages and compresses schema and contents of SQL Server databases

Moderators: JonathanWatts, Chris Auckland, David Atkinson, david connell, Anu Deshpande, Michelle Taylor, james.billings, Marianne

"Invalid Object Name" When Executing Script

Postby cklaw » Tue Nov 03, 2009 1:57 pm

I have a database that has been scripted using SQL Packager 6. When I execute the script against an empty database I get what appear to be erroneous errors reported. In particular, it reports Invalid Object Name citing an object which has been created earlier in the script. I have searched for the object name in the script and can see the CREATE prior to where it is reported as invalid.

So, it appears to have worked out the correct creation order, but for some reason it doesn't recognise that the object has been created.

Has anyone seen this, and/or can suggest the cause and a solution?

I'm using SQL Server 2005 SP3.

TIA

Charles
cklaw
 
Posts: 12
Joined: Tue Sep 22, 2009 1:14 am

Postby Brian Donahue » Wed Nov 04, 2009 3:18 pm

Hi Charles,

I have seen this error before. It's pretty rare, but sometimes SQL Server seems to "forget" about uncommited transactions and I don't know why. In all cases, it works to disable transactions using the "Do not use transactions in synchronization scripts" option. This is not ideal if you want to roll back, but in the case of a new database package it's probably not that important anyway.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

"Invalid Object Name" When Executing Script

Postby cklaw » Wed Nov 04, 2009 5:53 pm

Thanks Brian. I will give that a try.

Charles
cklaw
 
Posts: 12
Joined: Tue Sep 22, 2009 1:14 am


Return to SQL Packager 6

Who is online

Users browsing this forum: No registered users and 0 guests