import_replays
Imports the replays contained in a directory. An XML input file is required that describes the path of the directory containing replay data files; the database target to be used to load replays; and, optionally, replay names to import only specific replays into the Enterprise Manager repository.
Sample XML File:
<?xml version="1.0" encoding="UTF-8"?> <cliImportData xmlns="http://xmlns.oracle.com/sysman/db/dbreplay"> <targetName>database</targetName> <targetType>oracle_database</targetType> <dbHostName>host.example.com</dbHostName> <dbCredRef> <credName>testDB121</credName> <credOwner>sysman</credOwner> </dbCredRef> <dbHostCredRef> <credName>testDBHost121</credName> <credOwner>sysman</credOwner> </dbHostCredRef> <directoryPath>/storage/dbr/copyDir_task4Caps</directoryPath> <consolidatedDirectory>true</consolidatedDirectory> <replays> <taskName>myTask</taskName> <replay> <nameInEm>myNewConsTrial_1</nameInEm> <nameInTarget>myNewConsTrial_1</nameInTarget> </replay> </replays> </cliImportData>
Format - Standard Mode
emcli import_replays [-input_file="template:<input file path>"] [-all] [-format="[name:<pretty|script|csv>];[column_separator:"column_sep_string"];[row_separator:"row_sep_string"]"] [ ] indicates that the parameter is optional.
Format - Interactive or Script Mode
import_replays( [input_file="template:<input file path>"] [,all=True/False] [,format="[name:<pretty|script|csv>];[column_separator:"column_sep_string"];[row_separator:"row_sep_string"]"] ) [ ] indicates that the parameter is optional.
Options
-
input_file
Fully qualified path to an XML file containing parameters for the verb.
-
all
Imports all replays into the Enterprise Manager repository. No names need to be specified in the XML input file unless there is a naming conflict with a preexisting Enterprise Manager replay.
-
format
Specifies how the output is formatted. The default value is "name:pretty". You can use the parameter in the following ways:
-
-format="name:pretty" Prints the output table in a readable format not intended to be parsed by scripts.
-
-format="name:script" Sets the default column separator to a tab and the default row separator to a newline in the output. You can override the column and row separator strings with your own values.
-
-format="name:script;column_separator:<column_sep_string>" Causes the verb output to be column-separated by <column_sep_string>. Rows are separated by the newline character.
-
-format="name:script;row_separator:<row_sep_string>" Causes the verb output to be row-separated by <row_sep_string>. Columns are separated by the tab character.
-
-format="name:script;column_separator:<column_sep_string>;row_separator:<row_sep_string>" Causes the verb output to be column-separated by <column_sep_string> and row-separated by <row_sep_string>.
-
-format="name:csv" Sets the default column separator to a comma and the default row separator to a newline in the output.
-
Exit Codes
0 if successful. A non-zero value indicates that verb processing was unsuccessful.
Output
Output Columns: EM Entity Name, Entity Name, Database Name, Start Time, Import Status
Examples
Example 1 - Standard Mode
The following example imports all replays from a directory into the Enterprise Manager repository.
emcli import_replays -all -input_file=template:/storage/xml/importReplay_capture121_5Mins.xml
Example 2 - Interactive or Script Mode
The following example imports all replays from a directory into the Enterprise Manager repository.
import_replays(all=True, input_file="template:/storage/xml/importReplay_capture121_5Mins.xml" )
Example 3 - Standard Mode
The following example imports replays from a directory into the Enterprise Manager repository. Only those replays specifically named in the XML input file are imported.
emcli import_replays -input_file=template:/storage/xml/importReplay_capture121_5Mins.xml
Example 4 - Interactive or Script Mode
The following example imports replays from a directory into the Enterprise Manager repository. Only those replays specifically named in the XML input file are imported.
import_replays(input_file="template:/storage/xml/importReplay_capture121_5Mins.xml" )
See Also