on 06-10-2010 11:50 AM
Hi all,
I am working on a scenario in PI 7.1 where a JDBC sender channel needs to fetch data from an Oracle database residing on another WAS. When the channel is started, following error is thrown -
Error during database connection to the database URL 'jdbc:oracle:thin:@<host>:<port>:<SID>' using the JDBC driver 'oracle.jdbc.driver.OracleDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Can not establish connection:: SQLException: ORA-01017: invalid username/password; logon denied '
I verified that the username and password are correct and they work fine when I connect to the database by using a client tool installed locally on WAS.
I came across SAP Note 400241 which talks about various Oracle related errors, but it has too many details and I am bit confused as to what things I should check. Would appreciate your help to resolve this seemingly simple error. Thanks!
-Shankar
Hello there!
First of all, check your Oracle DB data access (user ID and password), specially the password.
After, you can consult: #867176 - FAQ: Oracle JDBC
and #562863 - FAQ: Logon mechanisms, questions 6 and 7.
And if you're facing issues with the drivers between JDBC and Oracle:
#509719 - How to install Oracle JDBC Drivers
Hope it helps.
Regards,
Caio Cagnani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try using the ip address of the database system instead of host name , just to make sure that you are connecting to the desired box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As the error is clearly telling either user or password wrong. To make sure this once again write small java program like below and connect through the java program(for this get download ojdbc14.jar to execute this program) if it will give the same error then you can confirm username and password wrong.
/*
Created on May 25, 2010
*
To change the template for this generated file go to
Window>Preferences>Java>Code Generation>Code and Comments
*/
//ODBC14.jar required to connect Oracle database
package com.sap.prgs;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/**
@author madhur
*
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
*/
public class JDBCConnection {
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Connection conn = null;
Statement stmt = null;
try{
System.out.println("hello");
Class.forName("oracle.jdbc.driver.OracleDriver");
String url ="jdbc:oracle:thin:@xxx.x.xxx.xxx:port:somehost";
conn = DriverManager.getConnection(url,"username","password");
System.out.println("connection success"+conn.getClass());
stmt = conn.createStatement();
ResultSet rset =
stmt.executeQuery("SELECT column1 FROM tablename");
while (rset.next()) {
System.out.println (rset.getString(1));
}
}
catch(Exception e){
System.out.println("exception is"+e);
}
finally{
System.out.println("closing connection");
conn.close();
stmt.close();
}
}
}
thanks,
madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello there!
First of all, check your Oracle DB data access (user ID and password), specially the password.
After, you can consult: #867176 - FAQ: Oracle JDBC
and #562863 - FAQ: Logon mechanisms, questions 6 and 7.
And if you're facing issues with the drivers between JDBC and Oracle:
#509719 - How to install Oracle JDBC Drivers
Hope it helps.
Regards,
Caio Cagnani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.