How to get Database Name in Profile from the Package File


Author
Message
Derek Price
Derek Price
StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)
Group: Forum Members
Posts: 51, Visits: 376
I've created a command line version of SampleDataInstaller solution where you pass in the package path, sqlserver, username, and password. This deploys the database just like the DDT. Now I want to be able to pass in a different database name than what's in the package. I know the DatabaseMigrator method DeployMetaData() allows you to pass in a DatabaseTargetName array.



I guess the part I don't understand is how do I know what the database name in the profile is to pass to the DatabaseTargetName constructor? I tried looking into the PackageFile class, but that looks like a ton of work to extract the XML files and look in those, but I figured there must be an easier way.



What am I missing here?



Thanks,

Derek
Derek Price
Derek Price
StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)StrataFrame Novice (89 reputation)
Group: Forum Members
Posts: 51, Visits: 376
I think I just found what I needed:



var databaseNames = DatabaseMigrator.EnumDatabaseNames(PackagePath, FrameworkPassword);

Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah, that should do it.  Let me know if that wasn't what you were looking for.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search