EXPIMP--從實驗中來看exp,imp之間的規則
8.1.7.0 9.2.0.1 8.1.7.0 成功 8.1.7.0 成功
8.1.7.0 9.2.0.1 8.1.7.0 成功 9.2.0.1 成功
8.1.7.0 9.2.0.1 9.2.0.1 失败(ORA-00942)
9.2.0.1 8.1.7.0 8.1.7.0 成功 9.2.0.1 失败(ORA-00942、IMP-00023)
9.2.0.1 8.1.7.0 9.2.0.1 成功 8.1.7.0 失败(IMP-00010)
9.2.0.1 8.1.7.0 9.2.0.1 成功 9.2.0.1 失败(ORA-00942、IMP-00023)
8.1.7.0 8.1.7.0 8.1.7.0 成功 9.2.0.1 失败(ORA-00942、IMP-00023)
8.1.7.0 8.1.7.0 9.2.0.1 失败(ORA-00942)
9.2.0.1 9.2.0.1 8.1.7.0 成功 9.2.0.1 成功
9.2.0.1 9.2.0.1 9.2.0.1 成功 8.1.7.0 失败(IMP-00010)
9.2.0.1 9.2.0.1 9.2.0.1 成功 9.2.0.1 成功
2、 exp工具的版本应该与源数据库和目标数据库中版本最低的一个相一致;
原文地址:http://vongates.itpub.net/post/2553/35118
HOWTO--如何在10g不支持的Linux版本安装10g
1). 在运行runInstaller 時加上(-ignoreSysPrereqs)flag來跳过检查.
2). 修改/etc/redhat-release文件:(以RHEL3為例)
安装完毕,再恢復到原來的版本:#su - root #cp /etc/redhat-release /etc/redhat-release.backup #cat > /etc/redhat-release << EOF Red Hat Enterprise Linux AS release 3 (Taroon) EOF
#su - root #cp /etc/redhat-release.backup /etc/redhat-release
這是Fenng第一次提到的
我们可以去修改Oracle 的install/oraparam.ini文件:
Linux=redhat-2.1,UnitedLinux-1.0,redhat-3
Linux=redhat-2.1,UnitedLinux-1.0,redhat-3
TEMP_SPACE=80
SWAP_SPACE=150
MIN_DISPLAY_COLORS=256
TEMP_SPACE=80
SWAP_SPACE=150
MIN_DISPLAY_COLORS=256
TEMP_SPACE=80
SWAP_SPACE=150
MIN_DISPLAY_COLORS=256
HOWTO--讓Linux下的oracle自動啟動
修改/etc/oratab将
*:/opt/oracle/product/9.2:N
orcl:/opt/oracle/product/9.2:N
修改为Y
root身份
#vi /etc/rc.local 加入
su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'
SQL--收集网上的一些精妙的SQL的例子(ZT)
SQL: select * into b from a where 1<>1
SQL: insert into b(a, b, c) select d,e,f from b;
SQL: select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b
SQL: select a.a, a.b, a.c, b.c, b.d, b.f from a LEFT OUT JOIN b ON a.a = b.c
SQL: select * from 日程安排 where datediff('minute',f开始时间,getdate())>5
SQL: delete from info where not exists ( select * from infobz where info.infid=infobz.infid )
SQL:
SELECT A.NUM, A.NAME, B.UPD_DATE, B.PREV_UPD_DATE
FROM TABLE1,
(SELECT X.NUM, X.UPD_DATE, Y.UPD_DATE PREV_UPD_DATE
FROM (SELECT NUM, UPD_DATE, INBOUND_QTY, STOCK_ONHAND
FROM TABLE2
WHERE TO_CHAR(UPD_DATE, 'YYYY/MM') =
TO_CHAR(SYSDATE, 'YYYY/MM')) X,
(SELECT NUM, UPD_DATE, STOCK_ONHAND
FROM TABLE2
WHERE TO_CHAR(UPD_DATE, 'YYYY/MM') =
TO_CHAR(TO_DATE(TO_CHAR(SYSDATE, 'YYYY/MM') || '/01',
'YYYY/MM/DD') - 1,
'YYYY/MM')) Y,
WHERE X.NUM = Y.NUM
(+)
AND X.INBOUND_QTY + NVL(Y.STOCK_ONHAND, 0) <> X.STOCK_ONHAND) B
WHERE A.NUM = B.NUM
从数据库中去一年的各单位电话费统计(电话费定额贺电化肥清单两个表来源)
SELECT a.userper, a.tel, a.standfee, TO_CHAR(a.telfeedate, 'yyyy') AS telyear,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '01', a.factration)) AS JAN,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '02', a.factration)) AS FRI,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '03', a.factration)) AS MAR,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '04', a.factration)) AS APR,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '05', a.factration)) AS MAY,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '06', a.factration)) AS JUE,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '07', a.factration)) AS JUL,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '08', a.factration)) AS AGU,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '09', a.factration)) AS SEP,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '10', a.factration)) AS OCT,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '11', a.factration)) AS NOV,
SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '12', a.factration)) AS DEC
FROM (SELECT a.userper, a.tel, a.standfee, b.telfeedate, b.factration
FROM TELFEESTAND a, TELFEE b
WHERE a.tel = b.telfax) a
GROUP BY a.userper, a.tel, a.standfee, TO_CHAR(a.telfeedate, 'yyyy')
SELECT (CASE WHEN EXISTS(SELECT * FROM Handle b WHERE b.HandleID = 1) THEN MIN(HandleID) + 1 ELSE 1 END) as HandleID
FROM Handle
WHERE NOT HandleID IN (SELECT a.HandleID - 1 FROM Handle a)
EXP-IMP--在8i中的中文说明
在用户 / 口令之后的命令:
的运行方式。要指定参数,您可以使用关键字:
实例: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
或 TABLES=(T1: P1,T1: P2),如果 T1 是分区表
--------------------------------------------------------------------------
USERID 用户名/口令 FULL 导出整个文件 (N)
BUFFER 数据缓冲区的大小 OWNER 所有者用户名列表
FILE 输出文件 (EXPDAT.DMP) TABLES 表名列表
COMPRESS 导入一个范围 (Y) RECORDLENGTH IO 记录的长度
GRANTS 导出权限 (Y) INCTYPE 增量导出类型
INDEXES 导出索引 (Y) RECORD 跟踪增量导出 (Y)
ROWS 导出数据行 (Y) PARFILE 参数文件名
CONSTRAINTS 导出限制 (Y) CONSISTENT 交叉表一致性
LOG 屏幕输出的日志文件 STATISTICS 分析对象 (ESTIMATE)
DIRECT 直接路径 (N) TRIGGERS 导出触发器 (Y)
FEEDBACK 显示每 x 行 (0) 的进度
FILESIZE 各转储文件的最大尺寸
QUERY 选定导出表子集的子句
TRANSPORT_TABLESPACE 导出可传输的表空间元数据 (N)
TABLESPACES 将传输的表空间列表
跟有您的用户名 / 口令的命令:
按照不同参数。要指定参数,您可以使用关键字:
实例: IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
或 TABLES=(T1: P1,T1: P2),如果 T1 是分区表
--------------------------------------------------------------------------
USERID 用户名/口令 FULL 导入整个文件 (N)
BUFFER 数据缓冲区大小 FROMUSER 所有人用户名列表
FILE 输入文件 (EXPDAT.DMP) TOUSER 用户名列表
SHOW 只列出文件内容 (N) TABLES 表名列表
IGNORE 忽略创建错误 (N) RECORDLENGTH IO 记录的长度
GRANTS 导入权限 (Y) INCTYPE 增量导入类型
INDEXES 导入索引 (Y) COMMIT 提交数组插入 (N)
ROWS 导入数据行 (Y) PARFILE 参数文件名
LOG 屏幕输出的日志文件 CONSTRAINTS 导入限制 (Y)
DESTROY 覆盖表空间数据文件 (N)
INDEXFILE 将表/索引信息写入指定的文件
SKIP_UNUSABLE_INDEXES 跳过不可用索引的维护 (N)
ANALYZE 执行转储文件中的 ANALYZE 语句 (Y)
FEEDBACK 显示每 x 行 (0) 的进度
TOID_NOVALIDATE 跳过指定类型 id 的校验
FILESIZE 各转储文件的最大尺寸
RECALCULATE_STATISTICS 重新计算统计值 (N)
TRANSPORT_TABLESPACE 导入可传输的表空间元数据 (N)
TABLESPACES 将要传输到数据库的表空间
DATAFILES 将要传输到数据库的数据文件
TTS_OWNERS 拥有可传输表空间集中数据的用户
英文版的STATSPACK Readme
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TABLE OF CONTENTS
-----------------
1. Configuration
1.1. Database space Requirements
1.2. Installing the Tool
1.3. Errors during Installation
2. Gathering data - taking a snapshot
2.1. Automating Statistics Gathering
2.2. Using dbms_job
3. Running a Performance report
3.1. Running the report
3.2. Gathering optimizer statistics on the PERFSTAT schema
4. Configuring the amount of data captured
4.1. Snapshot Level
4.2. Snapshot SQL thresholds
4.3. Changing the default values
4.4. Snapshot Levels - details
4.5. Specifying a Session Id
4.6. Input Parameters for the SNAP and
MODIFY_STATSPACK_PARAMETERS procedures
5. Time Units used for Wait events
6. Event Timings
7. Managing and Sharing performance data
7.1. Sharing data via export
7.2. Purging/removing unnecessary data
7.3. Removing all data
8. New and Changed Features
9. Upgrading from earlier releases
10. OPS specific considerations
11. Conflicts and differences compared to UTLBSTAT/UTLESTAT
11.1. Running BSTAT/ESTAT in conjunction to Statspack
11.2. Differences between Statspack and BSTAT/ESTAT
12. Removing the package
13. Supplied Scripts Overview
14. Limitations and Modifications
14.1. Limitations
14.2. Modifications
----------------
baseline for later comparison when the system is running poorly. Without
a baseline data point, it becomes very difficult to identify what the new
problem is attributable to: Has the volume of transactions on the system
increased? Has the transaction profile or application changed? Has the
number of users increased?
tuning scripts by collecting more information, and also by storing the
performance statistics data permanently in Oracle tables, which can later
be used for reporting and analysis. The data collected can be analyzed
using the report provided, which includes an "instance health and load"
summary page, high resource SQL statements, as well as the traditional
wait events and initialization parameters.
in the following ways:
tuning, such as cache hit ratios, per transaction and per
second statistics (many of these ratios must be calculated
manually when using BSTAT/ESTAT)
instead of creating/dropping tables each time, data is inserted
into the pre-existing tables. This makes historical data
comparisons easier
Data is collected when a 'snapshot' is taken; viewing the data
collected is in the hands of the performance engineer when he/she
runs the performance report
OS utility
NOTE: The term 'snapshot' is used to denote a set of statistics gathered
at a single time, identified by a unique Id which includes the
snapshot number (or snap_id). This term should not be confused
with Oracle's Snapshot Replication technology.
How does STATSPACK work?
collection, automation, storage and viewing of performance data. A user
is automatically created by the installation script - this user, PERFSTAT,
owns all objects needed by this package. This user is granted limited
query-only privileges on the V$views required for performance tuning.
'snapshot' is the term used to identify a single collection of
performance data. Each snapshot taken is identified by a 'snapshot id'
which is a unique number generated at the time the snapshot is taken;
each time a new collection is taken, a new snap_id is generated.
(instance_number) comprise the unique key for a snapshot (using this
unique combination allows storage of multiple instances of an OPS
database in the same tables).
The performance report will prompt for the two snapshot id's the report
will process. The report produced calculates the activity on the instance
between the two snapshot periods specified, in a similar way to the
BSTAT/ESTAT report; to compare - the first snap_id supplied can be
considered the equivalent of running BSTAT; the second snap_id
specified can be considered the equivalent of ESTAT. Unlike BSTAT/ESTAT
which can by it's nature only compare two static data points, the report
can compare any two snapshots specified.
-----------------
based on the frequency of snapshots, the size of the database and instance,
and the amount of data collected (which is configurable).
It is therefore difficult to provide general storage clauses and space
utilization predictions which will be accurate at each site.
tables and indexes which contain changeable data. The minimum
default tablespace requirement is approximately 45MB.
If you install the package in a dictionary-managed tablespace, Oracle
suggests you monitor the space used by the objects created, and adjust
the storage clauses of the segments, if required.
If you install the package in a locally-managed tablespace, storage
clauses are not required, as the storage?characteristics are
automatically managed.
This step creates the PERFSTAT user, w?ich will own all PL/SQL code and
database objects created (including the STATSPACK tables, constraints
and the STATSPACK package).
user's default and temporary tablespaces.
objects (such as tables and indexes). The temporary tablespace
will be used for sort-type activities (for more information on
temporary tablespaces, see the Oracle Concepts Documentation).
o Oracle do not recommend using the SYSTEM tablespace to store
statistics data. A more appropriate tablespace is the TOOLS
tablespace.
Similarly, do not use the SYSTEM tablespace as the Statspack
user's TEMPORARY tablespace.
PL/SQL packages are created. dbms_shared_pool is used to
pin the Statspack package in the shared pool; dbms_job
is created on the assumption the DBA will want to schedule
periodic snapshots automatically using dbms_job.
rdbms/admin directory, or fully specify the ORACLE_HOME/rdbms/admin
directory when calling the installation script, spcreate.
a user with SYSDBA privilege. Do not use Server Manager (svrmgrl)
to install Statspack, as the installation will fail.
on Unix:
SQL> connect / as sysdba
SQL> @?/rdbms/admin/spcreate
SQL> connect / as sysdba
SQL> @%ORACLE_HOME%rdbmsadminspcreate
The spcreate install script runs 3 other scripts - you do not need to
run these - the scripts are called automatically:
1. spcusr -> creates the user and grants privileges
2. spctab -> creates the tables
3. spcpkg -> creates the package
spctab.lis, spcpkg.lis) by the installation to ensure no
errors were encountered, before continuing on to the next step.
shown above), or in "batch" mode; batch mode is useful when you do
not wish to be prompted for the PERFSTAT user's default and
temporary tablespaces.
Batch mode installation
~~~~~~~~~~~~~~~~~~~~~~~
To install in batch mode, you must assign values to the SQL*Plus
variables which specify the default and temporary tablespaces before
running spcreate.
default_tablespace -> for the default tablespace
temporary_tablespace -> for the temporary tablespace
on Unix:
SQL> connect / as sysdba
SQL> define default_tablespace='tools'
SQL> define temporary_tablespace='temp'
SQL> @?/rdbms/admin/spcreate
Step 2.
The setup phase is now complete.
If you wish to, you may decide to change the password of the
PERFSTAT user for security purposes.
script from Server Manager (svrmgrl) rather than from SQL*Plus. If you
use svrmgrl, the installation will fail. To correctly install Statspack
after such errors, first run the de-install script, then the install
script. Both scripts must be run from SQL*Plus.
SQL> @spdrop
SQL> @spcreate
---------------------------------------
as the PERFSTAT user, and execute the procedure statspack.snap:
e.g.
SQL> connect perfstat/perfstat
SQL> execute statspack.snap;
you wish to collect data for.
in the STATSPACK tables, and can be used as a baseline snapshot
for comparison with another snapshot taken at a later time.
to true; this way, Statspack data collected will include important timing
information. The timed_statistics parameter is also dynamically changable
using the 'alter system' command. Timing data is important and is usually
required by Oracle support to diagnose performance problems.
2.1 Automating statistics gathering
year to the next, there must be multiple snapshots taken over a period
of time.
a regular time interval. It is possible to do this:
schedule the snapshots
NT) to schedule the snapshot
2.2. Using dbms_job
dbms_job. A sample script on how to do this is supplied in spauto.sql,
which schedules a snapshot every hour, on the hour.
system's OLTP and/or batch peak loads. For example take snapshots at 9am,
10am, 11am, 12 midday and 6pm for the OLTP load, then a snapshot at
12 midnight and another at 6am for the batch window.
initialization parameter must be set to greater than 0 in the init.ora
file for the job to be run automatically.
# Set to enable the job queue process to start. This allows dbms_job
# to schedule automatic statistics collection using STATSPACK
job_queue_processes=1
be run once on each instance in the cluster. Similarly, the
job_queue_processes parameter must also be set for each instance.
Changing the interval of statistics collection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To change the interval of statistics collection use the dbms_job.interval
procedure
e.g.
execute dbms_job.interval(1,'SYSDATE+(1/48)');
1/48 hours (i.e. every half hour).
execute dbms_job.run(<job number>);
execute dbms_job.remove(<job number>);
Manual.
---------------------------------
The SQL script which generates the report prompts for the two snapshot id's
to be processed.
The first will be the beginning snapshot id, the second will be the
ending snapshot id. The report will then calculate and print ratios,
increases etc. for all statistics between the two snapshot periods, in
a similar way to the BSTAT/ESTAT report.
begin snapshot and end snapshot were taken from different
instance startups. In other words, the instance must not have
been shutdown between the times that the begin and end snapshots
were taken.
The reason for this requirement is the database's dynamic
performance tables which Statspack queries to gather the data
are memory resident, hence shutting down the database will
reset the values in the performance tables to 0. As Statspack
subtracts the begin-snapshot statistics from the end-snapshot
statistics, the resulting output will be invalid.
If begin and end snapshots which were taken between shutdowns
are specified in the report, the report shows an appropriate error
to indicate this.
flexibility of basing a report on any data points selected. For example
it may be reasonable for the DBA to use the supplied automation script to
automate data collection every hour on the hour; If at some later point
a performance issue arose which may be better investigated by looking
at a three hour data window rather than an hour's worth of data, the
only thing the DBA need do, is specify the required start point and end
point when running the report.
3.1 Running the report
spreport.sql file is executed while being connected to the PERFSTAT
user. The spreport.sql command file is located in the rdbms/admin
directory of the Oracle Home.
wish to report on.
1. The beginning snapshot Id
2. The ending snapshot Id
3. The name of the report text file to be created
SQL> connect perfstat/perfstat
SQL> @?/rdbms/admin/spreport
SQL> connect perfstat/perfstat
SQL> @%ORACLE_HOME%rdbmsadminspreport
SQL> connect perfstat/perfstat
Connected.
SQL> @spreport
----------- ------------ -------- ------------
2618106428 PRD1 1 prd1
Completed Snapshots
Instance DB Name Id Snap Started Level Comment
------------ ------------ ----- ----------------- ----- ----------------------
prd1 PRD1 1 11 May 2000 12:07 5
2 11 May 2000 12:08 5
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 1
Begin Snapshot Id specified: 1
End Snapshot Id specified: 2
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is sp_1_2 To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name: <press return or enter a new name>
The report will now scroll past, and also be written to the file
specified (e.g. sp_1_2.lis).
Batch mode report generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To run a report without being prompted, assign values to the
SQL*Plus variables which specify the begin snap id, the end snap id
and the report name before running spreport.
begin_snap -> specifies the begin Snapshot Id
end_snap -> specifies the end Snapshot Id
report_name -> specifies the Report output name
on Unix:
SQL> connect perfstat/perfstat
SQL> define begin_snap=1
SQL> define end_snap=2
SQL> define report_name=batch_run
SQL> @?/rdbms/admin/spreport
3.2. Gathering Optimizer statistics on the PERFSTAT schema
for tables and indexes owned by the PERFSTAT. This should be performed
whenever significant change in data volumes in PERFSTAT's tables.
The easiest way to do this, is either to use dbms_utility, or dbms_stats,
and specify the PERFSTAT user:
execute dbms_utility.analyze_schema('PERFSTAT','COMPUTE');
or
execute dbms_stats.gather_schema_stats('PERFSTAT');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
by specifying a different snapshot 'level'. In other words, the level
chosen (or defaulted) will decide the amount of data collected.
The higher the snapshot level, the more data is gathered. The default
level set by the installation is level 5. The various levels are
explained in detail section 4.4 below.
4.2. Snapshot SQL thresholds
snapshot level.
statements; data will be captured on any SQL statements that breach
the specified thresholds.
in the stats$statspack_parameter table.
4.3. Changing the default values for Snapshot Level and SQL Thresholds
snapshots, so that they are tailored to the instance's workload.
database (using statspack.snap, and using the i_modify_parameter
input variable).
(i_snap_level=>10, i_modify_parameter=>'true');
thresholds in the stats$statspack_parameter table; these thresholds
will be used for all subsequent snapshots.
new parameter values would not be saved. Only the snapshot taken at
that point will use the specified values, any subsequent snapshots will
use the preexisting values in the stats$statspack_parameter table.
are listed in 4.6. below
statspack.modify_statspack_parameter procedure. For example to change
the snapshot level to 10, and the SQL thresholds for buffer_gets and
disk_reads, the following statement can be issued:
(i_snap_level=>10, i_buffer_gets_th=>10000, i_disk_reads_th=>1000);
take a snapshot.
modify_statspack_parameter procedure are the same as those for
the snap procedure. These are listed in 4.6. below.
Statistics gathered:
This level and any level greater than 0 collects general
performance statistics, such as: wait statistics, system events,
system statistics, rollback segment data, row cache, SGA,
background events, session events, lock statistics,
buffer pool statistics, parent latch statistics.
This level includes all statistics gathered in the lower level(s),
and additionally gathers the performance data on high resource
usage SQL statements.
to complete is dependant on the shared_pool_size and on the number of
SQL statements in the shared pool at the time the snapshot is taken:
the larger the shared pool, the longer the time taken to complete
the snapshot.
The SQL statements gathered by Statspack are those which exceed one of
four predefined threshold parameters:
- number of executions of the SQL statement (default 100)
- number of disk reads performed by the SQL statement (default 1,000)
- number of parse calls performed by the SQL statement (default 1,000)
- number of buffer gets performed by the SQL statement (default 10,000)
- size of sharable memory used by the SQL statement (default 1m)
- version count for the SQL statement (default 20)
deciding which SQL statements to collect - if a SQL statement's
resource usage exceeds any one of the above threshold values, it
is captured during the snapshot.
The SQL threshold levels used are either those stored in the table
stats$statspack_parameter, or by the thresholds specified when
the snapshot is taken.
This level includes all statistics gathered in the lower levels, and
additionally gathers Parent and Child Latch information. Data gathered
at this level can sometimes cause the snapshot to take longer to complete
i.e. this level can be resource intensive, and should only be used
when advised by Oracle personnel.
4.5. Specifying a Session Id
particular session (in addition to the instance statistics and wait events),
it is possible to specify the session id in the call to Statspack. The
statistics gathered for the session will include session statistics,
session events and lock activity. The default behaviour is to not to
gather session level statistics.
4.6. Input Parameters for the SNAP and MODIFY_STATSPACK_PARAMETERS procedures
statspack.modify_statspack_parameter procedures are as follows:
Parameter Name Valid Values Value Meaning
------------------ ------------ ------- -----------------------------------
i_snap_level 0, 5, 10 5 Snapshot Level
i_ucomment Text Blank Comment to be stored with Snapshot
i_executions_th Integer >=0 100 SQL Threshold: number of times
the statement was executed
i_disk_reads_th Integer >=0 1,000 SQL Threshold: number of disk reads
the statement made
i_parse_calls_th Integer >=0 1,000 SQL Threshold: number of parse
calls the statement made
i_buffer_gets_th Integer >=0 10,000 SQL Threshold: number of buffer
gets the statement made
i_sharable_mem_th Integer >=0 1048576 SQL Threshold: amount of sharable
memory
i_version_count_th Integer >=0 20 SQL Threshold: number of versions
of a SQL statement
i_session_id Valid sid 0 (no Session Id of the Oracle Session
from session) to capture session granular
v$session statistics for
i_modify_parameter True, False False Save the parameters specified for
future snapshots?
-----------------------------------
centiseconds), some timings in the report (especially IO times) are
converted to milliseconds to allow easier comparison with Operating
System monitoring utilities which often report timings in milliseconds.
each timed column. The convention used is:
(cs) - a centisecond - which is 100th of a second
(ms) - a millisecond - which is 1000th of a second
-----------------
If timings are available, the Statspack report will order wait events by time
(in the Top-5 and background and foreground Wait Events sections).
programs set timed_statistics set to true dynamically, the Statspack report
output may look inconsistent, where some events have timings (those which the
individual programs/users waited for), and the remaining events do not.
The Top-5 section will also look unusual in this situation.
ease of diagnosing performance problems.
-----------------------------------------
Support requires the raw statistics), it is possible to export
the PERFSTAT user.
purpose. To use this file, supply the export command with the
userid parameter, along with the export parameter file name.
e.g.
exp userid=perfstat/perfstat parfile=spuexp.par
spuexp.log
command. For more information on using export and import, please
see the Oracle Utilities manual.
7.2. Purging/removing unnecessary data
sppurge.sql. This script deletes snapshots which fall between
the begin and end range of Snapshot Id's specified.
It is recommended you export the schema as a backup before running this
script, either using your own export parameters, or those provided in
spuexp.par
relating each Snapshot Id to be purged will be deleted.
To avoid rollback segment extension errors, explicitly use a large
rollback segment. This can be done by executing the 'set transaction
use rollback segment..' command before running the sppurge.sql script
(for more information on the set transaction command see the SQL reference
manual). Alternatively, to avoid rollback segment extension errors
specify a smaller range of Snapshot Id's to purge.
the available snapshots are displayed. The DBA is then prompted for the
low Snap Id and high Snap Id. All snapshots which fall within this
range will be purged.
script - an example output appears below.
SQL> set transaction use rollback segment rbig;
SQL> @sppurge
========================================
Instance
DB Id DB Nam
944



被折叠的 条评论
为什么被折叠?



