After each rehosting process there are a series of steps I have to manually complete.
Does anyone know if there is a way to script these into the rehosting process?
For the xconfmanager part, you can just create a windows/unix script containing the xconfmanager commands. Then, you can define that script as a task in your rehost.properties and call it as part of the rehost in project.properties. See the User-defined Script Settings section of the rehost guide.
For the xconfmanager part, you can just create a windows/unix script containing the xconfmanager commands.
Seems like it might be a little trickier than that. A windchill shell is built by running Windchill.exe and then passing it a bunch of arguments.
<WT Home>\Windchill\bin\windchill.exe -w "E:\ptc\Windchill_10.2\Windchill" --java="<WT Home>\Java\jre\bin\java.exe" shell
Once that shell is created I'm not sure how the script with my xconfmanager commands would get passed to this new window. Guess I'll have to see if I can replicate whatever that shell setup command is actually doing manually.
Any ideas on the other three areas???
To run Windchill Shell commands from a Windows batch file, I do the following:
To Setup a Windchill Shell Environment in a Batch File:
cd /d %WT_HOME%
<Now include any Windchill Shell Commands that you want to run by CALL statements>
I have not seen it documented anywhere but seems to work...
To easily get rid of the replication servers I use this sql:
DELETE FROM site WHERE name = '<siteName>';
DELETE FROM fvhost WHERE ida3a5 NOT IN (SELECT ida2a2 FROM site);
DELETE FROM fvmount WHERE ida3b5 NOT IN (SELECT ida2a2 FROM fvhost);
DELETE FROM rootmount WHERE ida3a5 NOT IN (SELECT ida2a2 FROM fvhost);
DELETE FROM replicavault WHERE ida3a5 NOT IN (SELECT ida2a2 FROM site);
DELETE FROM replicafolder WHERE ida3a5 NOT IN (SELECT ida2a2 FROM replicavault);
DELETE FROM replicateditem WHERE ida3a4 NOT IN (SELECT ida2a2 FROM replicafolder);
DELETE FROM fvvault WHERE ida3a5 NOT IN (SELECT ida2a2 FROM site);
DELETE FROM fvfolder WHERE ida3a5 NOT IN (SELECT ida2a2 FROM fvvault);
THIS part is deleting the files which not been revaulted from the Replica server (in case you didn't do the forcefilesynch before the rehost)
delete from applicationdata where ida3a5 in (select ida2a2 from masteredonreplicaitem where ida3a4 in (select ida2a2 from replicafolder where ida3a5 in (select ida2a2 from replicaVault)));
delete from masteredonreplicaitem where ida3a4 in (select ida2a2 from replicafolder where ida3a5 in (select ida2a2 from replicaVault));
Depending on your how large your database it may take a while. VERY IMPORTANT!! To remove Content replication rules and scheduled replication rules before you run this SQL otherwise your rehosted environment no longer starts.
(I've never tested the WVS cleanup part as I never deletes the extra queues)