通过sqlplus查看show sga的语句

[oracle@centos6 11.2.0]$ which sqlplus
/u01/app/oracle/product/11.2.0/bin/sqlplus
[oracle@centos6 11.2.0]$ strings /u01/app/oracle/product/11.2.0/bin/sqlplus #查看二进制文件
/lib64/ld-linux-x86-64.so.2
libsqlplus.so #链接库文件
saficxa
afidrv
_Jv_RegisterClasses
__gmon_start__
libclntsh.so.11.1
__intel_new_proc_init
_fini
libnnz11.so
libdl.so.2
libm.so.6
libpthread.so.0
libnsl.so.1
libc.so.6
__libc_start_main
_edata
__bss_start
_end
/u01/app/oracle/product/11.2.0/lib
GLIBC_2.2.5
fff.
fffff.
l$ L
t$(L
|$0H
[oracle@centos6 11.2.0]$ cd $ORACLE_HOME
[oracle@centos6 11.2.0]$ find . -name "libsqlplus.so"
./lib/libsqlplus.so
[oracle@centos6 11.2.0]$ cd lib
[oracle@centos6 lib]$ ls libsqlplus.so
libsqlplus.so
[oracle@centos6 lib]$ vim libsqlplus.so #通过搜索SGA即可得到show sga的sql语句

与show sga比较:

sys@ORCL> SELECT DECODE(null,'','Total System Global Area','') NAME_COL_PLUS_SHOW_SGA,   SUM(VALUE), DECODE (null,'', 'bytes','') units_col_plus_show_sga FROM V$SGA    UNION ALL    SELECT NAME NAME_COL_PLUS_SHOW_SGA , VALUE,    DECODE (null,'', 'bytes','') units_col_plus_show_sga FROM V$SGA;

NAME_COL_PLUS_SHOW_SGA   SUM(VALUE) UNITS_COL_PLUS_
------------------------ ---------- ---------------
Total System Global Area  776646656 bytes
Fixed Size                  2257272 bytes
Variable Size             524291720 bytes
Database Buffers          247463936 bytes
Redo Buffers                2633728 bytes

5 rows selected.

sys@ORCL> show sga

Total System Global Area  776646656 bytes
Fixed Size                  2257272 bytes
Variable Size             524291720 bytes
Database Buffers          247463936 bytes
Redo Buffers                2633728 bytes


你可能感兴趣的:(通过sqlplus查看show sga的语句)