KettleDataBaseException ,ETL连接数据库失败ora-12505解决方法
2018-03-07 16:45
886 查看
问题描述:
数据库迁移之后,ETL(数据同步工具)工具连接oracle时,选用jdbc 连oracle数据库的时候出现了ora-12505错误:
错误如下:
数据库 [orcl] : org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
10.10.88.90:1521:DBDMS
org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
10.10.88.90:1521:DBDMS
---------
而直接通过plsql可以正常连接数据库,或者可以通过sqlplus 连接数据库
经过debug和查找相关的资料发现问题原因如下:
jdbc连接数据库的时候,需要使用数据库的sid_name,而不是数据库的services_name
而使用plsql连接数据库的时候,只需要数据库的services_name即可,所以修改连接字符串中的services_name (即连接参数中的database name)为sid_name
附:
查看数据库中当前的sid:
SQL> select INSTANCE_NAME from v$instance;
INSTANCE_NAME
----------------
orcl2
数据库迁移之后,ETL(数据同步工具)工具连接oracle时,选用jdbc 连oracle数据库的时候出现了ora-12505错误:
错误如下:
数据库 [orcl] : org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
10.10.88.90:1521:DBDMS
org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
10.10.88.90:1521:DBDMS
---------
而直接通过plsql可以正常连接数据库,或者可以通过sqlplus 连接数据库
经过debug和查找相关的资料发现问题原因如下:
jdbc连接数据库的时候,需要使用数据库的sid_name,而不是数据库的services_name
而使用plsql连接数据库的时候,只需要数据库的services_name即可,所以修改连接字符串中的services_name (即连接参数中的database name)为sid_name
附:
查看数据库中当前的sid:
SQL> select INSTANCE_NAME from v$instance;
INSTANCE_NAME
----------------
orcl2
相关文章推荐
- Kettle 连接失败 Oracle 数据库报 ora-12505 的解决方法
- Kettle 连接失败 Oracle 数据库报 ora-12505 的解决方法(转)
- Kettle 连接失败 Oracle 数据库报 ora-12505 的解决方法
- Windows7旗舰版安装PLSQLDeveloper连接数据库遇到:ora-12514 问题和ORA-12545:因目标主机或对象不存在,连接失败”解决方法
- ORA-28547:连接服务器失败,可能是Net8管理错误----解决方法
- ORA-28547:连接服务器失败,可能是Net8管理错误----解决方法
- eclipse连接数据库时出现ORA-12505, TNS:listener does not currently know of SID given in connect descriptor的解决
- ORA-00257归档日志写满的解决方法 背景: 在前一篇博客中我们提到了如何启动或关闭oracle的归档(ARCHIVELOG)模式,在我成功设定数据库为归档模式以后, 第二天再次尝试连接数据库,
- plsql developer连接数据库时出现ORA-01033错误的解决方法
- 连接Oracle远程数据库错误:ORA-12541,ORA-12514,ORA-01017的解决方法!
- Oracle 数据库PL/SQL ORA -12154 TNS:无法解析指定的连接标识符解决方法
- 数据库连接失败could not find driver 解决方法
- kettle 数据库连接找不到jdbc Driver问题解决方法
- 站长篇----远程连接数据库失败的解决方法
- 关于启动数据库后提示ora-12505的解决方法
- linux上安装oracle后,客户端连接报出ORA-12505的解决方法
- 网站出现数据库连接失败,mysql 2003错误(10061) 的解决方法
- 关于dedecms近期频繁出现[错误警告:连接数据库失败..]错误的解决方法
- 解决数据库连接报错Listener refused the connection with the following error: ORA-12505
- kettle连接mysql错误连接数据库org.pentaho.di.core.exception.KettleDatabaseException