SQL Sessions and the DROP DATABASE command

From: "Carl Olivier" <carl(at)zero-one(dot)co(dot)za>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: SQL Sessions and the DROP DATABASE command
Date: 2003-03-06 09:25:20
Message-ID: BCEKIKAMLDKFEKBNELFKOELFCGAA.carl@zero-one.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Greetings.

I need to be able to call the DROP DATABASE database command via JDBC.

Unfortunately I need to kill off any active connections to the specified
database before the DROP DATABASE command will work.

Is there anyway from within a JDBC connection to say the template1 database
as the superuser on a POSTGRESQL server to:

1. Determine what connections are open and active to a specified database
2. Kill ALL these sessions.

Thank you in advance,

Carl Olivier

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2003-03-06 13:33:35 Re: SQL Sessions and the DROP DATABASE command
Previous Message Chris Malan 2003-03-06 04:02:12 Data Source