本文来源:huang_xw 的《Oracle数据库的状态查询》
1 状态查询
启动状态 |
SQL语句 |
结果 |
nomount |
select status from |
STARTED |
select open_mode from |
ERROR at line 1: ORA-01507: database not |
|
mount |
select status from |
MOUNTED |
select open_mode from |
MOUNTED |
|
open |
select status from |
OPEN |
select open_mode from |
READ WRITE 或者 READ |
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