(1) 将创建perfstat模式使用什么密码?
(2) Perfstat使用的默认表空间是什么?
(3) Perfstat使用的临时表空间是什么?
:
[oracle@felix ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production onThu Nov 7 10:30:34 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Miningand Real Application Testing options
sys@felixSQL>create tablespace statspackdatafile '/u01/app/oracle/oradata/felix/statspack01.dbf' size 20m autoextend onmaxsize 100m;
Tablespace created.
10:30:58 sys@felix SQL>create temporarytablespace statspacktemp tempfile'/u01/app/oracle/oradata/felix/statspacktemp01.dbf' size 20m autoextend onmaxsize 100m;
Tablespace created.
10:31:37 sys@felix SQL>
1.sqlplus / as sysdba
2.cd $ORACLE_HOME/rdbms/admin
3.找到spcreate.sql,运行
[oracle@felix ~]$ cd $ORACLE_HOME/rdbms/admin
[oracle@felix admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/rdbms/admin
[oracle@felix admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production onThu Nov 7 17:38:58 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Miningand Real Application Testing options
17:38:58 sys@felix SQL>@spcreate
……..
其中三步需要手工输入
(1) 密码:
(2) 默认表空间名称:statspack(刚创建的表空间)
(3) 临时表空间:statspacktemp(刚刚创建的临时表空间)
……
……
……
10:34:42 perfstat@felix SQL>Rem cdialeri 01/09/02 - 9.2 - features 2
10:34:42 perfstat@felix SQL>Rem cdialeri 11/30/01 - 9.2 - features 1
10:34:42 perfstat@felix SQL>Rem hbergh 08/23/01 - 1940915: use substrb onsql_text
10:34:42 perfstat@felix SQL>Rem cdialeri 04/26/01 - 9.0
10:34:42 perfstat@felix SQL>Rem cdialeri 09/12/00 - sp_1404195
10:34:42 perfstat@felix SQL>Rem cdialeri 04/07/00 - 1261813
10:34:42 perfstat@felix SQL>Rem cdialeri 03/28/00 - sp_purge
10:34:42 perfstat@felix SQL>Rem cdialeri 02/16/00 - 1191805
10:34:42 perfstat@felix SQL>Rem cdialeri 11/01/99 - Enhance, 1059172
10:34:42 perfstat@felix SQL>Rem cgervasi 06/16/98 - Remove references to wrqs
10:34:42 perfstat@felix SQL>Rem cmlim 07/30/97 - Modified system events
10:34:42 perfstat@felix SQL>Rem gwood.uk 02/30/94 - Modified
10:34:42 perfstat@felix SQL>Rem densor.uk 03/31/93 - Modified
10:34:42 perfstat@felix SQL>Rem cellis.uk 11/15/89 - Created
10:34:42 perfstat@felix SQL>Rem
10:34:42 perfstat@felix SQL>
10:34:42 perfstat@felix SQL>set echooff;
Creating Package STATSPACK...
Package created.
No errors.
Creating Package Body STATSPACK...
Package body created.
No errors.
NOTE:
SPCPKG complete. Please check spcpkg.lisfor any errors.
配置到此,说明statspack配置已经成功。
但是如果在配置期间出现错误,或者不小心取消了安装,在下一次尝试安装statspack之前应该先用$ORACLE_HOME/rdbms/admin中的spdrop.lis删除用户(PERFSTAT)和已安装的视图,安装statspack会创建一个名为spcpkg.lis的文件。如果出现错误,就应该检查这个文件。
(参考资料:tom《oracle9i/10g/11g编程艺术》)