使用sqlplus / 登录数据库
(1)数据库中创建xx用户
Create user xx identified externally;
Grant connect to xx;
Grant resource to xx;
(2)设置数据库参数
Alter system set os_authent_prefix=’’ scope=spfile;
Alter system set remote_os_authent=true scope=spfile;
(3)操作系统上创建xx用户,必须和数据库中xx用户相同
#cat /etc/passwd
(4)设置xx用户环境变量
$ vi bash_profile
export ORACLE_BASE=/oracle/db
export ORACLE_HOME=$ORACLE_BASE/product/12.2
export ORACLE_SID=xx
export NLS_LANG=AMERICAN_AMERICA.zhs16gbk
export NLS_DATE_F