startSQLImport imports repository data from a data file that was created with the startSQLRepository utility. For information on the startSQLRepository utility, refer to the Importing Repository Data section of the Repository Guide. This tool takes an XML file and imports data into a versioned repository using direct database SQL calls. Note that this utility will work only with versioned repositories.

Syntax

You run startSQLImport from <ATG11dir>/home/bin as follows. Note that the –file argument along with either a -workspace or a -project argument is required.

startSQLImport –file data-file { -workspace workspace-name | -project project-name }
          [optional-arguments]

For example:

startSQLImport -file  /users/jsmith/CatalogExport.xml -project myImport

Importing to a Project or Workspace

When importing to a versioned repository, you must specify either a project or a workspace. If there are initialized targets in the systems, only -project can be specified:

Note: After deployment targets are initialized, use –project with startSQLImport instead of
-workspace. When –project is used, assets are imported into a new project with the default or specified workflow. Users can then access this project and perform the tasks associated with its workflow.

Command-Line Help

To obtain command-line help on syntax usage, type:

startSQLImport -help

Versioning Arguments

The following options are used to import repository data to a versioned repository. In order to use them, the Publishing module must be running.

Argument

Description

-project name
  
[-workflow name]

Specifies the name of the project to create for the import operation. This option is available only if the Publishing module is running, and cannot be used if using -workspace.

After running startSQLImport with this argument, the imported assets must be checked in manually through the Business Control Center.

If qualified by -workflow, the project uses the specified workflow; otherwise, it uses the default workflow:

/Common/commonWorkflow.wdl

-workspace name
  [-nocheckin]

Specifies the workspace to use during the import operation, where name is a user-defined string with no embedded spaces and is unique among all workspace names. By default, the workspace name is set to import. Use –workspace only during the initial import to the target repository, before you initialize any target sites.

The workspace is the area in the VersionManager where the import takes place. If the specified workspace does not exist, the system creates it.

This option cannot be specified if you specify -project.

If qualified by -nocheckin, the import does not check in imported data. This allows use of the workspace for multiple import operations, so all assets can be checked in at the same time.

-checkinComment
  
comment

Comment to use when checking in imported data. The default is import.

-username name

Username to use when checking in imported data. The default is SQLImport.

This argument is required when the project argument is supplied, so the user can be identified as the project creator.

-versionManager
  path

The Nucleus component path of VersionManager to use for versioned imports. Use this argument only if the VersionManager runs in a non-standard location.

-nocheckin

Specifies that the import should not check in imported data. This allows multiple imports or other versioned operations to use the same workspace and be checked in together. Only valid with
–workspace.

-activity ID

The ID of the activity to associate with the project specified in the
-project argument. The default value is null.

General Arguments

The following are general arguments used for importing repository data.

Argument

Description

-m module-name
[-m startup-module]...

Lists the modules to start for the export process. Specify the modules that contain the source repositories for exported data.

To start multiple modules, you can supply multiple –m options, or delimit multiple modules with a semi-colon (;) on Windows and a colon (:) on UNIX.

This argument must precede all others, including -file.

-s server-name

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.

–file source-file

Required, specifies the file with the data to import. The path that you specify can be absolute or relative to the current directory.

-repository path

The Nucleus component path of the repository to import into. Any add-item, update-item, or remove-item tags that do not have repository attributes will be imported into this repository.

-batchSize size

The number of items to commit in a transactional batch. The larger the specified number, the faster the import. However, a large number requires more memory and a larger transaction log in the database. The default is 1000.

Specify -1 to import all items in a single batch.

Database Arguments

The following options determine how the import interacts with the database.

Argument

Description

-checkoutThreadCount size

Identifies the maximum number of threads to use to check out versioned assets. This size depends on the database resources available. Too many threads can cause a database to become unresponsive to other applications using the same database. The default size is 10.

-addUpdateThreadCount size

Identifies the maximum number of threads to use to add update operations. This size depends on the database resources available. Too many threads can cause a database to become unresponsive to other applications using the same database. The default size is 10.

Import Utility Arguments

The following options determine what external code is called during the import process.

Argument

Description

-listeners path

This is a comma-separated list of Nucleus paths that implement the atg.adapter.gsa.sqlimport.ImportListener interface.

You can call customized code that modifies the import process using these components. For example, the /atg/
commerce/catalog/customer/CatalogUpdatService
listener can be directed to run after an import process and update catalog properties in batch on the imported data.

Print Arguments

This argument controls the messages that are printed.

Argument

Description

-v

Show more detail in the message. Specify multiple times in order to increase the level of detail.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices