Bug in latest release

AGeniusAGenius Posts: 4
edited November 28, 2011 3:13PM in SQL Packager Previous Versions
I am still evaluating the developer tools and have now found an issue in Packager 6.4

I have created a script I want to deploy to a client , i build the views in a database, i used SQL to create a script file with the 2 views in.

I package it all up and then test against another database name

I choose the database (not create) and it tells me the view already exists

There is already an object named 'vPrimaryEmails' in the database.

I checked and there is not.

I ran SQL Profiler and found the EXE issues 2 USE statements

SQL:BatchCompleted use [GM803] Red Gate Software -RPOViews Darren Darren-PC\Darren 0 0 0 0 7200 68 2011-11-27 19:31:10.760 2011-11-27 19:31:10.760
SQL:BatchCompleted USE [RPO]
Red Gate Software -RPOViews Darren Darren-PC\Darren 0 0 0 0 7200 68 2011-11-27 19:31:10.983 2011-11-27 19:31:10.983

GM803 is the selected database , RPO was the database the script uses...

Obviously the script needs the Use statement removed and it worked..

Problem is if you dont remember you can have a problem. I think packager should remove any USE statements?
Darren Lawrence


  • Hi, thanks for your post.

    Can I just check- did you create your .exe using the "Package a Script" option in the first step?
    If so, this may explain it. All that does is package up your script "as-is", so if your original script had the USE statement in it, then the packaged .exe will have the same. We won't re-write the script to remove that header as far as I know.

    If you packaged it by using the "Package a Database" option, and selecting the two views, you should find it works as expected, as this shouldn't contain the erroneous USE statement.
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.