Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3386045
  • 博文数量: 631
  • 博客积分: 10716
  • 博客等级: 上将
  • 技术积分: 8397
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 22:35
文章分类

全部博文(631)

文章存档

2020年(2)

2019年(22)

2018年(4)

2017年(37)

2016年(22)

2015年(1)

2013年(12)

2012年(20)

2011年(19)

2010年(20)

2009年(282)

2008年(190)

分类: Oracle

2012-01-20 11:44:39

[root@RAC2 ~]# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 00:12 ?        00:00:00 init [5]                                             
root         2     1  0 00:12 ?        00:00:00 [migration/0]
root         3     1  0 00:12 ?        00:00:00 [ksoftirqd/0]
root         4     1  0 00:12 ?        00:00:00 [events/0]
root         5     4  0 00:12 ?        00:00:00 [khelper]
root         6     4  0 00:12 ?        00:00:00 [kacpid]
root        19     4  0 00:12 ?        00:00:00 [kblockd/0]
root        20     1  0 00:12 ?        00:00:00 [khubd]
root        37     4  0 00:12 ?        00:00:00 [pdflush]
root        38     4  0 00:12 ?        00:00:00 [pdflush]
root        40     4  0 00:12 ?        00:00:00 [aio/0]
root        39     1  0 00:12 ?        00:00:00 [kswapd0]
root       186     1  0 00:12 ?        00:00:00 [kseriod]
root       306     1  0 00:12 ?        00:00:00 [scsi_eh_0]
root       313     1  0 00:12 ?        00:00:00 [scsi_eh_1]
root       345     4  0 00:12 ?        00:00:00 [kmirrord]
root       355     1  0 00:12 ?        00:00:00 [kjournald]
root      1865     1  0 00:12 ?        00:00:00 udevd
root      2095     4  0 00:12 ?        00:00:00 [kauditd]
root      2210     1  0 00:13 ?        00:00:00 [kjournald]
root      2719     1  0 00:13 ?        00:00:00 syslogd -m 0
root      2723     1  0 00:13 ?        00:00:00 klogd -x
rpc       2746     1  0 00:13 ?        00:00:00 portmap
root      2766     1  0 00:13 ?        00:00:00 rpc.statd
root      2795     1  0 00:13 ?        00:00:00 rpc.idmapd
root      3100     1  0 00:13 ?        00:00:00 /usr/sbin/acpid
root      3112     1  0 00:13 ?        00:00:00 cupsd
root      3162     1  0 00:13 ?        00:00:00 /usr/sbin/sshd
root      3177     1  0 00:13 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root      3187     1  0 00:13 ?        00:00:00 gpm -m /dev/input/mice -t imps2
htt       3218     1  0 00:13 ?        00:00:00 /usr/sbin/htt -retryonerror 0
htt       3219  3218  0 00:13 ?        00:00:00 htt_server -nodaemon
root      3229     1  0 00:13 ?        00:00:00 crond
xfs       3254     1  0 00:13 ?        00:00:00 xfs -droppriv -daemon
root      3264     1  0 00:13 ?        00:00:00 anacron -s
root      3273     1  0 00:13 ?        00:00:00 /usr/sbin/atd
dbus      3292     1  0 00:13 ?        00:00:00 dbus-daemon-1 --system
root      3305     1  0 00:13 ?        00:00:00 cups-config-daemon
root      3316     1  0 00:13 ?        00:00:01 hald
oracle    3484     1  0 00:14 ?        00:00:00 /opt/oracle10g/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
oracle    3565     1  0 00:14 ?        00:00:00 ora_pmon_racdb2
oracle    3567     1  0 00:14 ?        00:00:00 ora_psp0_racdb2
oracle    3569     1  0 00:14 ?        00:00:00 ora_mman_racdb2
oracle    3571     1  0 00:14 ?        00:00:00 ora_dbw0_racdb2
oracle    3573     1  0 00:14 ?        00:00:01 ora_lgwr_racdb2
oracle    3575     1  0 00:14 ?        00:00:00 ora_ckpt_racdb2
oracle    3577     1  2 00:14 ?        00:00:05 ora_smon_racdb2
oracle    3579     1  0 00:14 ?        00:00:00 ora_reco_racdb2
oracle    3581     1  0 00:14 ?        00:00:00 ora_cjq0_racdb2
oracle    3583     1  0 00:14 ?        00:00:01 ora_mmon_racdb2
oracle    3585     1  0 00:14 ?        00:00:00 ora_mmnl_racdb2
oracle    3587     1  0 00:14 ?        00:00:00 ora_d000_racdb2
oracle    3589     1  0 00:14 ?        00:00:00 ora_s000_racdb2
oracle    3593     1  0 00:14 ?        00:00:00 ora_arc0_racdb2
oracle    3595     1  0 00:14 ?        00:00:00 ora_arc1_racdb2
oracle    3597     1  0 00:14 ?        00:00:00 ora_arc2_racdb2
oracle    3599     1  0 00:14 ?        00:00:00 ora_qmnc_racdb2
root      3614     1  0 00:14 tty1     00:00:00 /sbin/mingetty tty1
oracle    3682     1  0 00:14 ?        00:00:00 ora_q000_racdb2
root      3726     1  0 00:14 tty2     00:00:00 /sbin/mingetty tty2
root      3727     1  0 00:14 tty3     00:00:00 /sbin/mingetty tty3
root      3728     1  0 00:14 tty4     00:00:00 /sbin/mingetty tty4
root      3729     1  0 00:14 tty5     00:00:00 /sbin/mingetty tty5
root      3930     1  0 00:14 tty6     00:00:00 /sbin/mingetty tty6
root      4031     1  0 00:14 ?        00:00:00 /usr/bin/gdm-binary -nodaemon
root      4032     1  0 00:14 ?        00:00:00 /bin/sh /etc/init.d/init.evmd run
root      4033     1  0 00:14 ?        00:00:00 /bin/sh /etc/init.d/init.cssd fatal
root      4034     1  0 00:14 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run
oracle    4280     1  0 00:14 ?        00:00:00 ora_q001_racdb2
root      4446  4031  0 00:14 ?        00:00:00 /usr/bin/gdm-binary -nodaemon
root      4509  4446  2 00:14 ?        00:00:03 /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
oracle    4594     1 18 00:14 ?        00:00:33 ora_j003_racdb2
gdm       4606  4446  0 00:14 ?        00:00:00 /usr/bin/gdmgreeter
root      4913  3162  0 00:16 ?        00:00:00 sshd:
root      4915  4913  0 00:16 pts/1    00:00:00 -bash
root      5140  4032  0 00:17 ?        00:00:00 /bin/sleep 30
root      5144  4033  0 00:17 ?        00:00:00 /bin/sleep 30
root      5150  4034  0 00:17 ?        00:00:00 /bin/sleep 30
root      5151  4915  0 00:17 pts/1    00:00:00 ps -ef
[root@RAC2 ~]# clear
[root@RAC2 ~]# su - oracle

SQL> desc dba_tables;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OWNER                                     NOT NULL VARCHAR2(30)
 TABLE_NAME                                NOT NULL VARCHAR2(30)
 TABLESPACE_NAME                                    VARCHAR2(30)
 CLUSTER_NAME                                       VARCHAR2(30)
 IOT_NAME                                           VARCHAR2(30)
 STATUS                                             VARCHAR2(8)
 PCT_FREE                                           NUMBER
 PCT_USED                                           NUMBER
 INI_TRANS                                          NUMBER
 MAX_TRANS                                          NUMBER
 INITIAL_EXTENT                                     NUMBER
 NEXT_EXTENT                                        NUMBER
 MIN_EXTENTS                                        NUMBER
 MAX_EXTENTS                                        NUMBER
 PCT_INCREASE                                       NUMBER
 FREELISTS                                          NUMBER
 FREELIST_GROUPS                                    NUMBER
 LOGGING                                            VARCHAR2(3)
 BACKED_UP                                          VARCHAR2(1)
 NUM_ROWS                                           NUMBER
 BLOCKS                                             NUMBER
 EMPTY_BLOCKS                                       NUMBER
 AVG_SPACE                                          NUMBER
 CHAIN_CNT                                          NUMBER
 AVG_ROW_LEN                                        NUMBER
 AVG_SPACE_FREELIST_BLOCKS                          NUMBER
 NUM_FREELIST_BLOCKS                                NUMBER
 DEGREE                                             VARCHAR2(20)
 INSTANCES                                          VARCHAR2(20)
 CACHE                                              VARCHAR2(10)
 TABLE_LOCK                                         VARCHAR2(8)
 SAMPLE_SIZE                                        NUMBER
 LAST_ANALYZED                                      DATE
 PARTITIONED                                        VARCHAR2(3)
 IOT_TYPE                                           VARCHAR2(12)
 TEMPORARY                                          VARCHAR2(1)
 SECONDARY                                          VARCHAR2(1)
 NESTED                                             VARCHAR2(3)
 BUFFER_POOL                                        VARCHAR2(7)
 ROW_MOVEMENT                                       VARCHAR2(8)
 GLOBAL_STATS                                       VARCHAR2(3)
 USER_STATS                                         VARCHAR2(3)
 DURATION                                           VARCHAR2(15)
 SKIP_CORRUPT                                       VARCHAR2(8)
 MONITORING                                         VARCHAR2(3)
 CLUSTER_OWNER                                      VARCHAR2(30)
 DEPENDENCIES                                       VARCHAR2(8)
 COMPRESSION                                        VARCHAR2(8)
 DROPPED                                            VARCHAR2(3)
SQL> select table_name from dba_tables;
 
 
 
 
 
TABLE_NAME
------------------------------
DATA
WRI$_ADV_OBJSPACE_CHROW_DATA
EMPPLOYEES1
EMPPLOYEES
EMP
EMP1
1524 rows selected.
SQL> l
  1* select table_name from dba_tables
SQL> select table_name from dba_tables where table_name like 'd%';
no rows selected
SQL> select * from emp
  2  ;
no rows selected
SQL> select * from emp1;
    DEPTNO DNNAME         LOC
---------- -------------- -------------
        12 it1            cc
        14 it1            cc
        15 it1            cc
SQL> select sql_id from v$sql where sql_text like 'select * from emp1';
SQL_ID
-------------
3g798ttuvu5th
SQL>
SQL> select plan_table_output from table(dbms_xplan.display_cursor('3g798ttuvu5th'));
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
SQL_ID  3g798ttuvu5th, child number 0
-------------------------------------
select * from emp1
Plan hash value: 2226897347
--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |       |       |     2 (100)|          |
|   1 |  TABLE ACCESS FULL| EMP1 |     3 |    30 |     2   (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------

13 rows selected.
SQL> exec dbms_workload_repository.create_snapshot();
PL/SQL procedure successfully completed.
SQL> select sql_id,sql_text from dba_hist_sqltext where sql_id = '3g798ttuvu5th';
no rows selected
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@RAC2 ~]$ exit
logout
[root@RAC2 ~]#
[root@RAC2 ~]#
[root@RAC2 ~]#
[root@RAC2 ~]#
[root@RAC2 ~]# sh stopORA.sh
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 10 00:23:22 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Broadcast message from root (pts/1) (Tue Jan 10 00:23:47 2012):
The system is going down for system halt NOW!
阅读(2759) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~