Remove SQL database from SQLExpress


I have a really simple problem but can’t seem to find the solution. Basically I have MSQL express installed on my personal computer and I installed some software that created a database in SQLexpress.

The installation didn’t complete and I can’t complete a retry of the installation because the database that was created still exists.

My question is:

  • How exactly do i delete the database created by the program in sql express? I know how to do it in regular SQL but sqlexpress doesnt seem to have the same type of administrative interface.

Thank you in advance.

you don’t need an administrator program to manage the database. just open whatever application you use to run queries against the database (you could even use access in SQL passthrough mode) and issue a statment like this: drop database foobar

Or run SqlCmd.exe to execute sql commands against a sql express instance.

Thank you for the reply. When trying to run the sqlcmd.exe i get the following error:

 C:\\Documents and Settings\\user>SqlCmd.exe -q Delete -d WASPDB
 HResult 0x2, Level 16, State 1
 Named Pipes Provider: Could not open a connection to SQL Server [2].
 Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..
 Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

Any ideas? all i want to do is completely remove one database from sql express lol.

Thank you in advance.

You might need to specify the server if it is not the default instance name. Also, I think the -q statement is not correct; it probably should be “DROP DATABASE [DbName]”. And you want to connect to MASTER, not your database. Or it will not let you drop it because it has open connections.

Or you could just connect using SqlExpress Manager and right click . . .