Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 drop database

Author  Topic 

charles1309
Starting Member

15 Posts

Posted - 2007-11-20 : 12:57:10
anyone know how to drop my databse on sql pleasee

charles

X002548
Not Just a Number

15586 Posts

Posted - 2007-11-20 : 13:00:06
FIRST backup our database

Then

DROP DATABASE <dbname>


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-11-20 : 13:00:38
Look it up in books online, click on index and type in drop database it will tell you all you need to know about it.



Future guru in the making.
Go to Top of Page

charles1309
Starting Member

15 Posts

Posted - 2007-11-20 : 18:26:07
how do i know what is the name of the databse brett

charles
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-20 : 19:01:11
quote:
Originally posted by charles1309

how do i know what is the name of the databse brett

charles


If you don't know that answer, then you should not be dropping the database. Contact someone else in your organization with more experience to assist you with this.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Butterfly82
Starting Member

30 Posts

Posted - 2007-11-20 : 19:30:45
Yeah, it's a little worrying that you don't know the name of the database.

One way you could identify the DB name though is through using Query Analyzer or SSMS. Locate the DB that has the tables (assuming you know the tables) that are in the DB you are looking for using the Object Explorer panel.
Hopefully you don't have many databases, if so this method could take some time.

I agree with tkizer, though it seems like this is for learning purposes. I would still make a backup of it to be safe. Keep in mind that dropping a database erases everything within it, its tables, data etc.

Hope this helps
Butterfly82
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-21 : 00:54:09
quote:
Originally posted by charles1309

how do i know what is the name of the databse brett

charles


Wont you make use of sql server help file?
Read about name of database there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-11-21 : 07:46:35
quote:
Originally posted by charles1309

how do i know what is the name of the databse brett

charles


This is how we do it in MS SQL Server.
select db_name()





KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Butterfly82
Starting Member

30 Posts

Posted - 2007-11-21 : 10:07:16
quote:
Originally posted by khtan

This is how we do it in MS SQL Server.
select db_name()



Or you could do it this way I'm learning all the time!
Go to Top of Page
   

- Advertisement -