Re: Create Database using JDBC

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Create Database using JDBC
Дата
Msg-id Pine.BSO.4.56.0507040428390.12238@leary.csoft.net
обсуждение исходный текст
Ответ на Re: Create Database using JDBC  ("Nidhi Srivastava" <nsrivastava@quark.com>)
Список pgsql-jdbc

On Mon, 4 Jul 2005, Nidhi Srivastava wrote:

> Even when I'm not accessing templte1 but any other scratch database
> through pgAdmin and try to create a new DB using JDBC I get the same
> ERROR:  CREATE DATABASE: source database "template1" is being accessed
> by other users. Is there a way to check if a DB exists and create it if
> it doesn't using JDBC. How can I ensure that pgAdmin is not open on any
> of the client machines and connected to the Postgre server on my
> machine....becuase if even a single pgAdmin client is open on any of the
> client machines it doesn't allow me to create a new DB throwing the
> above error.
>

I would suggest using an alernate template database to create new
databases with.  You could even mark it to refuse connections to ensure no
one else will connect to it and block your operation.

Kris Jurka

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

Предыдущее
От: "Nidhi Srivastava"
Дата:
Сообщение: Re: Create Database using JDBC
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Streaming blob to db