目的:
这个文档用于将一个数据库放入一个限制模式并且确认它是在限制模式之下。
运用范围:
对于用于需要知道如何限制SYSDBA用户接入数据库。在关闭状态下,将数据库放入限制模式,在服务管理器或者sql*plus中执行如下的语句(使用SYS或者INTERNAL连接):
startup restrict
如果你想在数据库开启时将数据库放入限制模式,执行如下语句:
alter system enable restricted session;
检查视图v$UBSTABCE中的列LOGINS
LOGINS = RESTRICTED indicates that the database is in restricted mode
在数据库8和之上的版本中,视图v$UBSTABCE显示如下:
Column Description
INSTANCE_NUMBER Instance number used for instance registration.
Corresponds to INSTANCE_NUMBER initialization parameter.
INSTANCE_NAME Instance name.
HOST_NAME Name of the host machine
VERSION RDBMS version
STARTUP_TIME Time when instance was started up
STATUS STARTED/MOUNTED/OPEN
STARTED after startup nomount
MOUNTED after startup mount or alter database
close
OPEN after startup or after database open
PARALLEL YES/NO in parallel server mode
THREAD# Redo thread opened by the instance
ARCHIVER STOPPED/STARTED/FAILED
FAILED means that the archiver failed to archive a log
last time, but will try again within 5 minutes
LOG_SWITCH_WAIT ARCHIVE LOG/CLEAR LOG/CHECKPOINT event log switching
is waiting for.
Note that if ALTER SYSTEM SWITCH LOGFILE is hung,
but there is room in the current online redo log, then
value is NULL
LOGINS ALLOWED/RESTRICTED
SHUTDOWN_PENDING YES/NO
在9i和更高版本中:
DATABASE_STATUS Shows Database Status, usually ACTIVE.
INSTANCE_ROLE Describes whether the instance is an active instance
(PRIMARY_INSTANCE) or a inactive secondary instance
(SECONDARY_INSTANCE), or UNKNOWN if the instance has
been started but not mounted
ACTIVE_STATE NORMAL/QUIESCING/QUIESCED
NORMAL indicates the database is in a normal state.
QUIESCING/QUIESCED refer to special states for RAC
instances. ALTER SYSTEM QUIESCE RESTRICTED statement
quiesces all instances in an Oracle RAC environment.
After this statement has been issued, some instances
may enter into a quiesced state before other instances;
the system is quiesced when all instances enter the
quiesced state.
在10.2和更高版本中:
BLOCKED YES/NO