Packager is not creating objects in correct order

drhotendrhoten Posts: 21
Hi,

I just tried to create a package from a database today with over 150+ tables, 400+ procedures and a small number of views and functions.

Running the package executable or running the project from VS results in an invalid object error. (Three specific tables are referenced.) Debugging in VS shows that the specific line that is failing is trying to create a view (with schema binding) that includes references to the three tables in the error message.

I created the VS project with and without compression, but the result is the same - it's trying to create the view before the tables exist.

Any suggestions?

Thanks.

Comments

  • Hello DrHoten,

    Thanks for your post. I do have two suggestions: One is to check that you have the latest SQL Bundle (RedGate.SQLCompare.Engine.dll v3.1.8 and RedGate.SQLDataCompare.Engine.dll v3.38) so that you have the very latest dependency-parsing code.

    Also, make sure that you have IncludeDependencies set in the options. If you do not, you mey be scripting the views without scripting the underlying tables.
  • Yes, I did happen to check for the latest version before I started using the packager. I am using version 3.1.8.276 and 3.3.8.304 respectively.

    The include dependencies option is checked. Over the weekend I recalled this occurring in SQL Compare last year. In the saved scripts I had to manually comment out the creation of this view.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    Would you mind sending a backup of the database in question to support <at > red-gate.com? I have no further ideas except that maybe there is still a dependency bug in the software.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Doug,

    It appears that some of the views in your database are not valid and need to be modified. I've sent an email with the details.
This discussion has been closed.