Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tc Cloning an Environment

Similar presentations


Presentation on theme: "Tc Cloning an Environment"— Presentation transcript:

1 Tc Cloning an Environment

2 1. Get an export or copy of the existing PROD dbase:
Oracle system: Export (dump) the oracle database from the parent – existing – environment on dbserver_prod In a CMD shell with ORACLE_HOME and ORACLE_SID defined: Cd ... to a suitable directory. I recommend a new and empty directory. exp userid=infodba/password owner=infodba file=prod_data.dmp IMPORTANT: Make sure you know what the dbase user's infodba password used this dbase. Place this file somewhere convenient so that it can be accessed from your new (test) dbserver. MSSQL system: Use the proper MSSQL utility (?) Make a 'Backup 'of the entire dbase on dbserver_prod. </p> 'IMPORTANT: Make sure you know what the dbase user's infodba password used this dbase. 2. Install a new (OOTB) Teamcenter installation on the new severs (testserver and dbserver_test). This should be a brand new install of Teamcenter. Make sure it is the exact same version as the Teamcenter version on prodserver. Create a brand new dbase (SID) for this new install called TEST. Use the same infodba password as was used on the exported system (PROD). Although this is not 100% necessary, it will simplify your process later. Make sure this environment is fully functional before proceeding (dbase access, FMS / volume access). It is in this new environment that you will import (connect to) the copied DB and Volume(s).

3 3. Import this DB into the new environment:
Oracle system: In a CMD shell with ORACLE_HOME and new ORACLE_SID defined: Cd ... to the directory where the dump file exist. Imp userid=infodba/infodba file=/tmp/prod_data.dmp fromuser=infodba touser=infodba commit=Y Copy parent TC_DATA and all sub folder and files to the new TC_DATA location . Edit tc_profilevars.bat: (new SID=TEST) Find and change TC_DB_CONNECT to point to the TEST Dbase. Change it as follows: Set Find and change ORACLE_SID to point to the TEST Dbase. Change as follows: Set ORACLE_SID=TEST Save and exit Note: If the infodba password was the same in PROD as it was when you created the new and empty TEST dbases, then the encrypted password on the TC_DB_CONNECT line is OK. However, if the passwords are not the same, then you will need to generate a new encryption for the correct password. That process is not covered in this document. Edit %TC_DATA%\tnsnames.ora: Check this short file over carefully and correct entries to reflect the new server and Dbase SID. The format of this file has changed over different Tc versions, so use the information below as reference only: Change the header of the paragraph from PROD.world = to TEST.world (or simply PROD = to TEST =) Change HOST to new server name. Verify the PORT value. Change (SERVICE_NAME = (SID = TEST) ) Change (GLOBAL_NAME = TEST)

4 Note: The format of the tnsnames
Note: The format of the tnsnames.ora file changes with different versions, but the general rule of correcting hostnames and SID apply all the time.M MSSQL system: It is easier to swap dbases with a MSSQL system. Using the MSSQL admin utilities: Import the Backup created earlier onto this new dbases server (dbserver_test). This will create a PROD dbase on this server. Rename the newly created TEST dbase to TEST_NEW. Rename the imported PROD dbase to TEST. Edit tc_profilevars.bat: (new SID=TEST) Find and change TC_DB_CONNECT to point to the TEST Dbase. Change it as follows: Set Find and change ORACLE_SID to point to the TEST Dbase. Change as follows Set ORACLE_SID=TEST Save and exit Note: If the infodba password was the same in PROD as it was when you created the new and empty TEST dbases, then the encrypted password on the TC_DB_CONNECT line is OK. However, if the passwords are not the same, then you will need to generate a new encryption for the correct password. That process is not covered in this document.

5 4. Now rename the file pom_schema_prodserver_PROD to pom_schema_testserver_TEST.
5. Copy parent Volume directory and sub directories to the new location for the new dbase. Please not: You will need to modify FMSMaster file and the Tc Organization:Volume settings for this new location to be accepted. (See step 10). You also need to correct entries in the dbase itself. See below. 6. Change the NODE name for the new dbase with SQLPLUS –Oracle- or with the suitable admin utility – MSSQL- : From a CMD shell with the Oracle environment defined: See what definition already exist: select pnode_name from PIMANVOLUME;  will list all volumes node name select pvolume_name from PIMANVOLUME;  will list all volumes name select pnode_name from IMANVOLUME where pvolume_name='volume_name';  will list the pnode_name, i.e., server name assigned to that volume. Make changes: update PIMANVOLUME set pnode_name='new_server';  will update all volumes node name to new_server update PIMANVOLUME set pnode_name='new_server' where pnode_name='old_server';  update all volumes node name to new_server if the volume refer to the old_'server update PIMANVOLUME set pnode_name='new_server' where pvolume_name='vol_name';  will update only volume vol_name node name to new_server update PIMANVOLUME set pwnt_path_name='new_path' where pvolume_name='vol_name';  will update path nt_path_name of volume vol_name commit; exit

6 7. Stop and restart Oracle / MSQL, FMS, TCFS services. 7
7. Stop and restart Oracle / MSQL, FMS, TCFS services. 7.Regen Schema and POM transmit files install –regen_schema_file infodba infodba dba' install –gen_xmit_file infodba infodba dba 8. Change the Teamcenter preferences in the new environment: Start Navigator, log in and: Edit  Options  Index or search: FMS_Bootstrap_Urls Default_Transient_Server Default_Transient_Volume_Id Transient_Volume_Installation_Location Transient_Volume_RootDir We should also check the following even though they are not critical. WEB_default_site_server WEB_help_server This should be fine, just have a look Note: See section FMSMaster, Backup.xml and Tc Preferences example for mapping information with Tc Preferences.

7 9. Correcting Volume location and general Site and FMS configuration.
Now use backup_xmlinfo utility to get feedback on what is recorded in the dbase with respect to Site ID, Volumes, transient volumes and general FMS environment. This will allow you to: A. Capture the Site ID (enterprise ID), Volume ID and Transient Volume IDs. The values collected by Backup_xml_info MUST be employed in the FSCMaster file. Backup_xmlinfo –u=infodba -p=infodba Correct the IDs in the FMSmaster file located in %TC_ROOT%\fsc. But volume locations specific to the TEST environment can be employed. B. Correct for the new Volume Location: New locations can be defined You will need their ID to be able to make the changes. Open RAC as dba. Consider login in as infodba. Get the volumeID value from the backup.xml file. Enter this value in the volume's ID field, Correct the Windows Path Name and hit the Modify button. DNS path definition is better – recommended over mapped drives! You will be prompted if you want to Copy Volume data. Since you already copied everything to the location you want, enter No and proceed. Now correct the FMSMasterxxx.xml file's volume path as well. Please Note: you need to "escape" a paths "\" character by using a backslash char before it. Example: if the path you need to enter is \\server\Volumes\dba_vol, you will enter it in FMSMASTER as: \\\server\\Volumes\\dba_vol. Close Teamcenter RAC, stop and restart the Teamcenter services (FSC and tcfs). Start RAC and test volume access. When all is well … proceed. C. Run Backup_xmkinfo again. The results should now reflect the new volume locations. Backup_xmlinfo infodba infodb Verify that the results are coherent. If Yes, consider saving a copy of these results as reference. Note: See section FMSMaster, Backup.xml and Tc Preferences example for mapping information with Tc Preferences Test Teamcenter. That is it.

8 FMSMaster, Backup.xml and Tc Preferences example 
List of Teamcenter Preferences of concern FMS_Bootstrap_Urls    Default_Transient_Server    Transient_Volume_Server    Transient_Volume_Installation_Location    Transient_Volume_Root-Dir  We should also check the following even though they are not critical. WEB_default_site_server    WEB_help_server Sample Backup.xml file (result of backup_xmlinfo command)

9

10 Sample FMSMasterrxxx. xml file from same environment as backup
Sample FMSMasterrxxx.xml file from same environment as backup.xml file info above. 

11 CHANGE THE HOSTNAME OF AN INSTALLATION 
From Jerome Laurent Here what I wrote as I changed it on my virtual pc:  - license from Teamcenter - tnsnames.ora in tc_data and oracle - listener configuration listener.ora - ugs_license_server in tc_profilevars - oracle_server in tc_profilevars - fsc address in fms master - fscparent addres in all fcc.xml from the clients - delete .ior from all clients - rename pom_schema_file in pom_schema_%HOSTNAME%_%ORACLE_SID% - preferences in tc     default_transient_server     fms_bootstrap_urls     transient_volume_root_dir - change host in the volume information in organisation from tc use UNC path and change node name That's all ! From Muehr Norbert I would add the  SYSTEM_DRIVE :\WINDOWS\system32\drivers\etc\hosts file for the Microsoft Loopback Adapter

12 CLONE A VMWARE IMAGE WITH A WORKING TEAMCENTER ENVIRONMENT 
The aim here is to clone an entire VMWare image that contains a working Teamcenter environment including the WebTier elements. But we want the new environment to have a unique Site ID. A new dbase will be created with Oracle to be used on the new Image. An Oracle Dump from the original image will be imported into the new image. Original Servers: tcserver & webserver Original Dbase: PROD on tcserver New Servers:'''tcserver-dev & webserver-dev Alternatively: we could be cloning the VMware to a new server but maintaining the existing Oracle and Teamcenter installation as is, i.e., using the same SID in the cloned environment. The procedure below has not been exhaustively tested, but the basic process has been shown to be correct and results in a working cloned environment. Steps 1 thru 3 are examples of actions performed on the original or source environment to create it. Therefore, Steps 1 and 2 are typically not needed since the source environment (PROD) already exist. Perform step 3 if you will be importing this db –SID- into a new and fresh db and new unique SID.  1.OOTB PROD Enterprise server install (tcserver) [Source environment] Install the software with no client specific configuration (SID=PROD) Connect to and populate the PROD dbase Basic testing 2.PROD Web Server install and config (VMWare) [Source environment] Config POOL Manager for Thin Client and 4Tier Rich client support. Optional: RMI Distribution sever configuration. 3.Dump the Oracle dbase (SID=PROD) [Source environment] In a CMD shell with ORACLE_HOME and ORACLE_SID defined: Cd ... to a suitable directory exp userid=infodba/infodba owner=infodba file=prod_data.dmp direct=Y log=Exp_log.log 4.Copy the VMARE Image tserver to tcserver-dev. Make the necessary changes to the VMWARE files. Test it. Make sure you have changed the new VMWare's computer name to tcserver-dev. Note :that Teamcenter will not yet be functional since it was configured using the original comouter name "tcserver". If you are using VMWare Workstation, then there is a clone or copy action there that will make the needed VMWare file changes automatically. This does not make needed changes to the Teamcenter environment though! Steps 5 is needed if in the cloned VMWare environment, you want a unique Oracle and Teamcenter SID. However if you want to use the same SID as in the source VMWare environment, then skip step 5 and proceed to step 6. 

13 5.Oracle actions. I am assuming Oracle is already installed. 
If a unique SID is desired, then this step must be performed. Create a new Oracle dBase (SID=DEV) and import the Oracle dump file into it: Edit tnsames.ora and listener.ora to correct server name. Create a new Oracle dbase using the Teamcenter templates (SID=DEV). This will generate a unique Teamcenter Site ID. In a CMD shell with ORACLE_HOME and ORACLE_SID defined: Load the PROD oracle dump file: Cd ... to a suitable directory. Imp userid=infodba/infodba file=/tmp/prod_data.dmp fromuser=infodba touser=infodba commit=Y log=Imp_log.log 6.Change the NODE name for the new dbase's Volumes with SQLPLUS Assumptions: Old server name: tcserver New server name: tcserver-dev Existing or old volume name: Volume1 Note: To perform a query to see what the existing settings are before giving the command above, use the two sql command below: Select pnode_name from PIMANVOLUME; Select pvolume_name from PIMANVOLUME; Now to change the node names with SQLPLUS: From a CMD shell with the TcEng environment defined, start SQLPLUS and connect as infodba. update PIMANVOLUME set PNODE_NAME=' tcserver-dev '; commit; commit may be optional, but needs to be on a separate line it seems. This will change the node name for all "Volumes" defined in Teamcenter. This is fine if all volumes are on the same physical server. If they are not, then use the following command instead.  update PIMANVOLUME set PNODE_NAME= 'tcserver-dev' where pvolume_name='Volume1'; commit; Repeat for each volume, entering the proper "new" servername for each volume. You can then update the Volume information from the Rich Client interface is necessary (Organization --> Volumes) Reboot the oracle server or shutdown and restart the dbase. This may not be necessary with the "commit" option to the sql line

14 7.Make the Teamcenter changes to connect to the new dbase (SID=DEV)
Edit tnsnames.ora in the TC_DATA directory to correct hostname. (On systems using Oracle only; not needed on MSSQL systems) Modify TC_profilevars to point to new dbase (TEST) Modify %TC_DATA%\tnsnames.ora file (new SID name and server name) Rename the pom_schema_tcserver_PROD to the pom_schema_tcsever-dev_PROD Start Tc and edit the preferences for: FMS_Bootstrap_URL Default_Transient_Server Default_Transient_Volume_Id Transient_Volume_Installation_Location Transient_Volume_RootDir WEB_default_site_server 8.Make FMS and FCC changes: Change servername entries in %TC_ROOT%\FMS\fmsmasterxxx.xml file. Change servername entries in %RA_ROOT%\fcc.xml file. You will need to do this for each RAC installed, 2Tier and 4Tier. Make sure any existing fcc processes are killed. Stop and restart FMS service. Do they start up OK? Now start a RAC session. Is a FCC started automatically? Make sure you test both 2Tier and 4Tier. 9.Make changes to TEM's %TC_ROOT%\install\configuration.xml file Make a copy of the original for safe keeping, (configuration_orig.xml). Then make the changes to configuration.xml. There will be quite a few places where the Corp Server and the DB Server are pointed to.

15 Below are examples from a client install:
Change the Volume Server name

16

17 Also verify and correct the tcdata section to correct the path to that file if needed.
Please Remember:Make changes to the configuration.xml file intelligently. Make sure the changes you are considering are coherent for the new environment. And not ALL server entries need to be modified. Some can be updated interactively by launching TEM (such as FSC parameters for example). Other server name entries just will not matter! 10.Flush temp files: Stop all services. Delete all files that you can from %TEMP% some are VMWare and/or Windows files that are being used, so they are OK. But all Teamcenter related files should be deletable. Go to the installation user TEMP are and flush the Teamcenter folder. (C:\users\infodba\teamcenter). Restart services As a test, launch TEM and try and deploy something simple that we can then remove. I recommend Task Daemon. If that deploys correctly, then TEM should be fine. Remove what you no just installed. 11.Make the needed Teamcenter insweb Changes This is obsolete with Tc8.x?? Can be ignored??  12.Correct or reinstall Apache 13.Correct or re-install JBOSS Launch insweb For each Web Object Change its Name (Optional) Change its Staging Area name – location – (Optional) Change Disk Location if necessary. Access Context parameters Make any and all necessary changes (Cluster names, Server References etc) Access Required Tables Make any and all necessary changes (server names, SID changes etc)

18


Download ppt "Tc Cloning an Environment"

Similar presentations


Ads by Google