Yes. I had been connecting to mysql previously. So my url was in the
format jdbc:mysql://host:port/dbname. I was trying to connect with a
similar string of the format jdbc:oracle://host:port/schema. This
clearly didn't work. I changed the url format to
jdbc:oracle:thin:@host:port:SID and it worked.
It's a shame that the urls can't be in the same format. Oh well...
Thanks.
Martin Kal�n wrote:
Laran Evans wrote:
So is there some trick to running the create-db task in the generator
to create a database in Oracle?
Just make sure that database hostname, port number and Oracle SID are all
set in the oracle or oracle9i profile you are using in OJB.
When I run the task I get a "The Network Adapter could not establish
the connection". However I know the host name is correct (I'm echoing
it out in the ant target.).
I can ping that host. And I can telnet to port 1521 on that host. So
I know Oracle is alive on that box.
Maybe the SID needs to be changed?
Since multiple Oracle instances might be running on the same machine,
the SID needs to be correct for the Oracle TNS-listener to
"answer your call".
You can test connectivity with any JDBC client program (eg SQuirreL SQL)
and determine the SID from the last part of your JDBC URL (if you are
using the thin driver).
Eg: if you can connect with JDBC URL
"jdbc:oracle:thin:@myhost:mypost:SID",
you know that your SID is "SID".
If you are using Oracle OCI and an alias, you have to check tnsnames.ora,
which is located in ORACLE_HOME/network/admin/tnsnames.ora, and the
"(SID = xxx)" parameter of the OCI alias you can connect with.
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]