11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

42 CHAPTER 1 ■ INSTALLING, UPGRADING, AND MANAGING CHANGEReplaying the WorkloadBefore you start the workload replay, restore the test database so it reflects the same applicationstate as the production database. You must also ensure that all external linkages andobjects such as database links, external tables, directory objects, and URLs present in theproduction system are present in the test system as well. <strong>Oracle</strong> recommends you reset thesystem time on the test replay system to the time when you started the workload capture toavoid invalid data sets when dealing with workloads containing time-sensitive data, as well asto eliminate any potential job-scheduling issues.You may want to start the database you restored in a restricted mode to avoid accidentalchanges to data during the workload replay. Replaying the workload requires several steps,which we summarize in the following sections.Resolving External ReferencesYou must resolve all external references such as database links that are part of the capturedworkload. You must either disable or reconfigure all external references in the workload, ifnecessary, to make them accessible from the test system. These external references includedatabase links, external tables, directory objects, and URLs.Initializing the Replay DataThe next step is to initialize the replay data. Initializing the data, which you perform throughthe initialize_replay procedure, loads the metadata into tables, which will be used by theworkload replay process:SQL> exec dbms_workload_replay.initialize_replay(replay_name =>'test_replay',replay_dir => 'test_dir');The replay_name parameter refers to the name of the replay. The replay_dir parameterpoints to the directory containing the captured workload that you want to replay on the testsystem.Remapping External ConnectionsOnce you initialize the workload data, you can query dba_workload_connection_map to view theconnection mappings, if any external connections were made by the source (production) databaseusers during the workload capture. You must now remap the connection strings that wereutilized during the workload capture so the individual user sessions can connect to the externaldatabases. You remap the external connection strings using the remap_connection procedure.The replay clients must connect to the replay system in order to replay the workload. On singleinstancesystems (not Real Application Clusters), the connection strings between the captureand the replay systems are mapped one-to-one.Here’s how you remap the external connections using the remap_connection procedure:SQL> exec dbms_workload_replay.remap_connection (connection_id => <strong>11</strong>1,replay_connection => 'prod1:1521/mydb');

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!