C:\>SET ORACLE_SID=ORACLE1C:\>sqlplus oracle/oracle@localtestSQL*Plus: Release 10.2.0.1.0 - Production on 星期四 8月 27 06:41:22 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining optionsSQL> conn system/123456@localtest as sysdba
已连接。
SQL> grant create database link to oracle;授权成功。SQL> grant drop database link to oracle;
grant drop database link to oracle
      *
第 1 行出现错误:
ORA-00990: 权限缺失或无效
SQL>

解决方案 »

  1.   


    --创建w1用户
    create user w1 identified by 1
    grant connect to w1--登录w1
    create database link w1
    --权限不足grant create database link to w1
    --授权后create database link w1
    drop database link w1
    --成功
    grant drop database link to w1
    --权限缺失或无效create database link w1--然后进入sys用户
    drop database link w1
    --未找到数据库连接
    --返回w1用户
    drop database link w1
    --success
    当sys赋予普通用户创建数据库连接权限时,该用户自动取得删除该连接的权限
    且只有该用户能删除非public数据库连接
    因此sys删除权限无效