Reinstall Database

Forum for users of SQL Packager database archive utility

Reinstall Database

Postby cbondeson » Tue Apr 15, 2008 6:14 pm

This is an unusual circumstance but would like to hear a suggestion.

Run .net application which installs named instance of SQL Express 2005,
creates database using comand line envokation of SQL Packager 5, sets up users/logins/schemas/permissions...

Uninstall this app without deleting the database.
Try to reinstall->fails because mdb file exists.
Since the mdb is not attached why doesn't SQL Packager just overwrite it?
I understand the solution would be to just test for the file in the app but we use a generic named SQL Packager exe to create different databases.
Posts: 7
Joined: Tue Nov 29, 2005 3:39 pm

Postby Brian Donahue » Fri Apr 18, 2008 2:21 pm

Hi Carl,

SQL Packager simply creates SQL Scripts for the schema and data of a database, so it's not concerned with the state of the server. What is probably happening is that you are specifying the /makedatabase switch on the package which is going to try to create the database again.

To avoid this, you could use SQL Packager's /presql command to run a script file containing 'drop database [x]' before running the package. Hopefully this solves the problem for you.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Return to SQL Packager Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests