Thread: dropdb command not working.

dropdb command not working.

From
"Pradeepkumar, Pyatalo (IE10)"
Date:


Hi all,

I am trying to use the dropdb command, but it is failing. The following error message is displayed -

dropdb: database removal failed: ERROR:  database "eps_db" is being accessed by other users

But there are no other users accessing the database. Is there an option to forcefully delete the database even if other users are accessing it.

Thanks in advance.

Regards,
Pradeep

Re: dropdb command not working.

From
Michael Fuhr
Date:
On Tue, Jan 18, 2005 at 10:29:32PM -0700, Pradeepkumar, Pyatalo (IE10) wrote:
>
> dropdb: database removal failed: ERROR:  database "eps_db" is being accessed
> by other users
>
> But there are no other users accessing the database.

How do you know that?  What does the following query show?

SELECT * FROM pg_stat_activity;

> Is there an option to forcefully delete the database even if other
> users are accessing it.

It might be better to find out who's using the database and why
before dropping it.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/