Skip to main content
19-Tanzanite
April 10, 2015
Solved

Which Rehosting Method?

  • April 10, 2015
  • 26 replies
  • 13829 views

It has been a while since I had to rehost my production machine to a test server, but I recently upgraded to 10.2 and would like my test server to reflect the 10.2 production server so that I have a fresh start. I would like to use the Rehost 2.0 tool to help me since I do not want to go through a manual rehost. I do have Solr turned on, some customization and connect to our corporate LDAP. I have an app server and a database server in production and am moving to the same on two virtual servers. Which method would be better and why?

  • Copy all the files to the new machines, import the database and use Rename
  • Use Rehost with a staging area
  • Use Clone with a staging area
Best answer by TomU

Brian,

I'm also on 10.2 M020 in a virtual environment. I have a .bat file that manually stops the services on the test system, copies the files from production, then runs the rehosting utility. It pauses prior to the rehost step to give me time to export and re-import the database. I do all of this with the production system online and I do not use a second staging area.

The projects.properties file contains just this one line:

clone.prod=InfoEngine,Database,Apache,IEAdapter,WVSAgent

Here are the steps I use:

Production Database Server

  • Backup Windchill database to disk (SQL script)

Test Database Server

  • Copy database backup file from production server
  • Restore Database
  • Fix Windchill user account

USE windchill
GO

sp_change_users_login @Action='Report'
GO

EXEC sp_change_users_login 'Auto_Fix', 'windchill'
GO

  • Delete the entry from RMISTUBS table in the database. See CS150162.

delete from windchill.RMIStubs where RMIStubs.Name ='CacheMaster'

Test Application Server

Scripted Steps

  • Stop Windchill Services
  • Copy Application Data
  • Copy File Vault
  • Replace WVS Agent.ini File (single CAD worker for test environment)
  • Customize GUI for DEV (differnt color background, header message, etc.)
  • Clear Tomcat Cache
  • Delete Windchill Log Files
  • Delete Apache Log Files
  • Delete Directory Server Log Files
  • Start Windchill DS
  • Run Rehost Utility

Manually Steps

  • Stop WindchillDS
  • Clear Tomcat Cache
  • Update Trusted Hosts (for different CAD worker)
  • Start Windchill Services
  • Manually remove the remote file server
  • Clear out the visualization queues
  • Delete extra publisher queues

windchill wt.queue.QueueManager

26 replies

TomU23-Emerald IVAnswer
23-Emerald IV
April 10, 2015

Brian,

I'm also on 10.2 M020 in a virtual environment. I have a .bat file that manually stops the services on the test system, copies the files from production, then runs the rehosting utility. It pauses prior to the rehost step to give me time to export and re-import the database. I do all of this with the production system online and I do not use a second staging area.

The projects.properties file contains just this one line:

clone.prod=InfoEngine,Database,Apache,IEAdapter,WVSAgent

Here are the steps I use:

Production Database Server

  • Backup Windchill database to disk (SQL script)

Test Database Server

  • Copy database backup file from production server
  • Restore Database
  • Fix Windchill user account

USE windchill
GO

sp_change_users_login @Action='Report'
GO

EXEC sp_change_users_login 'Auto_Fix', 'windchill'
GO

  • Delete the entry from RMISTUBS table in the database. See CS150162.

delete from windchill.RMIStubs where RMIStubs.Name ='CacheMaster'

Test Application Server

Scripted Steps

  • Stop Windchill Services
  • Copy Application Data
  • Copy File Vault
  • Replace WVS Agent.ini File (single CAD worker for test environment)
  • Customize GUI for DEV (differnt color background, header message, etc.)
  • Clear Tomcat Cache
  • Delete Windchill Log Files
  • Delete Apache Log Files
  • Delete Directory Server Log Files
  • Start Windchill DS
  • Run Rehost Utility

Manually Steps

  • Stop WindchillDS
  • Clear Tomcat Cache
  • Update Trusted Hosts (for different CAD worker)
  • Start Windchill Services
  • Manually remove the remote file server
  • Clear out the visualization queues
  • Delete extra publisher queues

windchill wt.queue.QueueManager

19-Tanzanite
April 13, 2015

Hello Tom,

Thank you for the information. Gives me a good starting point to work from. On the Replace WVS Agent.ini File, if I do not have CAD worker for my test environment, what do I do? For WindchillDS, do I copy that as well, or do I need to install that first and import the ldif file?

Thank you,

Brian

23-Emerald IV
April 13, 2015

If you don't want the test environment configured for publishing, you can just completely delete the agent.ini file. (This defines the workers.)

As far as Windchill DS, I just copy the entire thing. I don't bother with exporting or importing the ldif. There is nothing about Windchill, WindchillDS, or Apache that requires any type of actual Windows installation. As long as the files are in the right place, they will run.

10-Marble
October 28, 2015

Hi, Tom:

I saw this commands and seems like this is for SQL Server only:

  • Fix Windchill user account

USE windchill
GO

sp_change_users_login @Action='Report'
GO

EXEC sp_change_users_login 'Auto_Fix', 'windchill'
GO

I can't find this info in the Rehosting Utility Guide.

Do you or anyone know if I have to do this in Oracle DB?  (I am not the DBA)

23-Emerald IV
October 28, 2015

Yes, this is for MS SQL Server.  I don't know what the equivalent is for Oracle, or if it's even needed.  Essentially the issue is related to user account permission.  In MS SQL there is access given in the Windchill database to the Windchill user.  When a new database (from another server) is loaded on top of the previous database, the user permissions don't map correctly to the user (some unique user identifier).  These commands remap the user in the newly loaded Windchill database back to the Windchill user defined on that system.  Fundamentally, if you can import the database and still login as the same Windchill user with the same password, you should be all set.  On MS SQL, I can't until I run these commands to reconnect everything.

10-Marble
October 28, 2015

Thanks for the update.  We have a DBA from DB Dept. that does all this DB cloning in Oracle and VMware.  I don't recall every doing something similar to this.  I guess Oracle is OK in the Windchill user mapping...   May be I will ask them tomorrow...

Thanks, again.

10-Marble
October 29, 2015

BTW, I have another question.  We use the clone technique to create the Test system from Production in 10.2.  Before that, we were in 9.1 and 10.1 on the Physical server box.  We use the Rehosting and is taking longer time than cloning.

We would like to build a DEV system that has the same logic, but without production data.  In the past, we would probably just start with a brand new installation for DEV system with brand new DB.

Is there an easy way we can clone it from Production, but creating a brand new DB?

2-Explorer
October 30, 2015

The only option available in the current release is to export and import independent packages (LC, WF and so on) to move just the business configuration without data. It is easy if you have windchill configuration and customization as build. With Windchill 10.2 M030, we have selective promotion of administrative objects from test to production. I think with Windchill 11, we will have most of the administrative object types will be exportable using the Business Administrative Change Framework

Thank You

Binesh Kumar

Barry Wehmiller