0% found this document useful (0 votes)
11 views2 pages

Oracle Database Instance Management Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Oracle Database Instance Management Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

C:\oraclexe\app\oracle\product\11.2.

0\server\dbs

desc v$instance ;---> to check instance

SQL> desc v$instance;


Name Null? Type
----------------------------------------- -------- ----------------------------
INSTANCE_NUMBER NUMBER
INSTANCE_NAME VARCHAR2(16)
HOST_NAME VARCHAR2(64)
VERSION VARCHAR2(17)
STARTUP_TIME DATE
STATUS VARCHAR2(12)
PARALLEL VARCHAR2(3)
THREAD# NUMBER
ARCHIVER VARCHAR2(7)
LOG_SWITCH_WAIT VARCHAR2(15)
LOGINS VARCHAR2(10)
SHUTDOWN_PENDING VARCHAR2(3)
DATABASE_STATUS VARCHAR2(17)
INSTANCE_ROLE VARCHAR2(18)
ACTIVE_STATE VARCHAR2(9)
BLOCKED VARCHAR2(3)
EDITION VARCHAR2(7)

-----------------------------------------------------------------------------------
--------------------------------------------------------------

select inatance_name. status from v$instance; -------------> to check DB status.

SQL> select instance_name, status from v$instance;

INSTANCE_NAME STATUS
---------------- ------------
xe OPEN

SQL> select name from v$database;

NAME
---------
XE

-----------------------------------------------------------------------------------
-------------------------------------------------------------

Startup ---> cmd

SQL> startup nomount;


ORACLE instance started.

Total System Global Area 1068937216 bytes


Fixed Size 2260048 bytes
Variable Size 679478192 bytes
Database Buffers 381681664 bytes
Redo Buffers 5517312 bytes
SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
xe

SQL> select name from v$database;


select name from v$database
*
ERROR at line 1:
ORA-01507: database not mounted

SQL> startup mount;


ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> alter database mount;

Database altered.

SQL> select name from v$database;

NAME
---------
XE

SQL> alter database open;

Database altered.

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------

You might also like