ARGSOFT_SAVEASXML.EXE supports the following parameters


The name of the database server where the database table to be exported resides


The name of the database where the table to be exported resides


The name of the table to be exported


An optional expression that can be used to select a subset of the records in the table.

This expression is used to form a WHERE clause when selecting records from the table. If not specified, all records in the table are exported.


An optional comma-delimited list of column names in the origin table that are to be omitted (dropped) from the exported XML data file.

If not specified, all columns in the table are exported.


The name of the column in the table that will be used by the import tool to check for duplicates.

If the table has no primary key or duplicate key processing is to be ignored, specify the special value *NOKEY.

If /PK_COLUMN_NAME=*NOKEY is specified, the value for the /OVERWRITE= parameter is ignored.


Specifies whether or not overwrite processing will be used for records in the origin table that have a duplicate key value in the destination table.

The default value for this parameter is ‘NO‘.

The /OVERWRITE=YES parameter can be used in data merge scenarios.

A record in the destination database table that has the same key value as a record in the exported XML data will be

overwritten with the data in the XML disk file.


The fully-qualified path and name of the disk file where the table content will be written as XML.


Most SQL-compatible databases support the IDENTITY attribute for numeric columns.

The value for numeric columns with the IDENTITY attribute is assigned automatically by the database software outside of customer control.

When the value for columns having the IDENTITY attribute must match on both the origin and destination database,

use /IDENTITY_INSERT=ON. This is the most common case for production data,

i.e. customers expect the data to be identical in both the origin table and destination table.

To allow the destination database to automatically reassign the column value in the destination table, use /IDENTITY_INSERT=OFF.

This value can be useful in some cases where a pre-loaded table is used to prepare or initialize a newly created database.

The default value for this parameter is ‘ON‘.


Most database software supports storing characters in database columns that is not compatible with XML.

A common case is the carriage-return-line-feed sequence (0x0D0A), often abbreviated CRLF.

While CRLF is valid in the contents of a table column, it is not compatible with XML data and must be replaced during

the export to XML format and returned to its original value during import to the destination table.

The process of replacing incompatible characters is ‘escapement’.

The default value for this parameter is ‘ON‘.

Specifying /SPECIAL_ESCAPEMENT=OFF is not common and should be used only when:

  1. The content of the origin table is known to be completely and fully compatible with both XML characters and SQL syntax characters
  2. Careful testing has been done before use in a production environment


For large database tables, opening the table for export with this tool can sometimes time out.

The default value for this parameter is 120 seconds, which is adequate in most cases.

To override the timeout value and provide SQL Server more time to perform the query that opens the table for export, a larger value can be used.


Microsoft’s XML parser fails if the size of the XML disk file is too large. To avoid this, the exported table data can be broken up into smaller individual files.

The /MAX_MB_PER_FILE= parameter controls the maximum number of bytes that will be stored in an export XML disk file.

The default value for this parameter is 10 (meaning 10 megabytes).

If the size of the exported XML data exceeds this value, individual files with a sequence number appended to

the name are written instead of one single large XML disk file.


Customer wants to export 1,200,000 records from the AJS_ARCHIVE table in Argent Job Scheduler


If written as one single file, the size of the AJS_ARCHIVE_EXPORT.XML disk file would be over 1Gb.

Microsoft’s XML parser fails for XML files that large.

By specifying the default value of 10 (meaning 10 megabytes), the export tool creates XML output files named




… and so on.

Each file in the series can be imported successfully because the size of each file can be accommodated by Microsoft’s XML parser.