Odoo Help


Could not drop database openerp7

Yassine TEIMI
on 7/21/14, 12:02 PM 1,742 views

I was trying to drop a database from user interface, but it came up with "Could not drop database" error message, I also tried to drop it from terminal by using : sudo -u postgres dropdb db_to_drop, but it showed up with : 

could not change directory to "/root"
dropdb: database removal failed: ERROR:  database "db_to_drop" is being accessed by other users
DETAIL:  There are 17 other session(s) using the database.

There are no other users connected while I was trying to drop this database. How this can be done ? 

Thanks a lot.

Yassine TEIMI
On 7/21/14, 12:19 PM

Thanks for he reply, in fact, the key solution was to restart postgresql service at least 2 times, with : sudo service postgresql restart, this automatically loged out users from postgresql, and give me the possibility to drop the desired database, with :  sudo -u postgres dropdb db_to_drop. 

On 7/21/14, 12:12 PM

On terminal try this command

dropdb "bdd_name".

I suppose you have admin access.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 7/21/14, 12:02 PM
Seen: 1742 times
Last updated: 3/16/15, 8:10 AM