1、su – oracle 不是必需,适合于没有DBA密码时使用,可以不用密码来进入sqlplus界面。 2、sqlplus /nolog 或sqlplus system/manager 或./sqlplus system/manager@ora9i; 3、SQL>connect / as sysdba ;(as sysoper)或 connect internal/oracle AS SYSDBA ;(scott/tiger) conn sys/change_on_install as sysdba...
通过以上信息可以看到,sys用户通过本地sqlplus登陆,执行updata语句。 但有时候会发现,明明active的空间已经很大,但是v$transaction却查不到,需要关注死事务的产生。 4. 死事务的查询 http://blog.itpub.net/22034023/viewspace-710505/ 死事务出现在异常关闭数据库或者事务进程不正常结束,比如KILL -9,shutdown ...
Sql>@ ?sqlplusadminhelphlpbld.sql ?sqlplusadminhelphelpus.sql Sql>help index 33.显示sql*plus系统变量的值或sql*plus环境变量的值 Syntax SHO[W] option where option represents one of the following terms or clauses: system_variable ALL BTI[TLE] ERR[ORS] [{FUNCTION|PROCEDURE|PACKAGE|PACKAGE BODY...
@ or sp :Run sqlplus script in embbed mode with the same login Settings set instance :Auto-limit the instance regarding to any SQL that references the gv$/x$/dba_hist views set container :Auto-limit the container ID regarding to any SQL that references the views that have the con_id ...
sqlplus / as sysdba<<EOFstartupexitEOF}started=`ps -ef|grep pmon|grep -v grep|awk '{print $2}'`test -z"$started"&& startup>>/dev/null sleep 5prolist=`ps -ef|grep ora|egrep -v 'bash|s[uh]|ps|grep|more|sleep|awk|LOCAL|sysdba|log' |awk '{print $NF}'`#echo $prolistfori...
6. 使用SQLPLUS连接上数据库后,进行hanganalyze、system state dump等操作;或检查等待事件、异常会话等正在执行的SQL等待。 7. 找到故障产生的原因,如果暂时找不到原因,尽量收集数据。 8.确良如果应用急须恢复,可通过Kill会话、重启数据库实例等方式,先恢复应用。
[oracle@CentOS~]$ sqlplus / as sysdba SQL> select status from v$instance; 六、Oracle开机自启动设置 1、修改/data/oracle/product/11.2.0/bin/dbstart [oracle@CentOS~]$ vi /data/oracle/product/11.2.0/bin/dbstart 将ORACLE_HOME_LISTNER=
sqlplus / as sysdba ``` b. 执行ALTER SYSTEM命令解锁用户账号: ``` ALTER SYSTEM UNLOCK USER '<username>'; ``` 5. 使用DBMS_LOCK.SLEEP函数解锁用户账号 DBMS_LOCK.SLEEP函数可以用来解锁用户账号,具体步骤如下: a. 使用sysdba权限登录到数据库: ``` sqlplus / as sysdba ``` b. 执行DBMS_LOCK.SL...
$sqlplus-prelim/assysdba<==当数据库已经很慢或者hang到无法连接SQL>oradebug setmypidSQL>oradebug unlimit;SQL>oradebug dump hanganalyze3等1~2分钟SQL>oradebug dump hanganalyze3等1~2分钟SQL>oradebug dump hanganalyze3SQL>oradebug tracefile_name;==>这是生成的文件名 ...
The maximum sleep interval is 120 seconds. SCRIPT Runs the SQLcl statements in the specified script. STA[RT] { url | file_name[.ext] } [arg ...] Runs the SQLcl statements in the specified script. The script can be called from the local file system or a web server. You can...