赞
踩
shutdown --> nomount
startup nomount
select status from v$instance;
- SQL>
- SQL> conn / as sysdba
- Connected to an idle instance.
- SQL>
- SQL> startup nomount
- ORACLE instance started.
-
- Total System Global Area 629145392 bytes
- Fixed Size 9137968 bytes
- Variable Size 197132288 bytes
- Database Buffers 415236096 bytes
- Redo Buffers 7639040 bytes
- SQL>
- SQL>
- SQL>
- SQL>
- SQL> select status from v$instance;
-
- STATUS
- ------------
- STARTED
-
- SQL>
数据库启动到nomount做了什么?
数据库启动到nomount需要什么?
nomount状态可以做什么?
- SQL>
- SQL> select * from v$sgainfo;
-
- NAME BYTES RES CON_ID
- -------------------------------- ---------- --- ----------
- Fixed SGA Size 9137968 No 0
- Redo Buffers 7639040 No 0
- Buffer Cache Size 411041792 Yes 0
- In-Memory Area Size 0 No 0
- Shared Pool Size 197132288 Yes 0
- Large Pool Size 4194304 Yes 0
- Java Pool Size 0 Yes 0
- Streams Pool Size 0 Yes 0
- Shared IO Pool Size 0 Yes 0
- Data Transfer Cache Size 0 Yes 0
- Granule Size 4194304 No 0
-
- NAME BYTES RES CON_ID
- -------------------------------- ---------- --- ----------
- Maximum SGA Size 629145392 No 0
- Startup overhead in Shared Pool 193465328 No 0
- Free SGA Memory Available 0 0
-
- 14 rows selected.
-
- SQL> select name from v$bgprocess where paddr<>'00';
-
- NAME
- -----
- PMON
- CLMN
- PSP0
- VKTM
- GEN0
- MMAN
- M000
- GEN1
- SCMN
- DIAG
- OFSD
-
- NAME
- -----
- SCMN
- DBRM
- VKRM
- SVCB
- PMAN
- DIA0
- DBW0
- LGWR
- CKPT
- LG00
- SMON
-
- NAME
- -----
- LG01
- SMCO
- RECO
- W000
- LREG
- W001
- PXMN
- FENC
- D000
- MMON
- MMNL
-
- NAME
- -----
- S000
- TMON
-
- 35 rows selected.
-
- SQL>
shutdown --> mount
nomount --> mount
- SQL>
- SQL> select status from v$instance;
-
- STATUS
- ------------
- STARTED
-
- SQL> alter database mount;
-
- Database altered.
-
- SQL> select status from v$instance;
-
- STATUS
- ------------
- MOUNTED
-
- SQL>
数据库启动到mount做了什么?
数据库启动到mount状态需要做什么?
mount状态可以做什么?
- SQL>
- SQL> select name from v$datafile;
-
- NAME
- --------------------------------------------------------------------------------
- /u02/oradata/CDB1/system01.dbf
- /u02/oradata/CDB1/sysaux01.dbf
- /u02/oradata/CDB1/undotbs01.dbf
- /u02/oradata/CDB1/pdbseed/system01.dbf
- /u02/oradata/CDB1/pdbseed/sysaux01.dbf
- /u02/oradata/CDB1/users01.dbf
- /u02/oradata/CDB1/pdbseed/undotbs01.dbf
- /u02/oradata/CDB1/pdb1/system01.dbf
- /u02/oradata/CDB1/pdb1/sysaux01.dbf
- /u02/oradata/CDB1/pdb1/undotbs01.dbf
- /u02/oradata/CDB1/pdb1/users01.dbf
-
- 11 rows selected.
-
- SQL> select name from v$tempfile;
-
- NAME
- --------------------------------------------------------------------------------
- /u02/oradata/CDB1/temp01.dbf
- /u02/oradata/CDB1/pdbseed/temp012022-11-02_15-16-24-663-PM.dbf
- /u02/oradata/CDB1/pdb1/temp01.dbf
-
- SQL>
- SQL> select member from v$logfile;
-
- MEMBER
- --------------------------------------------------------------------------------
- /u02/oradata/CDB1/redo03.log
- /u02/oradata/CDB1/redo02.log
- /u02/oradata/CDB1/redo01.log
-
- SQL>
shutdown --> open
nomount ----> open
只读方式去打开数据库
- SQL>
- SQL> startup mount
- ORACLE instance started.
-
- Total System Global Area 629145392 bytes
- Fixed Size 9137968 bytes
- Variable Size 197132288 bytes
- Database Buffers 415236096 bytes
- Redo Buffers 7639040 bytes
- Database mounted.
- SQL>
- SQL>
- SQL> select status from v$instance;
-
- STATUS
- ------------
- MOUNTED
-
- SQL>
- SQL> alter database open read only;
-
- Database altered.
-
- SQL>
- SQL> select status from v$instance;
-
- STATUS
- ------------
- OPEN
-
- SQL>
- SQL>
- SQL>
- SQL> select open_mode from v$database;
-
- OPEN_MODE
- --------------------
- READ ONLY
-
- SQL>
- SQL>
- SQL> startup
- ORACLE instance started.
-
- Total System Global Area 629145392 bytes
- Fixed Size 9137968 bytes
- Variable Size 197132288 bytes
- Database Buffers 415236096 bytes
- Redo Buffers 7639040 bytes
- Database mounted.
- Database opened.
- SQL>
数据库启动到open做了什么?
数据库启动到open需要什么?
open状态可以做什么?
1.正常停库: shutdown normal = shutdown
2.事务级停库: shutdown transactional
3.立即停库 : shutdown immediate (生产库最常用的停库方式)
相当于拔电源
(停止之后的数据库是脏库)
注意:这些命令需要慎用
- startup force = shutdown abort + startup
-
- startup force nomount = shutdown abort + startup nomount
-
- startup force mount = shutdown abort + startup mount
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。