我想在安装liquibase和sqlcli后执行“lb generate-schema -split”,但是当我点击上面的命令时,它没有连接到可插拔数据库(xepdb 1)。它总是试图连接到'xe'或'orcl'服务名称。谁能帮我解决这个问题?
D:\Software\sqlcl-latest\sqlcl\bin>sql
SQLcl: Release 23.1 Production on Sat Apr 29 12:27:03 2023
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Username? (''?) apexuser@**xepdb1**
Password? (**********?) **********
Last Successful login time: Sat Apr 29 2023 12:27:17 +09:30
Connected to:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL> lb generate-schema -split
--Starting Liquibase at 12:27:24 (version 4.17.0 #0 built at 2022-11-02 21:48+0000)
USER = apexuser
URL = jdbc:oracle:oci8:@
Error Message = ORA-12560: TNS:protocol adapter error
USER = apexuser
URL = jdbc:oracle:thin:@localhost:1521/orcl
Error Message = Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
(CONNECTION_ID=zW40jSIGS5KejZYrbKvK/A==)
USER = apexuser
URL = jdbc:oracle:thin:@localhost:1521/xe
Error Message = ORA-01017: invalid username/password; logon denied
1条答案
按热度按时间hmmo2u0o1#
不连接可插拔数据库(xepdb 1)。它总是尝试连接到'xe'或'orcl'服务名称
就像它说的,过去是真的,现在不再是真的了。它取决于您如何命名数据库(或由Oracle决定),在 * 较新的 * XE数据库中,它是
xepdb1
。这是我的XE数据库(我知道它的名字;我只是在展示我的TNSNAMES里的东西。ORA):
看到上一行末尾的
SERVICE_NAME
了吗?因此,尝试与Liquibase相同;我不使用它,所以我不能帮助它,但我认为这应该修改: