Oracle数据库的状态查询

本文来源:huang_xw 的《Oracle数据库的状态查询

1 状态查询

启动状态

SQL语句

结果

nomount

select status from
v$instance;

STARTED

select open_mode from
v$database;

ERROR at line 1:

ORA-01507: database not
mounted

mount

select status from
v$instance;

MOUNTED

select open_mode from
v$database;

MOUNTED

open

select status from
v$instance;

OPEN

select open_mode from
v$database;

READ WRITE 或者 READ
ONLY

2 实验过程



  1 SQL> startup nomount;
2 ORACLE instance started.
3
4 Total System Global Area 125829120 bytes
5 Fixed Size 1247684 bytes
6 Variable Size 92276284 bytes
7 Database Buffers 25165824 bytes
8 Redo Buffers 7139328 bytes
9
10 SQL> select status from v$instance;
11
12 STATUS
13 ------------
14 STARTED
15
16 SQL> select open_mode from v$database;
17 select open_mode from v$database
18 *
19 ERROR at line 1:
20 ORA-01507: database not mounted
21
22 SQL> alter database mount;
23
24 Database altered.
25
26 SQL> select status from v$instance;
27
28 STATUS
29 ------------
30 MOUNTED
31
32 SQL> select open_mode from v$database;
33
34 OPEN_MODE
35 ----------
36 MOUNTED
37
38 SQL> alter database open;
39
40 Database altered.
41
42 SQL> select status from v$instance;
43
44 STATUS
45 ------------
46 OPEN
47
48 SQL> select open_mode from v$database;
49
50 OPEN_MODE
51 ----------
52 READ WRITE






上一篇:ubuntu命令chmod755


下一篇:DRAM Device