1)how to get a statspack report?
1@@@@generate the statspack report
@@@
[oracle@station3 admin]$ pwd
/u01/app/oracle/product/10.2.0/db_1/rdbms/admin
[oracle@station3 admin]$ ls spcreate*
spcreate.sql
[oracle@station3 admin]$ sqlplus /nolog
SQL> conn /as sysdba;
Connected.
SQL> create tablespace tbsperfstat datafile size 200M;
Tablespace created.
SQL> alter tablespace temp add tempfile size 200M;
Tablespace altered.
SQL> alter tablespace temp drop tempfile 1;
Tablespace altered.
SQL> @spcreate.sql
Enter value for perfstat_password: oracle1  @@@<==
oracle1
Enter value for default_tablespace: tbsperfstat  @@@<==
Using tablespace TBSPERFSTAT as PERFSTAT default tablespace.
Enter value for temporary_tablespace:    @@@<==
Using tablespace TEMP as PERFSTAT temporary tablepace 

@@@
SQL> conn perfstat/oracle1
Connected.
SQL> exec statspack.snap
SQL> exec statspack.snap
PL/SQL procedure successfully completed.
SQL> @spreport.sql
Instance     DB Name        Snap Id   Snap Started    Level Comment
------------ ------------ --------- ----------------- ----- --------------------
RDBB1        RDBB                 1 18 May 2012 01:45     5
                                  2 18 May 2012 01:48     5

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 1      @@@<==
Begin Snapshot Id specified: 1

Enter value for end_snap: 2       @@@<==
End   Snapshot Id specified: 2

Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is sp_1_2.  To use this name,
press to continue, otherwise enter an alternative.

Enter value for report_name: /home/oracle/test_rac_statspack  @@@<==

@@@supplementary
####begin_1-1#########################################
#!/bin/sh
sqlplus /nolog < conn /as sysdba;
create tablespace tbsperfstat datafile size 200M;
alter tablespace temp add tempfile size 200M;
alter tablespace temp drop tempfile 1;
@?/rdbms/admin/spcreate.sql
oracle1
tbsperfstat
temp
exit
EOF
######end_1-1#########################################

@@@
####begin_1-2#######################################
#!/bin/sh
sqlplus /nolog << EOF
conn perfstat/oracle1
exec statspack.snap
exec statspack.snap
@$ORACLE_HOME/rdbms/admin/spreport.sql
1
2
/home/oracle/test01
exit
EOF
######end_1-2#######################################

[oracle@station3 ~]$ wc -l test01.lst
1398 test01.lst

@@@
@@@uninstall the statspack
sql> @spdrop.sql
sql> drop tablespace tbsperfstat;