Home > Archive > MS SQL Server > March 2006 > Can I delete a DB and add it back under same name?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Can I delete a DB and add it back under same name?
HK

2006-03-29, 8:23 pm

Are there any "cleaning" issues I should know about if I delete a database
in 2005, and then add it back under the same name with a newer .BAK file?
I know how to delete, and how to import a backup, but I don't know if there
are suggested cleaning steps between. Anything I should do?


oj

2006-03-29, 8:23 pm

drop database <db>

should delete it from sql catalog and remove the data file from disk.

--
-oj



"HK" < replywithingroup@not
real.com> wrote in message
news:YBFWf.19819$%d.12971@tornado.socal.rr.com...
> Are there any "cleaning" issues I should know about if I delete a database
> in 2005, and then add it back under the same name with a newer .BAK file?
> I know how to delete, and how to import a backup, but I don't know if
> there
> are suggested cleaning steps between. Anything I should do?
>
>



HK

2006-03-30, 3:23 am

So no extra cleanup steps needed? I imagine there COULD be weird things
left behind.


"oj" <nospam_ojngo@home.com> wrote in message
news:u%23lFZ15UGHA.6048@TK2MSFTNGP11.phx.gbl...
> drop database <db>
>
> should delete it from sql catalog and remove the data file from disk.
>
> --
> -oj
>
>
>
> "HK" < replywithingroup@not
real.com> wrote in message
> news:YBFWf.19819$%d.12971@tornado.socal.rr.com...
database[color=darkr
ed]
file?[color=darkred]
>
>



amish

2006-03-30, 3:23 am

Just drop the database it will delete related files.
If database is offline only in that case you have to manually delete
files.

Then restore databse.

Regards
Amish Shah

Tibor Karaszi

2006-03-30, 3:23 am

The only thing I can think of is backup history in the msdb database.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/

Blog: http:// solidqualitylearning
.com/blogs/tibor/



"HK" < replywithingroup@not
real.com> wrote in message
news:0OHWf.17622$w86.15212@tornado.socal.rr.com...
> So no extra cleanup steps needed? I imagine there COULD be weird things
> left behind.
>
>
> "oj" <nospam_ojngo@home.com> wrote in message
> news:u%23lFZ15UGHA.6048@TK2MSFTNGP11.phx.gbl...
> database
> file?
>
>


amish

2006-03-30, 11:23 am

when you drop a database through EM it will ask to delete history about
backup and restore.

If you drop database using TSQL you will have to delete history
maually.


Regards
Amish Shah

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com