一. 创建 Oracle 数据库用户
首先在 Oracle 中创建一个用户用于访问数据库
- 创建用户, 这里需要注意的是, 为了账户能够正常登陆, 用户名前面需要加 “c##”, 详情可以参考这篇文章
create user c##username identified by password;
- 赋予新建用户权限
grant connect,resource,dba to c##username;
二. 安装 Instant Client
安装 instantclient 的目的是解决报错 DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded
, 报错原因是 Oracle 自带的 instantclient 版本为32位, 需更换成64位。
根据安装 Oracle 数据库的系统选择相应安装包, 官网下载页面为
https://www.oracle.com/database/technolog