I haven't worked with OOo Base and JDBC connections, yet. But I have some experience with Java programs that have to access Oracle databases. Oracle offers a "thick" and a "thin" driver. The thick driver has some advanced features that mainly improve performance in some cases, but it requires an additional configuration setting inside an Oracle directory on each client computer that wants to access the database server.
You are using the thin driver, this works out of the box as it is implemented in pure Java. It's probably easier to start with.
The thin driver needs 3 parameters to make the connection: IP address or hostname of the database server, the port on which the Oracle service is listening (usually 1521) and the SID of the database instance. The oracle database server is separated into a part that excepts remote connections (the listener) and database instances that actually serve the data.
The listener accepts all TCP/IP requests on port 1521, looks at the SID (or the service name) and dispatches that request to the database instance that uses the specified SID.
briglia23 wrote:
But obtain this error
Code: Select all
ORA-12514: The listnner does not currently know of service requested in connect descriptor
The connection descriptor is : oracledbracprod02pub:1521/asdbp2
I tried to replace oracledbracprod02pub whith his ip addres but i obtain the same error.
This error message says that the initial TCP/IP connection to oracledbracprod02pub:1521 was established, because otherwise you could not get the information that the listener did something that failed. In other words the first two parameters of your connect string are okay, the problem is with the
asdbp2.
Oracle versions starting from 9i (or maybe already 8i) use a so called "service name" instead of an SID. But the JDBC thin driver doesn't support "service names". so you have to use the old style SIDs with the thin driver. (The service name did not replace the SID, but the SID is still used in parallel.)
Your hostname is oracledb
racprod02pub. RAC is the database cluster product line of Oracle. It might well be that the thin client can't connect to a database that uses cluster technology?
So apart from what FJCC suggested to debug the problem you will have to talk to your database administrator and need to figure out if your really got the SID and not the service name, when you got the asdbp2.
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.