Deployment Options for DatabaseMigrator class?


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
When using the DDT to deploy a package there are 3 Deployment Options available:

1- Standard Deployment

2- Deploy Stored Procedures, Views and UDFs Only.

3- Deploy Data Only



When using the DatabaseMigrator class, is there a way to provide a Deployment Option?



I have a customer with several million records and sometimes only a View or Stored Procedure changed, but the deployment will take over 30 minutes when using the DatabaseMigrator and I would like to programatically setup my update process to only update what have changed.



Thanks!

Edhy Rijo

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Edhy.

Have a look at the DatabaseMigrator.DeployMetaData overload:

public void DeployMetaData(
string MetaDataPkgPathAndFileName,
string PkgPassword,
DatabaseTargetName[] DatabaseTargetNames,
bool sprocsViewsUdfsOnly)
 
Parameters
MetaDataPkgPathAndFileName (String)
The path and filename of the package file containing the metadata
PkgPassword (String)
The password for the package file
DatabaseTargetNames (array< DatabaseTargetName >[]()[])
A collection of target database names. This allows the database name to change dynamically from what is within the package file at run-time.
sprocsViewsUdfsOnly (Boolean)

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thank you Ivan.



I didn't notice the overload, I was using this code only:

_DatabaseSetup.DeployMetaData(_DDTPackagePathAndName, _DDTPackagePassword)



Now for the DatabaseTargetNames, I have to create a string array with the names of the database I want to create? usually will be just one name.

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Ivan,



If you don't mind can you post a VB sample code on how to create the collection for the DatabaseTargetName?



_DatabaseSetup.DeployMetaData(_DDTPackagePathAndName, _DDTPackagePassword, DatabaseTargetName, True)



Edhy Rijo

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thanks Ivan.

Edhy Rijo

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
You're welcome, my friend. Cool
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Ivan,



This post by Randy Jean http://forum.strataframe.net/FindPost20066.aspx really helps.



Since what I am trying to do is build an self automated update process so when I release an update to the customer, based on some parameters this will update the database and deploy needed data without user intervention.



In this case, this database could have several million records and hence the need for me to control how the DatabaseMigrator class should apply the update, but I am having some problems figuring out how to let the DatabaseMigrator do their job automatically, probably using an encrypted XML file in the same folder as the DDT package file.



Anyway, thanks again for the prompt assistance and comments.

Edhy Rijo

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Yep, you really could send a parameters file and work with it depending on your situations.

Glad the links helped. Wink

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