Wednesday, July 23, 2014

INSTALL STATSPACK in ORACLE

INSTALL STATSPACK in ORACLE

1. create a new tablespace for STATSPACK
create tablespace STATSPACK datafile '/u01/app/oracle/oradata/test/statspack01.dbf' size 100m;

2.check the tablespace is exist/not
select tablespace_name from dba_tablespaces;
select name from v$datafile;

3.Then run the script spcreate.sql from ORACLE_HOME\RDBMS\ADMIN
@?rdbms\admin\spcreate.sql;

it'll ask you the password-----enter SYS PASSWORD
it'll ask you the default tablespace--------enter new TABLESPACE NAME(STATSPACK)
it'll ask you the temp tablespace--------enter temp TABLESPACE NAME(TEMP)


4.Then check the ALL_TABLES fro STATSPACK tables
select table_name from all_tables where table_name like 'STAT%';
select table_name from all_tables where tablespace_name like 'STATSPACK';


5.Now DESCRIBE the tables for detailed information

DESC STATS$DATABASE_INSTANCE
DESC STATS$IDLE_EVENT.........................................etc





No comments:

Post a Comment