ATG SQL Repository

startSQLRepository can be used for following activities -

  • Read a repository definition from an XML file
  • Verify the XML is correctly formed and complies with the DTD
  • Parse and process optional operation tags. These tags provide a means for adding, removing, updating items in your SQL repository
  • Generate SQL statements to create the appropriate database table structure
  • Import and export items and item descriptors

startSQLRepository arguments description -

Argument Description
-m To load one or more module. Multiple modules can be used by seperating -m option.
-s Name of the ATG srever to be used. It is optional.
-repository URL of the repository. ex- -repository /atg/commerce/catalog/ProductCatalog
-outputSQL Output file in the XML template
-database Customizes the DDL for the database variant used by the specified vendor database software
-output Sends all output to a file
-verboseSQL Output additional information will display on console
-export Exports all the items of one or more item descriptors to an XML repository definition file
-export all Exports all of the items of all item descriptors in this repository to a file
-import Imports XML definitions from a file created with the –export or –export all arguments
The file names of the XML files to parse

Exporting All Repositories -

To export the data from all SQL repositories registered in the /atg/registry/ContentRepositories component, use the following command (type the following on one line, without any line breaks):
bin/startSQLRepository -m module -exportRepositories all all.xml
The location of the resulting file is relative to the /home directory.

Exporting Individual Repositories -

To specify individual repositories to export, issue the following command:
bin/startSQLRepository -m module -export all file_name.xml -repository /atg/Path_to_Repository

For example, to export the Product Catalog from the Pioneer Cycling store database into a file called products.xml, issue the following command:
bin/startSQLRepository -m PioneerCycling -export all products.xml -repository /atg/commerce/catalog/ProductCatalog

Importing All Files
To import the content from all the XML files, issue a command like this (type the following on one line, with no line breaks):
bin/startSQLRepository -m PioneerCycling -import all.xml -repository /atg/userprofiling/ProfileAdapterRepository

Importing Individual Files -
To import content from individual files, issue the following command:
bin/startSQLRepository -m module -import file_name.xml -repository /atg/Path_to_Repository

For example, to import the content from the Pioneer Cycling products.xml file, issue the following command:
bin/startSQLRepository -m PioneerCycling -import products.xml -repository /atg/commerce/catalog/ProductCatalog

Previous Next


Share your valuable comment

Name :
Email Id : [ We will not publish your email id ]
Your Comment : [ Maximum 200 chars ]
Enter Security code :