oracle11g

(1)登录
[root@oracle11g ~]# su - oracle
declare -x CLASSPATH="/opt/oracle/product/OraHome/JRE:/opt/oracle/product/OraHome/jlib:/opt/oracle/product/OraHome/rdbms/jlib:/opt/oracle/product/OraHome/network/jlib"
declare -x CVS_RSH="ssh"
declare -x G_BROKEN_FILENAMES="1"
declare -x HISTSIZE="1000"
declare -x HOME="/home/oracle"
declare -x HOSTNAME="oracle11g"
declare -x INPUTRC="/etc/inputrc"
declare -x JAVA_HOME="/usr/java/jdk1.6.0_30"
declare -x LANG="zh_CN.UTF-8"
declare -x LD_LIBRARY_PATH="/opt/oracle/product/OraHome/lib:/lib:/usr/lib:/usr/local/lib"
declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s"
declare -x LOGNAME="oracle"
declare -x LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"
declare -x MAIL="/var/spool/mail/oracle"
declare -x NLS_LANG="american_america.ZHS16GBK"
declare -x OLDPWD
declare -x ORACLE_BASE="/opt/oracle"
declare -x ORACLE_HOME="/opt/oracle/product/OraHome"
declare -x ORACLE_OWNER="oracle"
declare -x ORACLE_SID="orcl"
declare -x ORACLE_TERM="vt100"
declare -x PATH="/usr/java/jdk1.6.0_30/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/opt/oracle/product/OraHome/bin:/home/oracle/bin:/opt/oracle/product/OraHome/Apache/Apache/bin"
declare -x PWD="/home/oracle"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_ASKPASS="/usr/libexec/openssh/gnome-ssh-askpass"
declare -x TERM="vt100"
declare -x USER="oracle"
[oracle@oracle11g ~]$ 
[oracle@oracle11g ~]$ 
[oracle@oracle11g ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-JAN-2005 15:41:57

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.135)(PORT=1521)))
The command completed successfully
[oracle@oracle11g ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-JAN-2005 15:42:08

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /opt/oracle/product/OraHome/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /opt/oracle/product/OraHome/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/oracle11g/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.135)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.135)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                01-JAN-2005 15:42:10
Uptime                    0 days 0 hr. 0 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /opt/oracle/product/OraHome/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/oracle11g/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.135)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@oracle11g ~]$ 
[oracle@oracle11g ~]$ 
[oracle@oracle11g ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Jan 1 15:42:35 2005

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup
ORACLE instance started.

Total System Global Area  849530880 bytes
Fixed Size                  1339824 bytes
Variable Size             503320144 bytes
Database Buffers          339738624 bytes
Redo Buffers                5132288 bytes
Database mounted.
Database opened.
SQL> 
SQL> 
SQL> 
SQL> 
SQL> 
SQL> 
SQL> select round((1-(pr.value/(bg.value+cg.value)))*100,2) from v$sysstat pr, v$sysstat bg, v$sysstat cg where pr.name='physical reads' and bg.name='db block gets' and cg.name='consistent gets';

ROUND((1-(PR.VALUE/(BG.VALUE+CG.VALUE)))*100,2)
-----------------------------------------------
                                           93.6

(2)
A:
在linux下通过sqlplus连接上oracle后,在SQL->中 后退命令不可用 
看到别人的sqlplus,命令后出现^H,只需在.bash_profile文件末尾添加stty erase ^h即可解决该问题(或者直接执行stty erase ^h)
B:oracle top n
www.itpub.net/thread-415-1-1.html

你可能感兴趣的:(linux)