Exporting data by using the AR Export command-line utility
Use the BMC Remedy AR Export command-line utility to export the contents of a BMC Remedy AR System server form to an .arx file. You can extract data from more than one AR System server form and consolidate the data in a single .arx file. You can also exclude the data of certain fields from being exported to the .arx file. The AR Export utility also supports Unicode data.
Note
The AR Export utility does not export the contents of an AR System server form to a CSV file or to an XML file.
The utility can extract all the data from an AR System server form. The utility can also extract data from a form based on the string that defines the qualification criteria. If the form contains an attachment, the attachment data is extracted to a folder whose name is the same as that of the .arx file. By default, the utility adds a time stamp to the folder containing the attachment data.
Running the utility
You can run this utility from a command prompt using a batch file (arexport.bat) on Microsoft Windows platform or a script (arexport.sh) on UNIX platform. The utility is installed as part of the BMC Remedy AR System server installation. The arexport.bat file is located in the <ARServerInstallationDirectory>\artools folder in Windows and the arexport.sh file is located in the <ARServerInstallationDirectory>/artools folder in UNIX.
Use the following command to run the export utility and enter qualification criteria. Parameters enclosed in square brackets are optional.
arexport.bat -u <userName> -x <serverName> -p <password> -t <TCPPortNumber>
-form <formName> -datafile <outputFile>
[ -delim <delimiter>
-a <authenticationString>
-T <transactionSize>
-L <logfilePath>
-e <exclusionFieldList>
-q <qualificationString>
-o <overwriteOption>
-timestamp <timeStamp>
-timeout <timeoutValue>
]
The following table describes the arexport
command options, which can be used in any order in the command:
Option | Description |
---|---|
| Specify the user name that identifies the user account for the AR System server. |
| Specify the password for the user account. If the user account has no password, use |
| Specify the name of the external authentication string or Windows NT domain. This is related to the Login window's Authentication field. See Authentication String Alias introduction. |
| Specify the name of the server to connect to. |
| Specify the TCP port number to connect to. If the port number is unknown, use |
| Use this option to overwrite existing attachments and data file. The following values are valid for this option: |
| Specify the name of the form from which you want to export data. To export data from multiple forms, use a comma-separated list of form names in the following format: |
| Specify the name and path of the file in which to store the data. If you do not specify the file extension, the utility adds the .arx extension to the data file. |
| Specify the field IDs for which you do not want to export data. You can use a comma-separated list in the following format: |
| Specify the size of the transaction. The default size is 100 records. |
| Specify the log file path. To specify a log file path, use the following format: Note Ensure that the log file path exists and that the file extension is included in your command. When you specify the |
| Specify a string that qualifies the search criteria. Use an escape character if the qualification string contains double quotes (for example, if the qualification string is 'RequestID' = "000000011"'). Note Do not use a field label as the qualification string. You must use a field name or a field ID as the qualification string. |
| Specify the delimiting character to use when you specify multiple values to an option. By default, a comma is the delimiting character. Use the
The following command successfully extracts the data by excluding the data of the fields with IDs 4 and 6.
Note Test,form1 is the name of the form containing a comma. |
| Use this option to add a time stamp to the folder containing form attachment data. This option has the following values: |
| Specify the timeout period for connecting to the server. You can specify Normal, Long, and XLong seconds after which the timeout occurs. Use the following format to specify the timeout values: Note You must specify all three values even if you want to set one timeout value. |
Example
Consider a situation in which a user with the user name Demo needs to export data from a form named Form1 into the data file c:\ARExport\data.arx, using a qualification string such as 'RequestID'="000000001123" with transaction size 50, and needs to exclude data for fields with IDs 8 and 5. The arexport
command would look like the following:
Windows
arexport.bat -u Demo -x myServer -p "abc" -form "Form1" -datafile "c:\ARExport\data.arx" -T 50 -e "8, 5" -q "'1' = \"000000001123\""
UNIX
arexport.sh -u Demo -x myServer -p "abc" -form "Form1" -datafile "/ARExport/data.arx" -T 50 -e "8, 5" -q "'1' = \"000000001123\""
Consider a situation where you want to add an additional qualification:
arexport -u Demo -p Asimil89@ -x localhost -form User -datafile "C:\testexp.arx" -q "'101' = \"Demo\" && '109' = 1"
arexport -u Demo -p Asimil89@ -x localhost -form User -datafile "C:\testexp.arx" -q "'101' = \"Demo\" AND '109' = 1"
Logging for the arexport command
If an exception occurs when the form data is being exported, the exported records of that form are rolled back and removed from the .arx file and the details are logged in the artools.log file.
On Windows, the artools.log file is located in the <ARServerInstallationDirectory>\Arserver\Db folder.
On UNIX, the artools.log file is located in the <ARServerInstallationDirectory>\db folder.
Comments
Log in or register to comment.