Use scripts under Linux and turn off Oracle

zhaozj2021-02-16  97

Usually, we need to use SQLUS to connect to Oracle, manually issued commands to start or close Oracle, but under Linux Oracle automatically provides two scripts dbstart and dbshut. Use them to start or close oracle.

To make these two scripts can be executed, we need to make some settings first

1) Modify ORATAB files

VI / ETC / ORATAB

Find the row that contains Oracle_sid and will be the last N.

2) If it is 9i, you need to set the following settings.

SQLPlus "/ as sysdba"

Startup

Create Pfile from SPFILE

Shutdown immediate

Then you can use DBStart directly, dbshut.

Only 9i needs to perform 2) operation, there is a bug in the dbstart script. If the init file is not found, an error is reported (if [-f $ pfile]), but 9i only generates SPFILE, so you need to create a PFile.

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

New Post(0)