Command Line Script Error

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

Command Line Script Error

Postby creejohson » Sun Mar 01, 2009 6:56 pm

Hi --

I'm trying to execute a package from the command line and want to upgrade an existing db. The arguments I'm using are below:

/server:myserver /database:mydb /username:myuser /password:mypassword /quiet

This fails with error: CREATE DATABASE permission denied in database master

I read in the forum that giving the calling user those permissions will allow the script to be run successfully. I don't have that luxury unfortunately. Is there another way to execute an upgrade using this tool?

Thanks
Chris
creejohson
 
Posts: 2
Joined: Sun Mar 01, 2009 6:46 pm

Postby Matthew Flatt » Wed Mar 04, 2009 10:03 pm

Hi Chris,

What permissions does the user that will want to run the upgrade package have?

The CREATE DATABASE permission should only be needed for a new database package and not an upgrade package.

Thanks,
Matthew Flatt
Test Engineer, HyperBac
Matthew Flatt
 
Posts: 253
Joined: Tue Jan 15, 2008 4:45 pm

Postby nnodari » Tue Mar 31, 2009 9:04 pm

Matthew Flatt,

When we choose a "Package a Script" project the command line execution always try to "create a database".

i have the same problem...

There should be an argument as /upgrade, instead of /makedatabase
Att
nnodari
 
Posts: 19
Joined: Mon Mar 30, 2009 9:04 pm

Postby creejohson » Thu Apr 02, 2009 3:31 pm

The user has database owner privileges, but they don't have any other server-wide privileges. They can run the package fine from the GUI but not from the command line...same issue as nnodari. If there was a /makedatabase:false switch or the switch nnodari suggested perhaps that would solve the problem.
creejohson
 
Posts: 2
Joined: Sun Mar 01, 2009 6:46 pm

Postby Brian Donahue » Thu Apr 02, 2009 3:52 pm

Hi Chris,

There is a bug in SQL Packager that is causing a database to be created whenever an existing script is packaged. The workaround for this is described in our knowledge base.

Sorry for the inconvenience.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Packager 6

Who is online

Users browsing this forum: No registered users and 0 guests