Home > Database > Mysql Tutorial > Oracle数据库的十种重新启动步骤

Oracle数据库的十种重新启动步骤

WBOY
Release: 2016-06-07 18:07:20
Original
978 people have browsed it

本文详细的介绍了Oracle数据库较好的十种重新启动步骤

1. 停应用层的各种程序。
  2. 停oralce的监听进程:
  $lsnrctl stop
  3. 在独占的系统用户下,备份控制文件:
  SQL>alter database backup controlfile to trace;
  4. 在独占的系统用户下,手工切换重作日志文件,确保当前已修改过的数据存入文件:
  SQL>alter system switch logfile;
  5. 在独占的系统用户下,运行下面SQL语句,生成杀数据库用户连接的kill_all_session.sql文件:
  set head off;
  set feedback off;
  set newpage none;
  spool /oracle_backup/bin/kill_all_session.sql
  select 'alter system kill session '''||sid||',
  '||serial#||''';' from v$session where username is not null;
  spool off;
  6. 在独占的系统用户下,执行杀数据库用户连接的kill_all_session.sql文件:
  SQL>@/oracle_backup/bin/kill_all_session.sql
  7. 在独占的系统用户下,用immediate方式关闭数据库:
  SQL>shutdown immediate;
  或者
  SVRMGRL>shutdown immediate;
  8. 启动oralce的监听进程:
  $lsnrctl start
  9. 进入独占的系统用户下,启动oralce数据库:
  $sqlplus /nolog
  SQL>connect / as sysdba
  SQL>startup;
  或者:
  $svrmgrl
  SVRMGRL>connect internal;
  SVRMGRL>startup;
  10.启动应用层的各种程序。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template