SQL Sessions and the DROP DATABASE command

Поиск
Список
Период
Сортировка
От Carl Olivier
Тема SQL Sessions and the DROP DATABASE command
Дата
Msg-id BCEKIKAMLDKFEKBNELFKOELFCGAA.carl@zero-one.co.za
обсуждение исходный текст
Ответ на Timestamp precision  (Daniel Bruce Lynes <dlynes@shaw.ca>)
Ответы Re: SQL Sessions and the DROP DATABASE command
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Daniel Bruce Lynes
Дата:
Сообщение: Timestamp precision
Следующее
От: Chris Malan
Дата:
Сообщение: Data Source