select logins from v$instance;Output here will be either ALLOWED or RESTRICTED
Join with v$database for more information:
select a.INSTANCE_NAME, a.ACTIVE_STATE,a.logins, b.open_mode from v$instance a inner join v$database b on UPPER(a.instance_name) = b.name;
Which will show the following output if your database is in restricted mode, and in this example, mounted:
INSTANCE_NAME ACTIVE_ST LOGINS OPEN_MODE ---------------- --------- ---------- -------------------- mydb01 NORMAL RESTRICTED MOUNTED
and for normal mode:
INSTANCE_NAME ACTIVE_ST LOGINS OPEN_MODE ---------------- --------- ---------- -------------------- mydb01 NORMAL ALLOWED READ WRITE
No comments:
Post a Comment