Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to create/drop a database from Java (via JDBC)?

Re: How to create/drop a database from Java (via JDBC)?

From: Mark Bole <makbo_at_pacbell.net>
Date: Sat, 21 Feb 2004 01:26:54 GMT
Message-ID: <ytyZb.15502$oz5.4396@newssvr29.news.prodigy.com>


Steffen Siebert wrote:

> Hi,
>
> I'm new to oracle and have to implement a java tool using JDBC to
> create and drop a oracle 9i database (finally it should work on all
> platforms, but linux is the main platform).
>
> I've found documentation on the "create database" statement, but with
> its many parameters it's very confusing. And I even don't know which
> user/password combination is allowed to execute this statement.
>
> And to drop a database seems even harder...
>
> Can someone tell me whether this is doable with java and how to do it?
> Ready to compile/run java source is welcome, too ;)
>
> Thanks in advance,
> Steffen

Allow me to be the first to address the other half of the question:

how to drop a database.

To quote from the Perl DBI FAQ:

      "Database creation and deletion are concepts that are
      entirely too abstract to be adequately supported by DBI. For
      example, Oracle does not support the concept of dropping a
      database at all! Also, in Oracle, the database server
      essentially is the database, whereas in mSQL, the server
      process runs happily without any databases created in it.
      The problem is too disparate to attack in a worthwhile way."

That kind of says it all, in a disparate way... (and yes, we all realize by now that you can easily drop a schema in Oracle, and yes, you can "startup nomount" an Oracle instance).

Once we get past the "SQL Server vs. Oracle terminology" difference, the bottom line is, it's pretty darn ambitious to try to code an idiot-proof solution that works in "MS SQL, Postgres and SAPDB, [and] I'm still hoping that also Oracle can be tackled."

--Mark Bole Received on Fri Feb 20 2004 - 19:26:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US