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.
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.
> 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. ;-)
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