Thread: Database Instance Creation via Java/JDBC

Database Instance Creation via Java/JDBC

From
"Carl Olivier"
Date:
Greetings.
 
I posted a question to this list a couple of days ago, but maybe it got lost ;)
 
Anyway, what I am trying to find out is whether it is possible to remotely interact with a POSTGRSQL database server over JDBC from within Java code to perform the following operations:
 
1.  Create and initialise a new database instance entirely (files, caching, etc)
2.  Retrieve a list of databases as well as their current states
3.  Delete (drop) a specified database instance entirely
4.  Change the state of a specified database instance (from offline to running etc)
5.  Any additional information retrieval possbile would also be great.
 
If anyone has ANY information (even negative) I would really appreciate it!
 
Thank you in advance,
 
Carl Olivier
Director
tel  +27 21 7955197
fax +27 21 7955212
cell +27 82 7729753
 
carl@zero-one.co.za
www.zero-one.co.za
 
developers of the future
01 zero one
-----------------------------------------------------------------
Confidentiality agreement:  This email contains information which is the property of Zero One. The information contained herein is confidential and may not be disclosed to any parties other than the intended recipient without the express written consent of Zero One.
 

Re: Database Instance Creation via Java/JDBC

From
Daniel Serodio
Date:
On Mon, 2003-02-17 at 11:10, Carl Olivier wrote:
> Greetings.
>
> I posted a question to this list a couple of days ago, but maybe it
> got lost ;)
>
> Anyway, what I am trying to find out is whether it is possible to
> remotely interact with a POSTGRSQL database server over JDBC from
> within Java code to perform the following operations:
>
> 1.  Create and initialise a new database instance entirely (files,
> caching, etc)

Use CREATE DATABASE (see create_database(7l)).

> 2.  Retrieve a list of databases as well as their current states
> 3.  Delete (drop) a specified database instance entirely

DROP DATABASE (drop_database(7l))

> 4.  Change the state of a specified database instance (from offline to
> running etc)
> 5.  Any additional information retrieval possbile would also be great.
>
> If anyone has ANY information (even negative) I would really
> appreciate it!
>
> Thank you in advance,
>
> Carl Olivier
> Director
> tel  +27 21 7955197
> fax +27 21 7955212
> cell +27 82 7729753

See the documentation for PostgreSQL SQL commands, and use
statement.execute(...)

--
Daniel Serodio <daniel@checkforte.com.br>
CheckForte