Bug in latest release

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

Bug in latest release

Postby AGenius » Sun Nov 27, 2011 8: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
AGenius
 
Posts: 1
Joined: Mon Oct 31, 2011 12:20 pm

Postby james.billings » Mon Nov 28, 2011 9: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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Packager 6

Who is online

Users browsing this forum: No registered users and 0 guests