This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Interesting connection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Interesting connection problem" Watch "Interesting connection problem" New topic

Interesting connection problem

Bill White
Ranch Hand

Joined: Oct 27, 2002
Posts: 82
Well to me atleast...
Suppose I want to connect to a database type (Oracle, mySql etc...) and then create a DB through JDBC. Is this even possible? After all I am not giving a DB name for the URL.
I feel this concept would be pretty powerful if it is possible.
Any ideas?
Thank You
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
well, first off i don't know
But you connect to an 'instance' not the database, so if you can find a way to connect 'as sysdba' then i guess the rest should be easy?
Surendran Velath

Joined: Apr 23, 2003
Posts: 19
I tried this:
Create user ddd identified by ddd
through JDBC for Oracle database and it worked
But when I fired
Grant all privileges to ddd
I got an exception:
java.sql.SQLException: ORA-01003: no statement parsed
But I am able to create table etc, in that db
through JDBC and also Oracle SQL *Plus
I agree. Here's the link:
subject: Interesting connection problem
It's not a secret anymore!