How to create an Oracle DATABASE through Java Programming Language.. ?

How to create an Oracle DATABASE through Java Programming Language.. ?
[77 byte] By [Shebua] at [2007-11-27 9:58:38]
# 1
Don't.
cotton.ma at 2007-7-13 0:29:19 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
hi... thanks for reply.. BUT... seems u know something in this regards.. can u share ?
Shebua at 2007-7-13 0:29:19 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

I have already told you in another thread, you can't. At least not through SQL. If you make elaborate and carefule use of Runtime.exec(), maybe, but that is definately not a good suggestion.

Now creating a table (or even a tablespace/schema) is no problem, although still not, necessarily, a good idea, but creating a "Database" (i.e. an SID) is not such a simple process.

masijade.a at 2007-7-13 0:29:19 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
Sometimes I think the secret motto of this forum is"If at first you don't like the answer: ask, ask again"
cotton.ma at 2007-7-13 0:29:19 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

It depends on the DB used. With MySQL for example it's just possible. In MySQL, connect to the DB as root user and leave the databasename away in the connection URL, i.e. "jdbc:mysql://localhost/". Then you can execute CREATE DATABASE commands on it. To use the DB, you have to disconnect and then reconnect using the databasename.

BalusCa at 2007-7-13 0:29:19 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6

> It depends on the DB used. With MySQL for example

> it's just possible. In MySQL, connect to the DB as

> root user and leave the databasename away in the

> connection URL, i.e. "jdbc:mysql://localhost/". Then

> you can execute CREATE DATABASE commands on it. To

> use the DB, you have to disconnect and then reconnect

> using the databasename.

True. But the DB this time is specifically Oracle. ;-)

masijade.a at 2007-7-13 0:29:19 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7

Oracle database administrators tend to be control freaks, especially in financial institutions where security is paramount.

In general, they will supply you with a database, but require you to supply all the DDL scripts to create tables, indexes, views etc.

So a certain amount of manual installation will always be required.

Typically you would supply the SQL scripts, and a detailled installation document too.

regards,

Owen

omcgoverna at 2007-7-13 0:29:19 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...