oracle启动限制模式

  • 在执行如下任务时,可以把数据库启动到限制模式
    • 数据导入导出(import、export)
    • 数据的装载(SQL*Loader)
    • 阻止某些用户访问数据
    • 执行升级和迁移操作
      在限制模式下,只有create session和restricted session权限用户能访问数据库

数据库关闭条件下

[oracle@prod1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Feb 22 18:50:04 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

idle> startup restrict;

数据库已启动条件下

idle> alter system enable restricted session;

关闭限制模式

idle> alter system disable restricted session;

测试

[oracle@prod1 ~]$ sqlplus scott/tiger 

SQL*Plus: Release 11.2.0.1.0 Production on Sun Feb 22 18:53:42 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:
ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege

#赋予scott用户restricted session权限
idle> grant restricted session to scott;

Grant succeeded.

#登录成功
[oracle@prod1 ~]$ sqlplus scott/tiger 

SQL*Plus: Release 11.2.0.1.0 Production on Sun Feb 22 18:55:15 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

scott@PROD> 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值