Transporting Automatic Workload Repository Data
To extract AWR data:
1. At the SQL prompt, enter:
SQL>
@$ORACLE_HOME/rdbms/admin/awrextr.sql
2. Specify the database from which AWR data
will be extracted:
Enter
value for db_id: 1377863381
3. Specify the number of days for which you
want to list snapshot IDs.
Enter
value for num_days: 2
4. Define the range of snapshots for which AWR
data will be extracted by specifying a beginning and ending snapshot ID:
Enter value for begin_snap: 30
Enter
value for end_snap: 40
5. Specify the directory object pointing to
the directory where the export dump file will be stored:
Enter
value for directory_name: DATA_PUMP_DIR
6. Specify a prefix for the name of the export
dump file (the .dmp suffix will be automatically appended):
Enter value for file_name: awrdata_30_40
To
load AWR data:
1. At the SQL prompt, enter:
Sql>
@$ORACLE_HOME/rdbms/admin/awrload.sql
2. Specify the directory object pointing to
the directory where the export dump file is located:
Enter
value for directory_name: DATA_PUMP_DIR
3. Specify a prefix for the name of the export
dump file (the .dmp suffix will be automatically appended):
Enter
value for file_name: awrdata_30_40
4. Specify the name of the staging schema
where AWR data will be loaded:
Enter value for schema_name: AWR_STAGE
NOTE:
a staging schema namedAWR_STAGE will be created where AWR data will be loaded.
5. Specify the default tablespace for the
staging schema:
Enter
value for default_tablespace: SYSAUX
6. Specify the temporary tablespace for the
staging schema:
Enter
value for temporary_tablespace: TEMP
NOTE: A
staging schema named AWR_STAGE will be created where AWR data will be loaded.
After AWR data is loaded into the AWR_STAGE schema, the data will be
transferred into AWR tables in the SYSschema. After AWR data is loaded, the
staging schema will be dropped automatically.
Comments
Post a Comment