471,337 Members | 795 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Starting and stopping database by JAVA

Hello,

is there a possibility starting or stopping postgres database and
creating database instance by JAVA? Is there some API available for
this? If yes, can you please write some example, how to do it?

Thank you in advance,

with best regards,

Julian Legeny

mailto:ju****@livetrade.cz
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
1 1425
ju****@livetrade.cz wrote:
Hello,

is there a possibility starting or stopping postgres database and
creating database instance by JAVA? Is there some API available for
this? If yes, can you please write some example, how to do it?


Starting/stopping a system service is by its nature going to be
operating-system specific, so I think you're best bet would be to call
some external scripts to do this.

Creating a new database can be done by connecting to database template1
and issuing "CREATE DATABASE ...", you can do similarly with users. See
the "SQL Commands" section of the manuals for details.

HTH
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by tshad | last post: by
6 posts views Thread by Andrew Poulos | last post: by
1 post views Thread by Darren Withers | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.