Thursday, March 22, 2012

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

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?drop database <db>
should delete it from sql catalog and remove the data file from disk.
-oj
"HK" <replywithingroup@.notreal.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?
>|||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@.notreal.com> wrote in message
> news:YBFWf.19819$%d.12971@.tornado.socal.rr.com...
database[vbcol=seagreen]
file?[vbcol=seagreen]
>|||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|||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@.notreal.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?
>|||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

No comments:

Post a Comment