我使用的设置是https://oracle-base.com/articles/19c/minimum-viable-oracle-database-19c-installation-on-ol8#download-software
这样做的:
sqlplus / as sysdba <<EOF
alter session set container=ORCLPDB1;
create user testuser1 identified by testuser1 quota unlimited on users;
grant connect, resource to testuser1;
exit;
EOF
登录数据库成功:
sqlplus testuser1/testuser1@//localhost:1521/ORCLPDB1
但是ora2pg.conf
这样设置了一个文件:
ORACLE_DSN dbi:Oracle:host=localhost;service_name=ORCLCDB;port=1521
ORACLE_USER testuser1
ORACLE_PWD testuser1
...我无法登录。我努力了
- 更改 DSN 并正确地说它根本找不到数据库;好的
- 更改 service_name 并显示不存在此类服务;好的
- 尝试
service_name=ORCLCDB
(如出现在 中)tnsnames.ora
和service_name=ORCLCDB1
. 稍等片刻然后失败;快速失败:ORACLE_DSN
ORCLCDB
ORCLCDB1
FATAL: 12514 ... ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (DBD ERROR: OCIServerAttach)
这ora2pg.conf
是 dist 版本的副本,仅更改了 DNS、USER 和 PWD。
有任何想法吗?