Below are my connection settings for Oracle SQL Developer with tnsnames.ora
The pattern of jdbc string required is as below :
jdbc:oracle:thin#:1521:<DATABASE_NAME>
I have tried the following :
jdbc:oracle:thin:#ServerIP:1521:test2 , jdbc:oracle:thin:#ServerIP:1521:orcl.5bfzmyo25mfutjqfmvvj0cmrya.rx.internal.cloudapp.net:test2
But it is not connecting.
Assuming that
You want to use the Oracle thin JDBC driver
The database is running on ServerIP
The database listener is running on port 1521
The service name of the database is orcl.5bfzmyo25mfutjqfmvvj0cmrya.rx.internal.cloudapp.net
your connection string should be (see the linked question for additional syntax options)
jdbc:oracle:thin:#//ServerIP:1521/orcl.5bfzmyo25mfutjqfmvvj0cmrya.rx.internal.cloudapp.net
Your app server has no idea about how you've configured your local tnsnames.ora file or your local SQL Developer connection strings. So you can't reference test2 (the name of a SQL Developer connection) or any of the tnsnames.ora entries you've created on the client machine.
Related
Using a working JDBC connect string for a connect to a remote Oracle database using Oracle JDBC like
jdbc:oracle:thin:#myremotehost:1521:mysid
and mapping it inside SAP Connector with nomenclature
jdbc:oracle:thin:#<virtual host name>:<virtual Port>:mysid
with
<virtual host name> = oracle
<virtual Port>= 61521
resulting in
jdbc:oracle:thin:#oracle:61521:mysid
will end up with error
org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection: DataSource returned null from getConnection(): org.ops4j.pax.jdbc.impl.DriverDataSource#45d186af
To check if the issue is related to a problem in the Oracle JDBC Driver we
Installed SAP JDK 8 on the remote database machine
Using Maven to create a standalone Spring-Boot/Spring-JDBC/HikariCP/Oracle JDBC JAR reflecting the stack of SAP Connector / SAP VM using with iFlows
Tested the JAR with connect string
jdbc:oracle:thin:#myremotehost:1521:mysid
succesfully
add on remote database machine to file /etc/hosts an entry like
oracle XXX.XXX.XXX.XXX
where XXX.XXX.XXX.XXX is the IP of machine "myremotehost"
Tested the recreated JAR with new connect string
jdbc:oracle:thin:#oracle:1521:mysid
succesfully
Replacing "oracle" as virtual host name by "myoracle" like
jdbc:oracle:thin:#myoracle:61521:mysid
fixed the issue with SAP Connector
According to our finding we think the error is caused inside SAP Connector using Java String.replace() function replacing inside connect string
jdbc:oracle:thin:#oracle:61521:mysid
Any occurance of "oracle" (virtual host name) by the remote host name "myremotehost"
Any occurance of "61521" (virtual port number) by the remote host port "1521"
ending up with a connect string like
jdbc:myremotehost:thin:#myremotehost:1521:mysid
which is invalid because the first occurance of "oracle" in original connect string is required to resolve classes giving the seen error because no connection could be established.
For Developers of the SAP Connector at SAP: Valid workaround in the Java code of SAP Connenctor would be using regexp or restrict replacement for substring right of at-Sign "#" in connect string so that class resolving is still possible ;-)
kind regards
Frank Scherie
Expectation:
SAP fixes the issue and creates a bug/note for the issue
In Oracle, I have a 32-bit driver to connect in my 32-bit ODBC Oracle in OraClient11g_home1.
I want to connect using host, port, service-name, uid, pwd (as I do in Oracle SQL Developer). But the only versions of connection string that I can find use TNSNames.ora, which I can't modify.
For example I found this connection string:
Driver={Oracle in OraClient11g_home1};Dbq=myTNSServiceName;Uid=myUsername;Pwd=myPassword;
But dbq here is a TNS name. How can I modify this connection string to include host, port, and service-name?
Edit:
I also tried this:
"Driver={Oracle in OraClient11g_home1};SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));uid=myUsername;pwd=myPassword;"
But I got an error:
[RODBC] ERROR: state HY000, code 12560, message [Oracle][ODBC][Ora]ORA-12560: TNS:protocol adapter error
Please try this:
'DRIVER={Oracle in OraClient11g_home1};DBQ=x.x.x.x:MyPort/MySID;UID=username;PWD=password'
First SQL Developer connect via JDBC not ODBC.
Are you using SID or service name to connect?
DB Version? Os?
You are using an old terrible (32bit) and unsupported version anymore as far as i know full of bugs.
Try to think about it but in any case try to replace SERVER= with CONNECTSTRING= or SERVICE_NAME with SID
I need to connect my Microsoft Report Builder to Oracle DB but I could not seem to find the correct connection string for Oracle.
I tried:
Specifying username and password
Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;Integrated Security=no;
but it returned:
Is it saying that I need to download the Oracle driver? Or should I get the connection string for Oracle DB?
If you don't already have it, you will need the Oracle Client installed. It will include an ODBC driver. ODBC is a wrapper for the Oracle Client, not a replacement. When setting up your connection you will also need to get the connection properties from the DBA (e.g. hostname/ip address, port, service name, username and password).
See documentation here:
https://docs.oracle.com/en/database/oracle/oracle-database/19/adfns/odbc-driver.html
https://www.oracle.com/database/technologies/releasenote-odbc-ic.html
I am able to connect to database using sqlplus /nolog but SQL Developer throws the below error when I connect to it
here are my configuration in tnsnames.ora
and listener.ora
SQL /nolog does not connect to database.
If you are able to connect using conn then need to see parameter passed while connecting database in SQL developer
Which connection type are you using while connecting using SQL developer?
Are you having multiple oracle homes on the server if yes then check which home you are pointing to.
Background: I am really new. Informatica Developer for PowerCenter Express Version: 9.6.1 HotFix 2
I am trying to connect to a sql server 2012 database. I created this connection
, basically just changed the server, database in connection string of meatadata access and data access. I have tested I can use the user name password to access the sql server in sql server management studio. And when I click test it reports successful.
But when I create a mapping and a physical object (read) based on that connection, when I try data view on that object, it reports this error:
[LDTMCMN_0029] message [com.informatica.sdk.dtm.ExecutionException: [LDTM_0072] RR_4036 Error connecting to database [
Microsoft SQL Server Native Client 11.0: Login timeout expired
SQL State: HYT00 Native Error: 0
Microsoft SQL Server Native Client 11.0: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
SQL State: 08001 Native Error: 87
Microsoft SQL Server Native Client 11.0: SQL Server Network Interfaces: Connection string is not valid [87].
SQL State: 08001 Native Error: 87
State: 1 Severity: 16
SQL Server Message: SQL Server Network Interfaces: Connection string is not valid [87].
Database driver error...
Function Name : Connect
Database Error: Failed to connect to database using user [bcsgetl] and connection string [192.168.100.88:1433].].]
One thing to note, when I created that physical object, I used that connection and I was able to select a table, which proves the connection is successful.
As from the error message "Connection string is not valid".
For a Native SQL Server connection work without provide it
Your can try a connection with the ODBC protocol, but instead as for the PowerCenter, where it need to be created a ODBC 64 bit connection on the Windows Server 2012, for the developer and PowerCenter Express, instead I found that it need still an ODBC but from the local machine.
Follow this steps:
-Launch the ODBC Administrator using the odbcad32.exe file located in the
C:\Windows\SysWOW64 directory.
-Create a new ODBC SQL data source under user and make sure do not use space in the name.
-Restart the Developer Client.
-Create in the Developer Client a ODBC connection with your parameters.
Please make sure to use as "Connection String" the same you used for the ODBC source on your local machine.
So if you called it "SQL_Local" that is your Connection String