Administration Tools - ooexportschema

Printer-friendly version
Creates an XML document representing part or all of a federated database’s schema.
ooexportschema
[-class className | -entireschema]
[-outfile filename [-maxfilesize value][-compress]
[-exists ask | delete | quit]]
[-nws]
[-shortnames]
[-verbose]
[-stoponerror]
[-schemalock lockVal]
[-standalone]
[-notitle]
[-quiet]
[-help]
bootFilePath
Options
-class className
Name of a particular class to be exported.
By default, this tool exports the set of application-defined classes in the federated database’s schema. Specifying the -class option produces an XML document that represents only a single class. If you use the -class option, you cannot use the -entireschema option.
You normally use the -class option if you want to inspect an XML representation of a particular class or import the class into a third-party CASE tool.
Note: A single class cannot be imported by itself into another federated database. If your goal is to transfer a class from one federated database to another, you should export all the application-defined classes in the schema (optionally including the Objectivity/DB internal classes).
-entireschema
Exports the entire federated-database schema, includng Objectivity/DB internal classes.
By default, this tool exports the set of application-defined classes in the federated database’s schema. Specifying the -entireschema option produces a larger XML document representing Objectivity/DB internal classes in addition to the application-defined classes. If you use the -entireschema option, you cannot use the -class option.
You can normally omit the -entireschema option because the destination federated database of an import operation already contains the schema for Objectivity/DB internal classes. You should specify -entireschema if the federated database of the exported schema was created with a different release of Objectivity/DB than the intended destination federated database.
-outfile filename
Base name for all output files. You may optionally include a path to an existing directory in which to create the output files; if you do not include a path, the output files are created in the directory in which you ran the tool.
You can omit this option to send the generated XML document to stdout.
Specifying this option creates the following output files:
n
One or more files containing the XML document. The first or only such file is called filename.xml; subsequent files are numbered sequentially, starting with filename_2.xml. Multiple files are generated only to keep the file size within the limit specified by -maxfilesize.
n
A report file called filenameReport.xml summarizing the number of XML elements of each kind in the XML document.
-maxfilesize value
Maximum size of each output file, expressed as an integer number of megabytes (MB). You can omit this option to set the maximum size to 100 MB.
This option applies only when the -outfile option is also specified.
-compress
Compresses the output files using a built-in gzip utility. When you specify this option, each output file has the additional extension .gz—for example, filename.xml.gz
This option applies only when the -outfile option is also specified.
-exists
Action to take if a file already exists with the same name as a generated output file.
ask Prompts whether to overwrite the existing file. If the answer is No, the program terminates. No is the default.
delete Deletes any existing file.
quit Terminates the program if the file currently exists.
The default value is ask.
This option applies only when the -outfile option is also specified.
-nws
Suppresses all nonessential “white space” (spaces, tabs, and blank lines), producing an XML document that is more compact, but less readable.
You can omit this option to format each XML tag on a separate line, indented to indicate its level of nesting.
-shortnames
Shortens all XML tag names and attribute names, producing an XML document that is more compact, but less readable. Each shortened name is usually a single character and is not necessarily mnemonic—for example: </o>.
You can omit this option to generate XML tags and attributes with longer, more mnemonic names—for example: </Class>.
-verbose
Expands various XML elements to include additional detail, producing an XML document that is more readable, but less compact. You can omit this option to generate XML elements that contain only the minimum information required by ooimport.
-stoponerror
Terminates immediately when an error is detected.
Omitting this option causes the tool to report errors to stderr and continue processing. Each reported error contains an XPath expression for the node being processed at the time of the error, followed by an explanatory message.
-schemalock lockVal
64-bit unsigned integer key for unlocking the schema for this export operation. You can normally omit this option because, by default, the schema is not locked. This option is required only if you have explicitly locked the schema of a federated database using Objectivity/DB Active Schema.
-standalone
Nonconcurrent mode. Use this option if no lock server is running or to bypass a running lock server.
Warning: Corruption can occur if concurrent access to the federated database is attempted while any process is using this mode.
-notitle
Suppresses the copyright notice and program title banner. Useful when invoking the tool from another tool or product.
-quiet
Suppresses all normal program output.
-help
Prints the tool syntax and definition to the screen.
bootFilePath
Path to the boot file of the federated database containing the schema to be exported. You can omit this argument if you set the OO_FD_BOOT environment variable to the correct path. (HA) You can specify the boot file of any autonomous partition.
Discussion
This tool exports the schema of a federated database by representing it textually in Extensible Markup Language (XML). More specifically, this tool creates an XML document containing a hierarchy of XML elements representing one or more of the classes described in the federated database’s schema. You can specify this XML document to the ooimport tool to transfer the exported schema into a destination federated database—for example, to prepare a newly created federated database before importing data.
By default, this tool exports the set of application-defined classes in the schema. To export a different set of classes:
n
Use the -entireschema option to export the entire schema, including Objectivity/DB internal classes as well as application-defined classes.
n
Use the -class option to export a single class.
Note: A single class cannot be imported by itself into another federated database. If your goal is to transfer a class from one federated database to another, you should export all the application-defined classes in the schema (optionally including the Objectivity/DB internal classes).
You can control the size and readability of the XML document with the -nws, -shortnames, -verbose, and -entireschema options.
By default, the XML document is sent to stdout. You can save this document to one or more files by specifying the -outfile option. This option also generates a summary report of the XML elements present in the XML document. You control the size of the output files with the -maxfilesize and -compress options.
Exporting a schema is the first step of a procedure that synchronizes the schemas of two or more federated databases. You typically synchronize schemas when you want to:
n
Prepare a destination federated database before attaching a database.
n
Prepare a destination federated database before importing data (the output of ooexportdata).
n
Ensure that all members of a distributed development team are using federated databases with matching schemas.
Discussion

Date: 
Tuesday, October 30, 2012
Product: 
Objectivity/DB
Version: 
10.2.1
10.2
10.1.4
10.1.2
9.4.1