问:如何用NORMAL选项关闭数据库?
答:使用shutdown transactional命令!
场景一:在执行shutdown transactional命令的时候,是否还可以有新的用户连接到数据库?
会话一:SQL> startup
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
再运行以下语句:
SQL> shutdown transactional
同时,在会话二,新连接一个用户到数据库,执行以下语句:
SQL> conn scott/tiger
此时,会产生如下结果:
会话一:
SQL> shutdown transactional
Database closed.
Database dismounted.
ORACLE instance shut down.
会话二:
SQL> conn scott/tiger
ERROR:
ORA-01089: immediate shutdown in progress - no operations are permitted
结论:在执行shutdown transactional命令之后,不允许有新的用户连接到数据库。