Erp100论坛's Archiver

xiangzhao 发表于 2008-7-9 12:51

statspack安装的方式

[font=Times New Roman]statspack[/font][font=宋体]安装有两种方式,一种是交互式安装,即在安装过程中提示输入一些必要的参数,得以完成后续的安装,一种是批处理方式安装,即事先定义[/font][font=Times New Roman]SQL*Plus [/font][font=宋体]变量:[/font][font=Times New Roman]default_tablespace[/font][font=宋体]、[/font][font=Times New Roman]temporary_tablespace[/font][font=宋体],那么在安装过程中将要不会提示输入以上信息。[/font]
[font=宋体]安装脚本位于[/font][font=Times New Roman]$ORACLE_HOME/rdbms/admin[/font][font=宋体]下的[/font][font=Times New Roman]spcreate.sql[/font][font=宋体],这个只针对[/font][font=Times New Roman]Oracle8i[/font][font=宋体]([/font][font=Times New Roman]Oracle8.1.7[/font][font=宋体])以后的产品,对于以前的版本位于[/font][font=Times New Roman]$ORACLE_HOME/rdbms/admin[/font][font=宋体]下的[/font][font=Times New Roman]statscre.sql[/font][font=宋体],安装过程中的日志记录在[/font][font=Times New Roman]$ORACLE_HOME/rdbms/admin[/font][font=宋体]目录下的[/font][font=Times New Roman]spcpkg.lis[/font][font=宋体]文件[/font][font=宋体],[/font][font=宋体]确认是否有错误[/font][font=宋体]。[/font]
[font=宋体]交互式安装步骤如下:[/font]
[font=Times New Roman]Oracle 8.1.6:[/font]
[font=Times New Roman]
on Unix:[/font]
[font=Times New Roman]
SQL>
connect / as sysdba[/font]
[font=Times New Roman]
SQL>
@?/rdbms/admin/statscre[/font]
[font=Times New Roman]                                   [/font]
[font=Times New Roman]
on NT:[/font]
[font=Times New Roman]
SQL>
connect / as sysdba[/font]
[font=Times New Roman]
SQL>
@%ORACLE_HOME%\rdbms\admin\statscre[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]
on VMS[/font]
[font=Times New Roman]
SQL>
connect / as sysdba[/font]
[font=Times New Roman]
SQL>
@ora_rdbms_admin:statscre[/font]
[font=Times New Roman] [/font]
[font=Times New Roman] [/font]
[font=Times New Roman]
Oracle8i 8.1.7 and Oracle9i 9.0.1[/font]
[font=Times New Roman]
on Unix:[/font]
[font=Times New Roman]


SQL>
connect / as sysdba[/font]
[font=Times New Roman]
SQL>
@?/rdbms/admin/spcreate[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]
on NT:[/font]
[font=Times New Roman]
SQL>
connect / as sysdba[/font]
[font=Times New Roman]
SQL>
@%ORACLE_HOME%\rdbms\admin\spcreate[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]
on VMS[/font]
[font=Times New Roman]
SQL>
connect / as sysdba[/font]
[font=Times New Roman]SQL>
@ora_rdbms_admin:spcreate[/font]
[font=宋体]批处理安装步骤如下:[/font]
[font=Times New Roman]
on Unix:[/font]
[font=Times New Roman]
SQL>
connect / as sysdba[/font]
[font=Times New Roman]SQL>
define default_tablespace = ‘tools’[/font]
[font=Times New Roman]SQL>
define temporary_tablespace = ‘temp’[/font]
[font=Times New Roman]SQL>
@?/rdbms/admin/spcreate[/font]
[font=Times New Roman] [/font]
[font=宋体]注:[/font][font=Times New Roman]1[/font][font=宋体]、安装过程中将会创建[/font][font=Times New Roman]perfstat[/font][font=宋体]数据库用户,密码缺省是[/font][font=Times New Roman]perfstat[/font][font=宋体],以后就可以使用这个用户进行搜集数据库的统计信息;[/font]
[font=Times New Roman]2[/font][font=宋体]、不允许指定[/font][font=Times New Roman]system[/font][font=宋体]表空间作为[/font][font=Times New Roman]perfstat[/font][font=宋体]用户的缺省表空间或者临时表空间,建议为之建立两个单独的表空间,大小取决于搜集信息的频率,大小根据实际情况进行调整,使用如下语句监控表空间剩余空间:[/font][font=Times New Roman]select tablespace_name,sum(bytes)/1024/1024 from dba_free_space group by tablespace_name[/font][font=宋体];[/font]
[font=Times New Roman]3[/font][font=宋体]、安装过程中如果报[/font][font=Times New Roman]ORA-1012(not logged)[/font][font=宋体]、[/font][font=Times New Roman]PLS-00201[/font][font=宋体]错误,那么使用卸载功能,之后在重新安装一次。[/font]

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2007 Comsenz Inc.