Bug in latest release

Forum for users of SQL Packager database archive utility

Bug in latest release

Postby AGenius » Sun Nov 27, 2011 7:36 pm

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
Posts: 2
Joined: Mon Oct 31, 2011 11:20 am

Postby james.billings » Mon Nov 28, 2011 8:13 pm

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.
Posts: 1122
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Return to SQL Packager Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests