Re: Create Database using JDBC

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Nidhi Srivastava <nsrivastava(at)quark(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Create Database using JDBC
Date: 2005-07-01 12:30:21
Message-ID: 01D427A8-9B3A-457E-8371-C1BA62416274@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Is it possible you have an existing open transaction on template1 ?

Have a look at the postgresql logs.

Dave
On 1-Jul-05, at 4:30 AM, Nidhi Srivastava wrote:

> Hi all
>
>
>
> I wish to create a database if one doesn’t exist using JDBC. I
> tried connecting to template1 database and then issuing the “CREATE
> DATABASE test” command but I get the following error :
>
>
>
> ERROR: CREATE DATABASE: source database "template1"
> is being accessed by other users
>
>
>
>
> How do I resolve this? I’m using PostGreSQL8.0
>
>
>
> Thanks & Regards
>
> Nidhi
>
>

Dave Cramer
davec(at)postgresintl(dot)com
www.postgresintl.com
ICQ #14675561
jabber davecramer(at)jabber(dot)org
ph (519 939 0336 )

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Dudziak 2005-07-01 12:39:44 Re: Create Database using JDBC
Previous Message Csaba Nagy 2005-07-01 10:36:00 Re: Create Database using JDBC