Social

torsdag den 16. januar 2014

Renaming configurations/connections

When working with Orchestrator in a production environment you develop your runbooks in a development environment (if not, you should start doing that right now!). More often than not the configurations for various IPs have different names than the ones in the production environment, which means the runbook will fail to run when moved. Anders Asp have provided a solution in which you edit the ois file prior to importing.

But why not just align the configurations names in the first place and be done with it? The obvious answer is: "I have hundreds of activities using the same configurations . It will take me days of work to change them all".

Well you could just change it all with a simple SQL-query. Some IPs uses QIK (ex. the AD IP), in which the configurations only needs to be renamed in a single table. dbo.QIKOBJECT will list all activities using a QIK-configuration. Update this using the query below:

UPDATE [Orchestrator].[dbo].[QIKOBJECT]
SET Configuration = 'New configuration name'
FROM [Orchestrator].[dbo].[QIKOBJECT] WHERE Configuration = 'Old configuration name'

Easy as that - now manually rename the configuration in the Runbook Designer! Remember to backup and test this in a non-production environment. Optimally you will never need to do this in production and just align the configuration names in all other environments with the names in production.

Not all IPs uses QIK (ex. the SCSM2012 IP). Here you will have to update a table for each activity. For SCSM2012 IP the tables are called SCSM2012_*. The approach is the same as the one above with a slight twist. I am no SQL-expert, but there is a type-clash in the WHERE clause, hence you will need to convert the Connection column:

DECLARE @NewConnection NVARCHAR(MAX)
SET @NewConnection = N'connection_new'

DECLARE @OldConnection NVARCHAR(MAX)
SET @OldConnection = N'connection_old'

UPDATE [Orchestrator].[dbo].[SCSM2012_XXX]
SET Connection = @NewConnection
FROM [Orchestrator].[dbo].[SCSM2012_XXX] WHERE CONVERT(NVARCHAR(MAX), Connection) = @OldConnection

Replace XXX with the proper tablename, and whatever the connections are called.

You may have to refresh the runbooks in the Runbook Designer before the changes kicks through. It may be a caching issue. I have had activities abort a few times and then suddenly work by themselves (usually within a few minutes after executing the query). Lesson to learn: Go to lunch after you run the query :D

tags: Orchestrator, OIP, Configuration, Connection, export, import

Ingen kommentarer:

Send en kommentar

Søg i denne blog