Renaming the AR System server by using the rename utility
You must scan for names and rename servers in the following circumstances:
- You move your database to a new environment during an upgrade.
- You copy a production database to a development or test environment.
- You use a standard image to instantiate a virtual machine for .
- You move your existing into a multitenant mid tier environment, which requires that each is uniquely named.
Use the Rename utility to rename a and to ensure that the server name used by the mid tier and the is the same.
Using the Rename utility, you can:
- Scan the database for the name
- Replace the AR System server name in the following locations:
- Specified forms and fields in the database
- Specific configuration files and property files
- Windows Services and Registries
Sequence of server name replacement tasks
Perform the server name replacement tasks in the following order:
- Replace the server name in files. In a server group, perform this operation on all servers in the server group.
- (Windows only) Replace the server name in the Windows Services and Registries. In a server group, perform this operation on all servers in the server group.
- (Windws only) Restart the computer if you made registry changes
- Start the
- Scan the database for the server name.
- Replace the server name in the database. In a server group environment, perform this operation only on the primary AR System server.
- In a server group, restart the primary and secondary
Rename utility command and options
The Rename command-line utility (arsrename.bat or arsrename.sh) is available in the ARSystemInstallationFolder\ARSystem\artools folder. Use the following command and its options to run the utility:
Run this utility in scan mode first to produce the output. Review the output and then proceed to run the utility in rename mode using this output.
[-u] [-p] [-a] [-x] [-t] [-timeout]
[-o] [-tokens] [-f] [-fsf] [-fsv] [-ie] [-ief] [-del ]
The following table describes the arsrename command options, which can be used in any order in the command.
Scanning the database for the server name
Use the Rename utility to scan for the name or a token string in the database (regular forms, character and diary fields). For example, in a multitenant environment, you can use the utility to scan the database forms and fields for occurrences of the onbmc-s string in the name on the myARServer computer. At the command prompt, enter the following command:
-f "c:\data\Output.csv"
-timeout 120:600:1800
The output of the scan operation is a CSV file (output.csv) that displays the results of the scan as a table consisting of the information shown in the following figure and described in the subsequent table:
Output of the scan operation
Column Name | Description |
---|---|
Form name | Name of the regular form in which the name is found |
Field ID | ID of the character field in which the name is found |
Is Partial (Y/N)? | Flag that indicates whether the field contains a partial or a complete string of the server name: Y—Partial string N—Whole string |
Merge (Y/N)? | Flag that indicates whether the scanned server name is to be replaced or not; this value is referred to during the replace operation: Y—Standard field N—Custom field; not replaced during replace operation If you want even the custom fields to be replaced, you must enter Y in the column for the custom field whose server name value you want to replace. In 9.1.02, this option in non-functional. Irrespective of the value specified in the Merge column, the Rename utility replaces all the form fields including custom forms with the scanned server name. Workaround |
Special (Y/N)? | Flag that indicates special handling is required during the replace operation |
Running the scan in Fast mode indicates that only first 5000 entries are scanned as a sample to find presence of the old server name. If it is not found in first 5000 entries, such form is ignored from the output.This helps to scan faster when a form has thousands or millions of entries. However, use this option with caution since it may not replace server name in forms that have huge amount of data and server name missing from first 5000 entries.
Format of the inclusion-exclusion list
You can control the forms that are scanned by creating an inclusion-exclusion text file that contains the list of forms that you want to include in or exclude from the scan and the qualification that you want to set for the scan. The following sample code shows the format of the inclusion-exclusion list:
#----below mentioned qualification is for fetching outgoing messages that are to be send
i,AR System Email Messages,'18092'=1 and '18099'=1
i,SRM:Request,'7'<7000
i,SLM:Measurement,'300364200'=0
i,AR System Server Group Operation Ranking
i,AR System Service Failover Ranking
i,AR System Service Failover Whiteboard
i,AR System Configuration Component
i,AR System Configuration Component_Backup
i,AR System Configuration Setting
i,AR System Configuration Setting_Backup
#--Exclusion list
e,AR System API Statistics
e,AR System Email Error Logs
e,AR System Email Error Messages
e,AR System Service Statistics
e,AR System Service Statistics Configuration
e,AR System Version Control: Object Modification Log
e,AR System Version Control: Object Reservation Label
e,AP:Detail
e,AP:Question-Comment-Info
e,Application Pending
e,BPCU-Logs
e,Server Statistics
e,FB:History
e,AR System Historical License Usage
e,AR System Log: SQL
e,AR System Log: Alert
e,AR System Log: Server Group
e,AR System Log: User
e,AR System Log: Thread
e,AR System Log: ALL
e,AR System Log: Archive
e,AR System Log: Escalation
e,AR System Log: FullText Index
e,AR System Log: API
e,AR System Log: Filter
e,HPD:HelpDesk_AuditLogSystem
e,NTE:Notifier Log
e,SRD:AuditLog
e,CTM:AuditLogSystem
e,CTM:CFG PeopleTagNumGenerator
The following table describes the formats used in this file:
Format | Description |
---|---|
# | Specifies a comment line |
i | Specifies the inclusion list |
e | Specifies the exclusion list |
Exclusions from the scan operation
The scan operation ignores the following forms and fields during scanning:
- Archive forms
- Audit forms
- Reserved fields on any regular forms
- Core fields with field IDs ranging from 1 to 99 (except field ID 8)
- () fields with field IDs ranging from 300 to 322
- Dynamic groups with IDs ranging from 60000 to 60999
- Special fields
- 112 (Access control)
- 179 (GUID)
- 160 (Locale)
- Server Statistics form
- AR System API Statistics form
- AR System Service Statistics form
- AR System Service Statistics Configuration form
- AR System Version Control: Object Modification Log form
- AR System Version Control: Object Reservation Label form
- AP:Detail form
- AP:Question-Comment-Info form
- Application Pending form
- AR System Email Error Logs form
- AR System Email Error Messages form
- AR System Email Messages form
- BPCU-Logs form
Replacing the server name in the database
Use the Rename utility to replace the name in the database. The replace operation takes a CSV file as an input and either completely or partially replaces the server names, depending upon the values specified in the input CSV file. The input.csv file is available in the AR_SERVER_HOME\artools\etc folder.
The input.csv file contains the information required to replace the server names in a tabular format with the same columns as the output.csv file. Use the input.csv file if you have not done any customizations to get the server name in any base field, overlay, or custom field.
The replace operation replaces only those forms or fields that have a Merge flag set to Y in the input.csv file. To handle special cases, specify Y in the Special (Y/N?) column of the input.csv file.
As an example, use the following command to replace the onbmc-s string with tenant1-onbmc-s:
-f "<C:\Program Files\BMC Software\ARSystem\artools\etc\input.csv>"
-timeout 120:600:1800
Scanning and replacing the server names in a server group
When using the arsrename.bat utility for scanning or replacing servers in a server group, ensure that you provide multiple tokens to scan and replace the server group alias name (Server-Name config parmeter) as well as individual host names. In the following examples, the prod-s string is the server group alias name in Production and prodVmName1 and prodVmName2 are the host names in Production. test-s is the server group alias name in Test environment and testVmName1, testVmName2 are the host names in Test environment.
Example for scanning multiple server names in one command (option 1)
-f "c:\data\Output.csv"
-timeout 120:600:1800
Example for replacing multiple server names in one command (option 2)
-f "<C:\Program Files\BMC Software\ARSystem\artools\etc\input.csv>"
-timeout 120:600:1800
Replacing the server name in files, services, and registry entries
Use the utility to replace the current server name in the following files of the BMC installed products, services, and registry entries. For files and registry entries, you need not have the up and running :
Component | Files in which to replace the server name |
---|---|
| |
| |
BMC_REMEDY_ITSM_SUITE_HOME\BMCRemedyITSMSuiteInstalledConfiguration.xml | |
BMC_SLM_HOME\SLMInstalledConfiguration.xml | |
BMC_SRM_HOME\BMCServiceRequestManagementInstalledConfiguration.xml | |
BMC_RKM_HOME\BmcRkmInstalledConfiguration.xml If you have installed earlier using a separate installer, the setup environment variable BMC_RKM_HOME is not required if BMC_RKM_HOME/BmcRkmInstalledConfiguration.xml exists on your machine. | |
Other files on Windows |
|
Services |
|
Registry entries |
|
Purge the server name in the server group metadata tables
Use the utility to clean up old server entries from the server group. Perform this step only on the primary server.
Purge the current server name in the following metadata tables:
- servgrp_board
- servgrp_config
- servgrp_resources
- servgrp_userlic
- servgrp_ftslic
- servgrp_applic
Example: To use the utility and rename the production server database to any other server database
Before using the arsrename utility, you must manually change the database references in the ar.cfg (ar.conf) file.
- Stop the test server.
- Restore the database on the production server to the test server.
- Start the test server.
Run the arsrename utility with operation mode 1—Scan.
Arsrename -x myARServer -u Demo -o 1 -p <password> -t <port> -f c:\data\output.csv -fsf 1 -fsv 5000 -tokens onbmc-sRun the arsrename utility with operation mode 2—Replace string tokens.
arsrename -o 2 -tokens "onbmc-s=tenant1-onbmc-s"- Restart the test server.
Run the arsrename utility with operation mode 7—Purge data from server group metadata tables.
arsrename -x tenant1-onbmc-s -o 7 -u Demo -p "" -t 0- Restart the test server.