Friday, March 9, 2012

recover a database without backup

You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
guaranteed if you first detached the database, though.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> Hi,
> Is there any way to recover a sql database from a file system backup (.mdf
> and .ldf files copies taken every night while sql was up and running)? The
> client does not have any sql backups. I know he should ...
> Thanks very much.
> --
> Brian
It is worth a try, it is likely it will work even though you didn't detached first.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...[vbcol=seagreen]
> unfortunately it was not detached... those files restored were just image
> copied during OS backup process... thanks anyway.
> --
> Brian
>
> "Tibor Karaszi" wrote:
|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OxIuUgpgHHA.2640@.TK2MSFTNGP06.phx.gbl...
> It is worth a try, it is likely it will work even though you didn't
> detached first.
Be forewarned, even if it it DOES work... you may have corruption.
I'd certainly run a DBCC CHECKDB on all the databases. (with all the flags)

> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

No comments:

Post a Comment