From: | "Nidhi Srivastava" <nsrivastava(at)quark(dot)com> |
---|---|
To: | "Kris Jurka" <books(at)ejurka(dot)com> |
Cc: | "Thomas Dudziak" <tomdzk(at)gmail(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>, "John R Pierce" <pierce(at)hogranch(dot)com> |
Subject: | Re: Create Database using JDBC |
Date: | 2005-07-04 09:35:26 |
Message-ID: | 2BC68159E3EC814BA1E81C108DF99A4203A37FE4@EXCH-IND-VS1.india.quark.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
But even that alternate template database would need to be created the
first time after server installation by connceting to the template1 DB??
Right??
All I want is to automate database creation the first time after server
installation eliminate user inputs
-----Original Message-----
From: Kris Jurka [mailto:books(at)ejurka(dot)com]
Sent: Monday, July 04, 2005 3:01 PM
To: Nidhi Srivastava
Cc: Thomas Dudziak; pgsql-jdbc(at)postgresql(dot)org; John R Pierce
Subject: Re: [JDBC] Create Database using 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
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Dudziak | 2005-07-04 11:09:29 | Re: Create Database using JDBC |
Previous Message | Kris Jurka | 2005-07-04 09:33:32 | Re: Streaming blob to db |