Questions tagged [drop-database]

46 questions
50
votes
3 answers

Drop database return "Error dropping database errno: 66" in MySQL

Consider: DROP DATABASE db_name; ERROR 1010 (HY000): Error dropping database (can't rmdir './db_name', errno: 66) The problem is that I don't know where the file/directory is located - this file is missing in /usr/local/mysql/bin/... How do I fix…
user984621
  • 46,344
  • 73
  • 224
  • 412
29
votes
8 answers

Error in dropping a database in MySQL (can't rmdir '.\oro', errno: 41)

I can't delete a database from mysql. The error is like ERROR 1010 (HY000): Error dropping database (can't rmdir '.\oro', errno: 41) I tried to drop the database 'oro' using phpmyadmin and it also showing the same error message and alerts "DROP…
Dan
  • 425
  • 1
  • 5
  • 13
26
votes
1 answer

Reclaim disk space after drop database in mysql

I've created some very large databases and have since dropped a few. I've noticed my disk space has not recovered as much as I had expected. For instance, the last database I added actually used up all of my free space and aborted, so I dropped…
VenerableAgents
  • 645
  • 1
  • 8
  • 16
20
votes
3 answers

How do I drop SQL Databases? sp_delete_database_backuphistory woes

I want to delete some SQL Databases on my server, but I'm having problems. My login has the roles: public dbcreator serveradmin When I right click the database and hit Delete, it says that Delete backup history failed for server 'MYSERVER' …
rlb.usa
  • 14,942
  • 16
  • 80
  • 128
7
votes
7 answers

Delete sqlite db file

I am developing a C# application with its backend as sqlite. In my application I have a button for cleaning the database (deleting the .db file and creating it again with some initial data). Sometimes when I try to delete the db it says it cannot be…
Sangeetha
  • 601
  • 3
  • 12
  • 26
7
votes
2 answers

SQLCMD - trying to drop a database with alphanumeric name '14Data' gives Syntax Error

I am using SQL SERVER 2005 Express. I can delete the database from the query analyzer, what you call Mgmt Studio (ssmsee) by providing double quotes to the database name and things get done; Drop Database "14data" Go and the db is gone, but sqlcmd…
maqk
  • 313
  • 2
  • 7
  • 18
7
votes
2 answers

Database Project to Drop Database before deploy?

Is it possible to get VS to drop the destination database before a deploy? I've tried adding a post deploy script to the project, but it always comes back with active connections.
7
votes
1 answer

"ERROR 2013 (HY000): Lost connection to MySQL server during query" while dropping database

I have an empty database that I cannot drop. Initially, it contained a table that I couldn't SELECT from. So I DROP'ed all tables from that database and tried to DROP the database without success : mysql> drop database my_database; ERROR 2013…
Sylvain
  • 1,518
  • 1
  • 15
  • 15
5
votes
0 answers

Dropping database in use with EF Core

I need to programmatically drop an EF core database. No problem, right? Get a context, call ctx.Database.EnsureDeleted(), and you're all set. Except.. when the DB is in use, you're using connection pooling (there's good reason to do so), you can run…
Stephan Steiner
  • 1,043
  • 1
  • 9
  • 22
5
votes
2 answers

PHP/MYSQL - Drop database using prepared statement

I would like to drop a database using PDO. This approach was the best one to me function delete_db($database) { $statement = $my_pdo_obj->prepare("DROP DATABASE IF EXISTS :database"); $statement->bindParam(":database", $database); …
Xor
  • 199
  • 1
  • 2
  • 8
5
votes
3 answers

SSMS drop failed for database "Unable to open physical file"

Tried to find this elsewhere with no luck. I'm trying to drop databases that no longer exist on disk, but still show up in the Object Explorer in SSMS 2014 So how can I 'clean them out' of the Object Explorer? Do I need to manually remove them from…
Robert Achmann
  • 1,986
  • 3
  • 40
  • 66
5
votes
1 answer

How do you prevent a VS2010 Database Project Deployment from generating a drop database?

Suppose you have a database project and you do NOT have "Always re-create database" checked off in your Database.sqldeployment settings. And suppose you deploy to a server that already has a database by the name of the one you are deploying. Under…
4
votes
1 answer

Why am I not able to drop postgres database

I am trying to drop a postgres database. But I am always getting a There is 1 other session using the database error. I tried stopping all the sessions with this command select pg_terminate_backend(pid) from pg_stat_activity where…
Sashaank
  • 880
  • 2
  • 20
  • 54
4
votes
1 answer

PostgreSQL: Why does DROP DATABASE databaseName keep Schemas and Relations of the deleted DB in psql?

In Postgres, PSQL one can execute commands from file with the \i command. I did this by creating a DATABASE, a SCHEMA, some TABLES, and a VIEW with this little file: DROP DATABASE IF EXISTS databaseName; CREATE DATABASE databaseName ; CREATE…
Simeon
  • 748
  • 1
  • 9
  • 26
3
votes
3 answers

dbeaver 7.1.1 delete database

How can I delete a database in Dbeaver? I set as default another db but still have an error.
Griha Mikhailov
  • 655
  • 1
  • 9
  • 16
1
2 3 4