搜档网
当前位置:搜档网 › ORACLE用户的三种认证方式

ORACLE用户的三种认证方式

ORACLE 用户的三种验证方式

第一种:密码认证

create user fan identified by fan;


第二种:外部认证
1.直接将参数os_authent_prefix=''
alter system set os_authent_prefix='' scope=spfile;
默认值ops$要求oracle用户带此前缀,直接改为空
2.创建oracle用户,命令如下:create user fan identified externally;
3.授权:grant connect to fan;
4.创建操作系统用户fan,并加入相关的组 useradd -g oinstall -G dba fan
5.配置fan用户的.bash_profile文件
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
6. 令配置生效 . ~/.bash_profile
7. 在fan用户下输入命令 sqlplus / 登录成功
以数据库用户fan登陆

三、代理认证
实验文本如下:
SQL> conn / as sysdba
Connected.
SQL> grant create session to Steve identified by steve_password;

Grant succeeded.

SQL> grant create session to sales_app_dba identified by sales_app_dba_password;

Grant succeeded.

SQL> alter user sales_app_dba grant connect through Steve;

User altered.

SQL> connect Steve[sales_app_dba]/steve_password;
Connected.
SQL> show user
USER is "SALES_APP_DBA"

相关主题