修改数据库限制模式:

SQL> select instance_name,status,logins from v$instance;

INSTANCE_NAME STATUS LOGINS
---------------- ------------ ----------
enmo1 OPEN ALLOWED

SQL> alter system enable restricted session;

System altered.

SQL> select instance_name,status,logins from v$instance;

INSTANCE_NAME STATUS LOGINS
---------------- ------------ ----------
enmo1 OPEN RESTRICTED

SQL> alter system disable restricted session;

System altered.

SQL> select instance_name,status, logins from v$instance;

INSTANCE_NAME STATUS LOGINS
---------------- ------------ ----------
enmo1 OPEN ALLOWED

 

startup nomount restrict;

数据库启动至限制模式

在这种模式下,在服务器端只有拥有dba角色的用户和具有restrict session权限的用户才能连接数据库;

在远程无论拥有什么角色都无法连接。

在数据库做运维(变更)的情况下且不想其他会话连接到数据库,那么可以使用此种方式,避免其他用户连接。RAC环境下,各个实例相互独立,每个实例需要单独设置。

 

相关文章:

  • 2021-10-03
  • 2021-07-05
  • 2021-04-07
  • 2021-04-10
  • 2021-07-11
  • 2021-07-05
  • 2021-06-27
  • 2021-07-01
猜你喜欢
  • 2021-08-21
  • 2021-04-21
  • 2022-01-01
  • 2021-12-22
  • 2021-04-06
  • 2022-02-09
  • 2021-08-17
相关资源
相似解决方案