Dynamically modifying script

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

Dynamically modifying script

Postby jrl124c » Wed Nov 26, 2008 6:20 pm

Can SQL Packager be set up to get user input and then modify SQL script based on that. Specifically, when we install a db, we want to allow the user to specify the Database name and the replace the default name with the user-specified database name.

How would that be done?
jrl124c
 
Posts: 2
Joined: Wed Nov 26, 2008 6:19 pm

Postby Michelle Taylor » Thu Nov 27, 2008 1:56 pm

When you run a SQL Packager package (without using the /quiet switch), it prompts you for server and database information for the database you want to create or upgrade - this is filled in with the default values given when creating the package, but can be changed by the user.

You can also specify the new database name on the command line with the /database switch.

Is that what you wanted to know, or have I misunderstood your question?
Michelle Taylor
 
Posts: 529
Joined: Mon Oct 30, 2006 12:45 pm
Location: Red Gate Software

Postby jrl124c » Fri Nov 28, 2008 4:00 pm

Yes, that helps. But also can the name the user entered then be used to replace a symbolic variable throught the script?
jrl124c
 
Posts: 2
Joined: Wed Nov 26, 2008 6:19 pm


Return to SQL Packager 6

Who is online

Users browsing this forum: No registered users and 0 guests