I am using Stylus Studio 2007 Ent Suite trying to connect to a system running oracle 10g.
I used File Explorer based the following connection string but got error:
java.sql.SQLException: [XQuery][Oracle JDBC Driver][Oracle]ORA-12505 Connection refused, the specified SID (samprd) was not recognized by the Oracle server.
at com.ddtek.xquery.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ddtek.xquery.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ddtek.xquery.jdbc.oracle.OracleImplConnection.makeConnectionHelper(Unknown Source)
at com.ddtek.xquery.jdbc.oracle.OracleImplConnection.makeConnection(Unknown Source)
at com.ddtek.xquery.jdbc.oracle.OracleImplConnection.connectAndAuthenticate(Unknown Source)
at com.ddtek.xquery.jdbc.oracle.OracleImplConnection.open(Unknown Source)
at com.ddtek.xquery.jdbc.base.BaseConnection.connect(Unknown Source)
at com.ddtek.xquery.jdbc.base.BaseConnection.setupImplConnection(Unknown Source)
at com.ddtek.xquery.jdbc.base.BaseConnection.open(Unknown Source)
at com.ddtek.xquery.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at com.stylusstudio.DataDirectDDXQStub.connect(DataDirectDDXQStub.java:74)
at com.stylusstudio.DataDirectDDXQStub.getConnection(DataDirectDDXQStub.java:108)
The older system is running on an older version of Oracle. And I can connect to it from Stylus Studio, also the generated java code (on Solaris) from a simple xquery wrapper using doc("db:///file://./s.rdbxml")
So I copied .rdbxml file and used the new host/service_name. The SQL statement is the same and the java code is able to connect to the server and get the sql result back.
Am I using the File Explorer correct? Is there something related to the SERVICE_NAME vs. SID?
Database Type: Oracle
Server URL: //10.10.10.10:1521;SID=samprd
Username: user
Password: ******
Sorry I need to correct one statement on the first post: the updated java code for the new system is NOT working, which actually returns the same error code ORA-12505.
Subject:connection to oracle 10g Author:chong zhang Date:26 Sep 2007 10:31 AM
Thanks Ivan. The SID is the issue, which is a different name samprd2.
Now I can connect to the DB using File Explorer
with both jdbc:xquery:oracle://10.10.10.10:1521:SID=samprd2
and jdbc:xquery:oracle://10.10.10.10:1521:ServiceName=samprd
Another question coming out: I tried to create a .rdbxml file using "DB to XML Data Source" but only the SID=samprd2 works, and the ServiceName=samprd failed on "ORA-12505 Connection refused, the specified SID (ORCL) was not recognized by the Oracle server."