首页 > 数据库 > Oracle > [20200302]startup dba.txt
[20200302]startup dba.txt
--//不记得那个时候看到人家这样执行启动数据库的操作,不知道后面的dba什么意思。
--//今天才知道实际上使用在rman,直接启动到restricted模式,测试看看。
1.测试1:
--//在sqlplus下:
SYS@book> startup dba
SP2-0714: invalid combination of STARTUP options
2.测试2:
RMAN> startup dba
Oracle instance started
database mounted
database opened
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
SYS@book> select status,instance_name,logins from v$instance;
STATUS INSTANCE_NAME LOGINS
------------ ---------------- ----------
OPEN book RESTRICTED
--//重启:
SYS@book> startup
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
Database opened.
SYS@book> select status,instance_name,logins from v$instance;
STATUS INSTANCE_NAME LOGINS
------------ ---------------- ----------
OPEN book ALLOWED
SYS@book> alter system enable restricted session;
System altered.
SYS@book> select status,instance_name,logins from v$instance;
STATUS INSTANCE_NAME LOGINS
------------ ---------------- ----------
OPEN book RESTRICTED
3.测试3:
--//在sqlplus下:
SYS@book> startup restrict
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
Database opened.
--//oracle的语法有时候很奇怪,这里不要写成startup restricted。否者报
SYS@book> startup restricted
SP2-0714: invalid combination of STARTUP options
SYS@book> select status,instance_name,logins from v$instance;
STATUS INSTANCE_NAME LOGINS
------------ ---------------- ----------
OPEN book RESTRICTED
SYS@book> alter system disable restricted session;
System altered.
SYS@book> select status,instance_name,logins from v$instance;
STATUS INSTANCE_NAME LOGINS
------------ ---------------- ----------
OPEN book ALLOWED
--//如果在rman下执行:
RMAN> startup restrict
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "dba, force, mount, newline, nomount, pfile, ;"
RMAN-01008: the bad identifier was: restrict
RMAN-01007: at line 1 column 9 file: standard input
--//newline什么意思!!
RMAN> startup newline
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "dba, force, mount, newline, nomount, pfile, ;"
RMAN-01008: the bad identifier was: newline
RMAN-01007: at line 1 column 9 file: standard input
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2677970/ ,如需转载,请注明出处,否则将追究法律责任。