Life Cycle management occasionally causes SQL servers to be replaced and databases to be moved to new servers. As a result, the Ivanti WorkSpace Control datastores have to be moved. Now this does not seem very complex at first, but if the environment uses a primary and secondary datastore, you have to deal with some extra challenges. The IWC datastore contains three components
- Configuration and state
- Usage Tracking
Out of the box the data is stored in the primary datastore, but the logging and usage tracking data can also be stored in the secondary datastore. This ensures that the configuration datastore does not explode.
Ivanti has a nice support article in which they exactly describe how you can move both datastores to a new database server (SQL in my case). Basically, you merge the secondary and primary datastore again, migrate the primary datastore to the new database server and split the logging and usage tracking from the primary to the secondary datastore.
This all sounds very simple, but what if your secondary datastore is 600GB in size? Putting these together will take forever, not to mention other challenges. Consider, for example, the sizing of the primary datastore, can it store so much extra data? In this case you actually want to migrate the primary and secondary datastore to the new SQL environment and simply change the database connection string within the Ivanti WorkSpace Control console. Although there is no support article how this can be accomplished, luckily there is a way to do this in a supported way!
Copy both IWC datastores
Move/copy the primary and secondary datastore from the old to the new database server. We do not migrate the datastore using the migrate option within the IWC console itself, but directly on the SQL server. We then adjust the primary datastore connection within the IWC console. To do this, go to Setup > Datastore, select the … next to the primary datastore and the “Primary datastore properties” windows will open. Click on “Connect” and edit the servername in the “Database server” field. Select “Next”, check that the new connection settings are correct and click on finish. Ok, now we have moved the primary datastore, but the secondary datastore is still pointing to the old database server!
Disconnect the secondary datastore
Unfortunately, the secondary datastore doesn’t have the ability to modify the database connection, so we’ll have to do something else for this. The primary datastore contains a record that refers to the secondary datastore. If we remove this record from the primary datastore, the logging and usage tracking data will temporary be written to the primary datastore. Ivanti has a support article that describes how you can do this
Connecting the migrated secondary datastore
Now we have a primary datastore again in which all data is written, but we still miss the old logging and usage tracking data that is located in the migrated secondary datastore. Again we select … next to the secondary datastore and then select next.
In the opened “Split/Join Datastore Wizard” window we change the logging and usage tracking from Primary to Secondary and select next.
Then choose to use an existing secondary location
Specify the secondary datastore connection settings:
The wizard will show an overview of all upcoming changes, select next
Select ok when all actions are completed and select next
Make sure you select “Yes, go ahead and finalize the split/join procedure” and select Finalize
Select Yes to start the join procedure!
And voila, both the primary and secondary datastores have been moved to the new database server