startSQLRepository uses the following syntax:

startSQLRepository arguments xml-file[ ...]

You can supply multiple XML files to startSQLRepository, and it processes them in the order specified. For example, you can pass your full repository definition file together with a test file that uses the test operation tags to manipulate repository items, as shown in SQL Repository Test Example.

The following example loads an XML template whose configuration path name is /atg/test.xml in a repository with a Nucleus address of /atg/userprofiling/ProfileAdapterRepository:

startSQLRepository -m DPS
   –repository /atg/userprofiling/ProfileAdapterRepository /atg/test.xml

The XML template file name is located in the application’s configuration path. For example, you can reference a file in the localconfig directory as /file-name. You can also use a file with the same name as your repository’s existing definition file and omit the file name argument from the startSQLRepository command. The startSQLRepository script uses XML file combination to combine all files with the same name into a single repository definition. See XML File Combination in the Nucleus: Organizing JavaBean Components chapter of the ATG Programming Guide.

For example, you can use startSQLRepository to print all profiles in the Profile repository by including the following file in:


  <print-item item-descriptor="user"/>

You can use the startSQLRepository script together with the test operation tags described earlier in this chapter to quickly test a query, or add, update, remove, or print an item.

General Arguments

The startSQLRepository scripts take the following arguments:




Lists a module to load which contains the target repositories. Supply multiple –m options in order to start more than one module.

This argument must precede all others, including import.


The ATG instance on which to run this script. Use this argument when you have multiple servers running on your machine.

This argument must precede all others except m.

-database vendor

Customizes the DDL for the SQL variant used by the specified vendor’s database software, where vendor can be one of the following values:



Outputs additional logging information. This option is equivalent to setting the loggingDebug property to true for the repository.

-encoding encoding

If the content you are exporting contains non-ASCII characters, use this option to specify an encoding such as 8859_1 or SJIS in which to save your content.

-export "item-type[,...]file

Exports items of one or more item descriptors to an XML repository definition file, where file is relative to the <ATG9dir>/home directory.

-export all file

Exports all items of all item descriptors in this repository to a file, where file is relative to the <ATG9dir>/home directory.

repositorypath[,...] file

To export data from more than one repository into the same file, use this option. This might be preferable to the -export option if repositories are linked, as it prevents duplicating linked item descriptors in multiple files.

-exportRepositories all file

Exports all repositories to one file, where file is relative to the <ATG9dir>/home directory.

-import input-file

The XML file or DOM that contains the repository definition to import into the target repository, where input-file is a file created from running startSQLRepository with export or export all.

The path of input-file can be absolute or relative to the current directory.


If you use this argument, this operation is not wrapped in a transaction. Using a transaction for large operations can run into database limitations on transaction sizes and numbers of permitted row-level locks.

-output file

Sends all output from <print-item> and <query-item> tags to the specified file, instead of standard output.


Outputs a DDL (SQL) file for the XML templates in the repository to standard output.

-outputSQLFile file

Outputs a DDL (SQL) file for the XML templates in the repository to the specified file.

repository path

The Nucleus path of the repository. For example:


If you run startSQLRepository with the DPS module or a module that requires the DPS module, you can omit this argument, and the script uses the first repository registered in the component/atg/registry/ContentRepositories .

If you use startSQLRepository to import assets into a versioned repository, this argument is required the input file specifies the target repository with additem and updateitem tags.


By default, when you use one of the export arguments, all referenced item descriptors are automatically added to the list of item descriptors to be exported. If you use the -skipReferences argument, referenced item descriptors are added only if you affirmatively include them.


Outputs additional logging information, equivalent to setting loggingSQLInfo and loggingSQLDebug properties to true for the repository’s JTDataSource. All SQL emitted is logged.

loading table of contents...