Red Gate forums :: View topic - Get command line to return name of database it installed
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager 6
SQL Packager 6 forum

Get command line to return name of database it installed

Search in SQL Packager 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
jquevedo



Joined: 21 Sep 2012
Posts: 1

PostPosted: Fri Sep 21, 2012 7:15 pm    Post subject: Get command line to return name of database it installed Reply with quote

I have an installer that I'm making that I'm allowing the user to rename the database when they run the packager exe file to create the database. However I later on need to know the name of the database they entered in the packager. Is there anyway to get it to return the name of the database it just installed?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Mon Sep 24, 2012 2:59 pm    Post subject: Reply with quote

I'm not sure what type of installer you are creating, but if it's a Windows Installer, there's probably an unsecured property inside your own MSI that you could re-use containing the database name.

SQL Packager packages do echo back the database name like this:
Quote:
Creating Database: {0}
so if you can parse the output from the package, you could look for the text "Creating database:" and then parse for the next word - that should be the name of the new database you created with the /makedatabase switch.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group