Professional Documents
Culture Documents
** Start the workload replay using the Reporting: Workload Capture and
procedure START_CAPTURE Replay
DBMS_REPLAY_WORKLOAD.START_RE Capture:
PLAY
DBMS_WORKLOAD_REPLAY.GET_CAPT
Data Dictionary Views to monitor URE _INFO(dir)
Replay: DBMS_WORKLOAD_REPLAY.REPORT(c
apture_id,format)
** DBA_WORKLOAD_REPLAYS
** Replay:
DBA_WORKLOAD_REPLAY_DIVERG
ENCE DBMS_WORKLOAD_REPLAY.GET_REPL
** V$WORKLOAD_REPLAY_THREAD AY_INFO(dir)
DBMS_WORKLOAD_REPLAY.REPORT(r
Stopping Workload Replay: eplay_id,format)
DBMS_WORKLOAD_REPLAY.CANCEL_
Temporary
REPLAY Tablespace
CAPTURE – REPLAY – SAME
DATABASE
Enhancements
Steps:
(Oracle 11G)
** Capture Workload
** Preprocess the captured files Temporary Tablespace:
** Create a restore point using the
command “create restore point Temporary tablespaces are used for
pre_replay;” special operations, particularly for
** Start Replay sorting data results on disk. For SQL
** Flashback database to a restore with millions of rows returned, the sort
point using the following commands operation is too large for the RAM area
shutdown immediate and must occur on disk.
startup mount
flashback database to restore **Temporary tablespace is created
point pre_replay when the database is created. Each
alter database open resetlogs
In the Name of “Allah” the most Gracious the most Merciful - Oracle 11G Upgrade for 9i OCPS
Examples:
** SQL Query Result Cache Pool The results for a sql statement can be
** PL/SQL Function Result Cache Pool cached using a hint “result_cache”.
Example:
Size depends on following parameters:
~memory_traget select /*+ result_cache */ *
~sga_target from table_name
where condition ..;
~shared_pool_size
Initialization Parameter:
Recommended sizes:
result_cache_mode=force
0.25 % of ~memory_target
In the Name of “Allah” the most Gracious the most Merciful - Oracle 11G Upgrade for 9i OCPS
DBMS_RESULT_CACHE:
Operations:
** Is the result cache open or closed?
** Statistics of the usage of the result
cache
** Flushing the result cache Result Cache: Dynamic Performance
Views
DBMS_RESULT_CACHE.MEMORY_REP
ORT V$RESULT_CACHE_STATISTICS -
Reports the different memory sizes memory usage statistics and cache
not limited to block size, maximum settings
cache size, maximum result size and V$RESULT_CACHE_OBJECTS - lists all
Total Memory cached objects and their attributes
If result_cache_max_size = 0, the V$RESULT_CACHE_DEPENDENCY
MEMORY_REPORT function tells you V$RESULT_CACHE_MEMORY- shows all
the cache is disabled. memory blocks and their statistics
DBMS_RESULT_CACHE.STATUS V$RESULT_CACHE_OBJECTS
Enabled / Disabled (status of the result Statuses: new, published, expired,
cache) invalid, bypass
PL/SQL Function Result Cache OCI result cache enables client side
It caches the results of the PL/SQL caching of SQL result sets. The OCI
functions in the result cache result cache which is transparent to
component of the SGA. OCI applications, keeps the result data
set consistent with any changes in the
Candidates: Functions that the session attributes or in the database
database invokes frequently but which itself.
depend on the information that
changes infrequently or never. ** performance
** server scalability
The database uses the input The OCI result cache, which is on a
parameters of the function as the per-process basis among multiple
lookup key. client sessions, can use the same
cached results sets.
Creating a cacheable function:
create or replace function The database keeps the client result
function_name return return_param set transparently consistent with
result_cache relies_on (table_name,..) changes on the server.
~oci_result_cache_max_size
~client_result_cache_lag
~oci_result_cache_max_rset_size
~oci_result_cache_max_rset_rows
Mode parameter can take two values: This feature allows getting the data as
wait |no wait of specified time (SCN).
Uses:
Setting up for Flashback
1. Quick Auditing tool without
Transaction Backout:
turning on auditing.
2. Both auditing and flash back are
Pre requisite
written to disk producing I/O.
1. Enable supplemental logging
Auditing is done thru
with primary key logging.
autonomous transaction. But in
case of flashback, flashback
archives are written by special
process called FBDA. (Flash
Back Data Archiver). 2. Grant execute privileges to user
3. You can use cheaper storage for performing flashback
FDA. transaction backout.
In the Name of “Allah” the most Gracious the most Merciful - Oracle 11G Upgrade for 9i OCPS
- Schema Tab
- Select table to execute the
transaction backout.
- Select transaction backout
operation on.
Online Table
Redefinition
The definition of the table can be
changed while it is accessible by the
application users.