Oracle赋予用户sysdba权限

WBOY
发布: 2016-06-07 17:58:05
原创
2423 人浏览过

以SYS用户进入Oracle, SQL grant sysdba to username; grant sysdba to username * ERROR at line 1: ORA-01994: GRANT failed: password file missing or disabled 首先,把初始化参数REMOTE_LOGIN_PASSWORDFILE的值改成EXCLUSIVE 如果还是有问题,可能是缺

以SYS用户进入Oracle,

SQL> grant sysdba to username;

grant sysdba to username

*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled

首先,把初始化参数REMOTE_LOGIN_PASSWORDFILE的值改成EXCLUSIVE

如果还是有问题,可能是缺少密码文件,用orapwd创建密码文件

$ orapwd -h
Usage: orapwd file= password= entries=

where
file - name of password file (mand),
password - password for SYS (mand),
entries - maximum number of distinct DBA and OPERs (opt),
There are no spaces around the equal-to (=) character.

这个命令很简单,密码文件一般放在$Oracle_HOME/dbs目录下,命名规则为orapd+SID,

orapwd FILE='/db/Oracle/product/10.2.0/db_1/dbs/orapw+SID'  PASSWORD=oracle   ENTRIES=5  FORCE=y

然后再执行

SQL> grant sysdba to username;

Grant succeeded.

检查

SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP
------------------------------ ----- -----
SYS                            TRUE  TRUE
******                          TRUE  FALSE

SYSDB那一栏是TRUE就对了

然后就可以as sysdba连接了
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!