The ARMImporter tool is a command-line utility that groups a batch of SQL files, parses the grouped files, and imports these file into the SQL server or ORACLE server.
While the ARMImporter parses the SQL files, it generates .arm files. These .arm files are saved in a location (drive) specified when you run the ARMImporter. The .arm files can then be imported to the SQL server or ORACLE server. Files are grouped in an ascending order based on the timestamp.
The user selects the .sql files in the ascending order of their time stamp. For example, if there are files with time stamps of 2007 and 2008, then files with 2007 are grouped first, and then 2008.
Files are grouped as Group1, Group2, and so on. The ARMImporter creates the groups based on the presence of @Identity_1 (temporary Id), which is the key to group the .sql files. If two files have the same ID, they are not placed in the same group. This temporary ID is replaced with a specific number at runtime.
All events that occur during the parsing of the grouped files are logged to a file.
The following command at the command prompt parses the files and places those parsed files in a specified location:
ArmImporter –i <path where SQL files are stored> -o <path where arm files will be generated> -p
For example:
ARMImporter -i "H:\SQLFile_Parse\ARMImporter" –o "H:\SQLFile_Parse\ARMImporter –p
The parsed files are imported into the SQL or ORACLE server. The file import generates log files that contain any error or warning information that you can use for troubleshooting if the import fails.
SQL server:
ARMImporter_SQL –U ad –P a –d <database name> –S <server-name\instance> -o <path for arm files> -I
For example:
ARMImporter_SQL –U admin –P a –d EFTDB –S 192.168.38.207\GlobalScape –o "H:\SQLFile_Parse\ARMImporter" –I
ORACLE server:
ARMImporter_ORACLE –U admin –P admin –S <server-name\instance> -o <path for arm files> -I
For example:
ARMImporter_ORACLE -U system -P admin -S localhost:1521/XE -i "D:\sql" -o "D:\arm" -I -l
Instead of performing the parsing and importing operations individually, you can execute both operations at once using the following commands:
SQL server:
ARMImporter_SQL –U admin –P a –d EFTDB–S 192.168.38.207\GlobalScape –I "H:\SQLFile_Parse\ARMImporter" –o "H:\SQLFile_Parse\ARMImporter" –p –I
ORACLE server:
ARMImporter_ORACLE -U system -P admin -S localhost:1521/XE -i "D:\sql" -o "D:\arm" -p -I -l
The main advantage of this tool is that it groups the dispersed .sql files belonging to the same group into one single SQL file. The files are grouped based on the identity keys, which allow us to place a SQL query execution statement after an arbitrary number of lines. This also ensures that the oSQL tool or SQL*Plus tool is not overloaded with a huge amount of simultaneous SQL statements.
Using the ARMImporter Tool in Event Rules
Purging Data from the Database