cqload importschema
Applicability
Platform: Windows
Command type: cqload subcommand
Synopsis
- cqload importschema [-installpackages] [-keep] [-verbose] [-dbset dbset ] loginID password "schemaPathName"
Description
The cqload importschema subcommand imports an entire schema from a text file and adds it to your schema repository. This subcommand is useful for sharing schemas with sites that cannot access your schema repository or that use a different schema repository.
To use the cqload importschema subcommand, first you must export a schema by using the cqload exportschema subcommand. To import a partial schema, use the cqload importintegration subcommand.
If a schema contains packages that are not currently installed into the schema repository, an error occurs for each package that is not found. To use the cqload importschema or cqload importintegration subcommands, first you need to install the missing packages by right-clicking a schema repository and selecting install package.
Options and arguments
- –dbset dbset
- Specifies the connection name. Required if there are multiple schema repositories in the system.
- loginID
- Login name of the user. This user must have Super User privileges.
- password
- Password for the loginID user. Enter an empty set of double quotation marks ("") if there is no password.
- schemaPathName
- Path name to the text-file version of a schema that was saved by using the cqload exportschema subcommand. Enclose the path name in double quotation marks (" ").
- -installpackages
- Automatically install package revs that are needed by the schema. Without this option, any missing, or unregistered, schema revs are reported and the importschema ends with an error.
- -keep
- Keep any schema revs that are successfully imported, even if there is a failure. Without this option, the incomplete schema is deleted if there are any import errors.
- -verbose
- Enables extra output to show progress during the import operation. The output identifies the name of the schema to be imported and each schema rev as it is being processed.
- -codepage
- Specifies the codepage of the schema repository where the schema file was exported. This action is necessary when the import uses a schema repository that has a different code page, so the input file is processed correctly.
Examples
- Import a schema, which was exported into a text
file by using the cqload exportschema command and saved in c:\schema.txt,
into the current schema repository.
cqload importschema -dbset 2013.01.00 admin secret "c:\schema.txt"
- When you run the cqload importschema subcommand, and the import schema file contains
packages that are not installed in the schema repository, an error message displays for each package
that is not
found.
C:\cq_schema_rep\test>cqload importschema -dbset test admin secret exported_schema.txt *********************************************************
Starting importschema
*********************************************************
The import file "exported_schema.txt" is invalid:
The schema requires the following packages, which are not currently installed in the database...
revision '5.0' of package 'Notes'
revision '7.1' of package 'Email'.
*********************************************************
ERROR: importschema FAILED!
*********************************************************
- Run the same command with the -installpackages option to automatically install the
missing packages, and include the -verbose option to see more details.
C:\cq_schema_rep\test>cqload importschema -dbset test -installpackages -verbose admin secret exported_schema.txt *********************************************************
Starting importschema
*********************************************************
Installing package ‘Notes’, rev ‘5.0’.
Installing package ‘Email’, rev ‘7.1’.
Importing Schema RequestTracking
Importing Rev 1
Importing Rev 2
Importing Rev 3
Importing Rev 4
*********************************************************
Successfully completed importschema
*********************************************************