As an Oracle user you can also run the bporaexp command from the operating system command prompt and specify a parameter file.
Note Be sure to configure the runtime environment as specified in “Configuration” on page 69 because this method does not call the full script that includes the runtime configuration. Check the sample scripts for runtime environment details.
bporaexpcreates a set of XML schema and instance documents that can be used to archive Oracle table data. For each archive, one master XML schema (.xsd) document is generated. In addition, for each table, bporaexp generates a table-specific schema (.xsd) document and a table specific instance (.xml) document. Additional files are created if the table contains LONG or LOB columns.
The bporaexp Parameter File
Before you run the bporaexp command, create a parameter file. This parameter file lets you specify settings that determine how the backup is to be performed. The following example command shows how to specify the parameter file on the bporaexp command:
bporaexp [username/password] parfile = filename | help=y
Writing to a Directory Versus Writing to a Storage Unit
One important aspect of the parameter file is the DIRECTORY parameter. If you specify the DIRECTORY parameter, the bporaexp command writes the backup files to the operating system directory you specify. NetBackup does not write the files to a storage unit.
For example, the archive test1 contains one table, USER1. If the
DIRECTORY=/db/netbackup/xml parameter is specified, NetBackup creates the following files when you run the bporaexp command:
NetBackup files for example table USER1
File Content
/db/netbackup/xml/test1/test1.xsd Master XML schema for table USER1 /db/netbackup/xml/test1/USER1/TEST1.xsd Table schema for table USER1 /db/netbackup/xml/test1/USER1/TEST1.xml XML document for table USER1
If the DIRECTORY parameter is not specified, NetBackup writes the backup images to a Media Manager or disk storage unit. A NetBackup backup set is created and cataloged under the name /Oracle/XMLArchive. All NetBackup for Oracle bporaexp backups are cataloged using this convention.
Alternatively, if the parameter file does not contain the DIRECTORY parameter, NetBackup creates and catalogs the following files:
/Oracle/XMLArchive/test1/test1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xsd /Oracle/XMLArchive/test1/USER1/TEST1.xml
In production, do not use the DIRECTORY parameter in the bporaexp parameter file.
When you write to a Media Manager or disk storage unit, NetBackup offers features that include searching and cataloging with the NetBackup catalog and automatic handling of output that exceeds file system limits. With the DIRECTORY parameter, file system limits, such as a 2 GB maximum, can cause an error.
▼ To run bporaexp on the client
❖ At the command prompt, type:
bporaexp [username/password] parfile = filename | help=y Note On 64-bit platforms, the bporexp64 command is also available.
The following table shows the available bporaexp parameters with their default values.
Note Use the NetBackup parameters NB_ORA_SERV, NB_ORA_CLIENT,
NB_ORA_POLICY, and NB_ORA_SCHED to specify the NetBackup runtime configuration. Otherwise, the order of precedence for the runtime configuration variable settings is used.
Some parameters are valid only when writing to a NetBackup Media Manager or disk storage unit. Other parameters are valid only when writing to a directory. In the following table, the right-most column contains either Storage Unit or Directory to indicate whether the parameter in that row is applicable for either writing to a storage unit or to a directory. Parameters that are recognized when writing to a directory are ignored when writing to a Media Manager or disk storage unit.
Parameter Required? Default Description
Target Location
CONSISTENT N N Specifies whether or not
bporaexp uses the SET TRANSACTION READ ONLY statement to ensure that the data from all tables is consistent to a single point in time and does not change during the execution of the bporaexpcommand. If the default of CONSISTENT = N is used, each table is exported as an independent
transaction.
Directory
DIRECTORY N no default Optionally specifies a directory for the output of the bporaexp utility.
Directory
Parameter Required? Default Description
KEYWORD N no default Optionally specifies a keyword phrase that NetBackup associates with the image being created by the archive operation. Values for KEYWORD must be in double quotes.
Storage Unit
LOG N no default Optionally specifies a file name to receive
informational and error messages. If this parameter is specified, messages are logged in the log file and not displayed to the terminal of the NetBackup for Oracle client. of the NetBackup for Oracle policy. of the backup policy schedule to use.
Storage Unit
Parameter Required? Default Description
Target Location
OWNER N no default Lists the Oracle schema
owners to export. For each owner, the tables, partitions, and views owned by that Oracle account are exported by default. The PARTITIONS and VIEWS parameters can be used to exclude partitions and views.
Directory
PARTITIONS N Y Optionally specifies whether
or not table partitions are included. Only valid when used with the OWNER parameter.
Directory
Parameter Required? Default Description
Target Location QUERY N no default This parameter lets you select
a subset of rows from a set of tables. The value of the query parameter is a string that contains a WHERE clause for a SQL select statement that is applied to all tables and table partitions listed in the
1600”, two SQL statements are run:
Note that each query that runs refers to a single table at a time in the FROM clause, so it is illegal to have a join in the WHERE clause.
Directory
ROW_BUFFER N 1000 Specifies the size, in rows, of the buffer used to fetch rows.
Tables with LONG columns are fetched one row at a time.
The maximum value allowed is 32767.
Directory
Parameter Required? Default Description
Target Location TABLES Y no default Lists the table names, view
names, and partition names to export. The USERID must have SELECT privilege on the tables and views. The syntax used is: the user initiating the export.
If a connect string is not provided, the ORACLE_SID environment variable is used.
Directory
VIEWS N Y Optionally specifies whether
or not views are included.
Only valid when used with the OWNER parameter.
Directory