Oracle9i startup and close

xiaoxiao2021-03-06  96

First, start

Syntax: Startup [Force] [Pfile = File Name] [EXCLUSIVE | Shared] [MOUNT Database Name | Normal Database Name] [NOMOUNT]

1, start normal:

SQL> CONN SYS / SYS AS SYSDBA;

SQL> Startup

You can also specify the database name at startup.

SQL> Startup ORA9

2, installation and non-installation start

The installation startup option is Mount, indicating that the routine only loads the database, and does not open the database; the option to install the startup is Nomount, indicating that only the database site does not load the database, of course, can not be opened.

SQL> Startup Mount - Install startup

SQL> Startup Nomount - Non-installation startup

3, exclusive and shared start

Options for exclusive startups are Exclusive, indicating that only one routine is allowed to use the database; the shared start-up parameters are Shared, indicating that multiple routines are allowed to use the database, and the database is loaded into multiple lives.

4, constraint start

The options that the constraint startup is restrict, which is loaded and turned on when it starts the database, but the database at this time can only be used for database administrators with special permissions, and the general user cannot be connected to the database.

SQL> Startup Restrict

Generally speaking, when the user has CREATE SESSITION permissions, you can join the database, but for the RESTRICT mode, only the user has a RESTRICTED SESSION system authority to be coupled.

To change this in the database run, you can use the alter system command.

SQL> ALTER SYSTEM DISABLE RESSICITED Session;

You can also start the database to start the database in a non-RESTRICT method.

5, forced start

If you encounter some trouble when you start the database normally, or if you don't close the database last time, you cannot close it properly, you can take the forced start, and its option is Force.

Sys users

SQL> Startup force

6, the start of the initialization parameter file

The initialization parameter file is read by the system when the database is started, and some global parameters are set, it does not affect the operation of the database.

SQL> Startup Pfile = D: /oracle/admin/site/pfile/init.ora

Tip: Use ALTER Database to make some start mode conversion, but the type of conversion is very limited, such as opening the database from Mount mode, the following command can be used:

SQL> ALTABASE OPEN;

You can also transfer from the Mount state to a mount status, as shown below:

SQL> ALTABASE MOUNT;

Second, close

1, normal close

Normal Turn off the option for the database is normal. The database will check all the connections before shutting down, and no new user connection is allowed after the command is issued. After waiting for all connections to disconnect, turn off the database, start the database again does not need any Recovery process.

Sys users

SQL> Shutdown Normal;

2, emergency close

This mode is used in some emergency, such as notifying immediately power outage, which requires an emergency to close the database to cope with these situations. The options for this way are immediate, and do not wait for all user disconnections and turn off, but shut down the database.

SQL> Shutdown Immediate;

Once this command is executed, the SQL statement that is currently processed is stopped, then all uncommitted transaction is rolled back, and it is not waiting for the user disconnected by the user from the database, but is forcibly connected by the system. open. When you start the database next time, you should perform a recovery action, but you don't have to know it by the system automatically. 3, abnormal shutdown

The abnormality shutdown option is Abort, and the system does not do any check and disconnect the user operation and the return operation, but directly cancel the database on site, so that the database data in the site is of course invalid, the database is naturally Shut down.

SQL> Shutdown Abort;

Only one line of closing information is turned off in an Abort method to turn off the database site. The restore action must be made when the database closed by the Abort mode is started. These recovery operations are also the system automatically to complete, and the time takes longer.

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

New Post(0)