刚学oracle,学到权限管理时,我自己好奇用sys sysdba登陆,建立了一个用户myuser,然后用grant all privileges to mysser发现myuser具有了许多管理员的权限。想看看能不能把sys权限收回,为了验证,我用myuser用户执行revoke all privileges from sys,结果真的把sys权限收回了,吓住了,马上恢复都不行了,数据库运行出问题了。ORA-06553: PLS-213: STANDARD 包不可访问。求那位大哥,高手帮忙解下这个问题,我不想重装oracle,重装太费劲了。
我自己也不知道怎么成功的,我用的是叫plsql的弄的,我就是觉得不能删掉系统的啊,才敢去试,就是删掉了也可以revoke,谁知道会出现这样的问题。晕哦。按理应该是和你做的情况一样啊。可能是软件的问题吧。看来只有重装oracle咯,就是oracle重装很麻烦。
谢谢你得回答,还为我做了这么详细的测试,非常感谢。。。没有分数还请原谅^-^刚注册的号
急。。。。。oracle sys管理员权限被我收回了 怎么办
答案:2 悬赏:20 手机版
解决时间 2021-03-24 03:20
- 提问者网友:佞臣
- 2021-03-23 04:30
最佳答案
- 五星知识达人网友:鸽屿
- 2021-03-23 04:59
不懂你是怎么成功的,SYS应该REVOKE不掉。看我下面的例子
如果你是本地库的话可以用系统验证方式登录
sqlplus / as sysdba
然后再给SYS赋权。
SQL> conn sys/sys as sysdba
Connected.
SQL> create user test identified by test;
User created.
SQL> grant all privileges to test;
Grant succeeded.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
SQL> conn test/test
Connected.
SQL> revoke all privileges from sys;
revoke all privileges from sys
*
ERROR at line 1:
ORA-01952: system privileges not granted to 'SYS'
SQL> conn sys/sys as sysdba
Connected.
SQL> grant dba to test;
Grant succeeded.
SQL> conn test/test
Connected.
SQL> revoke all privileges from sys;
revoke all privileges from sys
*
ERROR at line 1:
ORA-01952: system privileges not granted to 'SYS'
SQL> conn sys/sys as sysdba
Connected.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
SQL> grant sysdba to test;
Grant succeeded.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
TEST TRUE FALSE
SQL> conn test/test
Connected.
SQL> revoke all privileges from sys;
revoke all privileges from sys
*
ERROR at line 1:
ORA-01952: system privileges not granted to 'SYS'
SQL> conn test/test as sysdba
Connected.
SQL> revoke all privileges from sys;
revoke all privileges from sys
*
ERROR at line 1:
ORA-01952: system privileges not granted to 'SYS'
SQL> revoke sysdba from sys;
revoke sysdba from sys
*
ERROR at line 1:
ORA-01998: REVOKE failed: user SYS always has SYSOPER and SYSDBA
如果你是本地库的话可以用系统验证方式登录
sqlplus / as sysdba
然后再给SYS赋权。
SQL> conn sys/sys as sysdba
Connected.
SQL> create user test identified by test;
User created.
SQL> grant all privileges to test;
Grant succeeded.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
SQL> conn test/test
Connected.
SQL> revoke all privileges from sys;
revoke all privileges from sys
*
ERROR at line 1:
ORA-01952: system privileges not granted to 'SYS'
SQL> conn sys/sys as sysdba
Connected.
SQL> grant dba to test;
Grant succeeded.
SQL> conn test/test
Connected.
SQL> revoke all privileges from sys;
revoke all privileges from sys
*
ERROR at line 1:
ORA-01952: system privileges not granted to 'SYS'
SQL> conn sys/sys as sysdba
Connected.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
SQL> grant sysdba to test;
Grant succeeded.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
TEST TRUE FALSE
SQL> conn test/test
Connected.
SQL> revoke all privileges from sys;
revoke all privileges from sys
*
ERROR at line 1:
ORA-01952: system privileges not granted to 'SYS'
SQL> conn test/test as sysdba
Connected.
SQL> revoke all privileges from sys;
revoke all privileges from sys
*
ERROR at line 1:
ORA-01952: system privileges not granted to 'SYS'
SQL> revoke sysdba from sys;
revoke sysdba from sys
*
ERROR at line 1:
ORA-01998: REVOKE failed: user SYS always has SYSOPER and SYSDBA
全部回答
- 1楼网友:愁杀梦里人
- 2021-03-23 06:23
任务占坑
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯