Steps to restart the database

zhaozj2021-02-16  100

1. Detaplency layers of various programs.

2. Stop Oralce's listening process:

$ LSNRCTL STOP

3. Under exclusive system users, back up the control file:

SQL> ALTER DATABASE Backup ControlFile to TRACE;

4. Under exclusive system users, manually switch the re-log file to ensure that the currently modified data is stored in the file:

SQL> ALTER SYSTEM SWITCH LOGFILE;

5. Under exclusive system users, run the following SQL statement, generate the kill_all_session.sql file that killed database users:

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. Under exclusive system users, execute the kill_all_session.sql file that killed database users.

SQL> @ / oracle_backup / bin / kill_all_session.sql

7. Under exclusive system users, use immediate mode to close the database:

SQL> Shutdown Immediate;

or

SVRMGRL> Shutdown Immediate;

8. Launch Oralce's listening process

$ LSNRCTL START

9. Enter the exclusive system user to start an ORAALCE database

$ SQLPLUS / NOLOG

SQL> Connect / as sysdba

SQL> Startup;

or

$ SVRMGRL

SVRMGRL> Connect Internal;

SVRMGRL> Startup;

10. Start the various programs of the application layer.

转载请注明原文地址:https://www.9cbs.com/read-11306.html

New Post(0)