Tuesday, April 8, 2008

Different Oracle Database Status and Active State.

Status:
1)Started:
When you issue startup nomount then the status of database is nomount stage. In this case oracle database instance just read pfile/spfile parameter and allocate instance memory.

2)Mounted: When you issue startup mount then the status of database is mount stage.In this case oracle database starts an instance and mounts the database, but leaves the database closed. However you need to do in mount state to perform specific maintenance operations.(Such as archive mode and recovery)

3)Open: When you issue alter database open then the status of database is open stage.After executing this statement, any valid Oracle Database user with the CREATE SESSION system privilege can connect to the database.

4)Open Migrate: After ALTER DATABASE OPEN {UPGRADE | DOWNGRADE}

To see these status issue,
SQL>SELECT STATUS FROM V$INSTANCE;

Database Active State:
1)NORMAL:
Indicates the database is in a normal state.

2)QUIESCING: Indicates that the ALTER SYSTEM QUIESCE RESTRICTED statement has been issued: no new user transactions, queries, or PL/SQL statements are processed in this instance. User transactions, queries, or PL/SQL statements issued before the ALTER SYSTEM QUIESCE RESTRICTED statement are unaffected. DBA transactions, queries, or PL/SQL statements are also unaffected.


3)QUIESCED:
indicates that the ALTER SYSTEM QUIESCE RESTRICTED statement has been issued: no user transactions, queries, or PL/SQL statements are processed. DBA transactions, queries, or PL/SQL statements are unaffected. User transactions, queries, or PL/SQL statements issued after the ALTER SYSTEM QUIESCE RESTRICTED statement are not processed.

To see these status issue,
SQL>SELECT ACTIVE_STATE FROM V$INSTANCE;

Database Status:
1)SUSPENDED:
The ALTER SYSTEM SUSPEND statement halts all input and output (I/O) to datafiles (file header and file data) and control files. The suspended state lets you back up a database without I/O interference. When the database is suspended all preexisting I/O operations are allowed to complete and any new database accesses are placed in a queued state.

2)ACTIVE: Use the ALTER SYSTEM RESUME statement to resume normal database operations.

All these can be seen by issuing the following commands,

SQL> select status, active_state, database_status from v$instance;

Database Open Mode:
1)Read Only:
Opening a database in read-only mode enables you to query an open database while eliminating any potential for online data content changes.
The following statement opens a database in read-only mode:

ALTER DATABASE OPEN READ ONLY;


2)Read Write: Open a database in read/write mode as follows:
ALTER DATABASE OPEN READ WRITE;
However, read/write is the default mode.

This opening mode can be shown from,

SQL>select open_mode from v$database;

No comments:

Post a Comment