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]



Reply via email to