My client had a hard disk crash, was running SQL 7.0. The disk engineers were
able to recover the MDF and NDF for a particular database, and I was trying
to attach the MDF back to our new server (SQL 2000). However, because the LDF
transaction log is missing, it is refusing to do so. We were using a "simple"
log model, so I'm not sure if the transaction log even had anything to useful.
I've tried "fooling" SQL server, like copying a good LDF file of a similary
named database, but it knows it's not part of the set and wont recover it.
Also, barring the inability to restore it, is there a tool to break apart a
big MDF file and get to the underlying tables that make it up, so at least
perhaps I can recover some of the data in some of the tables?
Thanks,
Bill Rosman
Chicago,IL
Have you tried sp_attach_single_file_db?
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rosman Computing" <RosmanComputing@.discussions.microsoft.com> wrote in
message news:6049E918-795A-47A5-9716-AF3A627E313C@.microsoft.com...
> My client had a hard disk crash, was running SQL 7.0. The disk engineers
> were
> able to recover the MDF and NDF for a particular database, and I was
> trying
> to attach the MDF back to our new server (SQL 2000). However, because the
> LDF
> transaction log is missing, it is refusing to do so. We were using a
> "simple"
> log model, so I'm not sure if the transaction log even had anything to
> useful.
> I've tried "fooling" SQL server, like copying a good LDF file of a
> similary
> named database, but it knows it's not part of the set and wont recover it.
> Also, barring the inability to restore it, is there a tool to break apart
> a
> big MDF file and get to the underlying tables that make it up, so at least
> perhaps I can recover some of the data in some of the tables?
> Thanks,
> Bill Rosman
> Chicago,IL
|||Yes I have tried sp_attach_single_file, but it still keeps on looking for the
LDF transaction log file.
bill r.
"Paul S Randal [MS]" wrote:
> Have you tried sp_attach_single_file_db?
> --
> Paul Randal
> Lead Program Manager, Microsoft SQL Server Storage Engine
> http://blogs.msdn.com/sqlserverstorageengine/default.aspx
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Rosman Computing" <RosmanComputing@.discussions.microsoft.com> wrote in
> message news:6049E918-795A-47A5-9716-AF3A627E313C@.microsoft.com...
>
>
|||try using sp_attach_db, attaching .MDF and .NDF files only, no need to
attach .LDF file, it will create a new one.
"Rosman Computing" wrote:
[vbcol=seagreen]
> Yes I have tried sp_attach_single_file, but it still keeps on looking for the
> LDF transaction log file.
> bill r.
> "Paul S Randal [MS]" wrote:
|||Well, if you know the database was shutdown cleanly (e.g. by detaching it
while SQL Server is running) then the log file won't be needed as there's
nothing to recover.
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e3gxb3pHHHA.1912@.TK2MSFTNGP03.phx.gbl...
> Whether or not a log file is needed when you attach (or similar) a
> database depends on whether there is recovery work to do in the database.
> Every time a database starts, it will see whether it has to perform
> recovery work. Recovery work include REDO and UNDO of log records. This it
> has to do because transactions might have been in flight when the database
> was shut down. If SQL Server determines that there is recovery work to be
> done, it *need* the log file.
> SQL Server will not allow you to use an inconsistent database (as in the
> case of missing log file and it need to do recovery work).
> I.e., you never know whether SQL Server can create the log file - so you
> should *never* rely on this. (Paul - I welcome elaborations and/or
> corrections to this statement... :-). )
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Celal" <Celal@.discussions.microsoft.com> wrote in message
> news:EF5EC77E-2AFA-42BA-8CEE-A5242D4AD0AF@.microsoft.com...
>
|||How would you check the bit in the file header - there's no documented way
to do so :-) and you'd have to have the database attached or know the file
header row structure.
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eaL4mWuHHHA.1264@.TK2MSFTNGP06.phx.gbl...
> Ahh, I tend to forget about the detach/offline cases. I guess my sceptism
> about these things isn't as much technical or mistrust, but more from
> these newsgroups. All the posts where SQL Server cannot create the log
> file. "I *did* detach the database first". Perhaps the simple truth is:
> a) The poster (not in this thread, I should add), claims that detach was
> performed even though it wasn't performed. ...In some vain hope that
> claiming that fact would somehow change things.
> b) I'm polluted by posts where log files cannot be created, and I just
> don't keep track of which cases detach (or offline) actually happened.
> I wish there could be some type of "FK"/link in NTFS so SQL Server could
> enforce that we cannot delete log files unless it was shutdown cleanly
> (even when SQL Server is stopped). Also, there would be nice if we could
> investigate this bit(?) in the mdf file header(?).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
> news:eM0AAPuHHHA.1240@.TK2MSFTNGP03.phx.gbl...
>
2012年3月22日星期四
Disk Crash Recover - Won't Recover my SQL Database
My client had a hard disk crash, was running SQL 7.0. The disk engineers wer
e
able to recover the MDF and NDF for a particular database, and I was trying
to attach the MDF back to our new server (SQL 2000). However, because the LD
F
transaction log is missing, it is refusing to do so. We were using a "simple
"
log model, so I'm not sure if the transaction log even had anything to usefu
l.
I've tried "fooling" SQL server, like copying a good LDF file of a similary
named database, but it knows it's not part of the set and wont recover it.
Also, barring the inability to restore it, is there a tool to break apart a
big MDF file and get to the underlying tables that make it up, so at least
perhaps I can recover some of the data in some of the tables?
Thanks,
Bill Rosman
Chicago,ILHave you tried sp_attach_single_file_db?
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstor...ne/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rosman Computing" <RosmanComputing@.discussions.microsoft.com> wrote in
message news:6049E918-795A-47A5-9716-AF3A627E313C@.microsoft.com...
> My client had a hard disk crash, was running SQL 7.0. The disk engineers
> were
> able to recover the MDF and NDF for a particular database, and I was
> trying
> to attach the MDF back to our new server (SQL 2000). However, because the
> LDF
> transaction log is missing, it is refusing to do so. We were using a
> "simple"
> log model, so I'm not sure if the transaction log even had anything to
> useful.
> I've tried "fooling" SQL server, like copying a good LDF file of a
> similary
> named database, but it knows it's not part of the set and wont recover it.
> Also, barring the inability to restore it, is there a tool to break apart
> a
> big MDF file and get to the underlying tables that make it up, so at least
> perhaps I can recover some of the data in some of the tables?
> Thanks,
> Bill Rosman
> Chicago,IL|||Yes I have tried sp_attach_single_file, but it still keeps on looking for th
e
LDF transaction log file.
bill r.
"Paul S Randal [MS]" wrote:
> Have you tried sp_attach_single_file_db?
> --
> Paul Randal
> Lead Program Manager, Microsoft SQL Server Storage Engine
> http://blogs.msdn.com/sqlserverstor...ne/default.aspx
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Rosman Computing" <RosmanComputing@.discussions.microsoft.com> wrote in
> message news:6049E918-795A-47A5-9716-AF3A627E313C@.microsoft.com...
>
>|||try using sp_attach_db, attaching .MDF and .NDF files only, no need to
attach .LDF file, it will create a new one.
"Rosman Computing" wrote:
[vbcol=seagreen]
> Yes I have tried sp_attach_single_file, but it still keeps on looking for
the
> LDF transaction log file.
> bill r.
> "Paul S Randal [MS]" wrote:
>|||> try using sp_attach_db, attaching .MDF and .NDF files only, no need to
> attach .LDF file, it will create a new one.
Whether or not a log file is needed when you attach (or similar) a database
depends on whether there
is recovery work to do in the database. Every time a database starts, it wil
l see whether it has to
perform recovery work. Recovery work include REDO and UNDO of log records. T
his it has to do because
transactions might have been in flight when the database was shut down. If S
QL Server determines
that there is recovery work to be done, it *need* the log file.
SQL Server will not allow you to use an inconsistent database (as in the cas
e of missing log file
and it need to do recovery work).
I.e., you never know whether SQL Server can create the log file - so you sho
uld *never* rely on
this. (Paul - I welcome elaborations and/or corrections to this statement...
:-). )
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Celal" <Celal@.discussions.microsoft.com> wrote in message
news:EF5EC77E-2AFA-42BA-8CEE-A5242D4AD0AF@.microsoft.com...[vbcol=seagreen]
> try using sp_attach_db, attaching .MDF and .NDF files only, no need to
> attach .LDF file, it will create a new one.
> "Rosman Computing" wrote:
>|||Well, if you know the database was shutdown cleanly (e.g. by detaching it
while SQL Server is running) then the log file won't be needed as there's
nothing to recover.
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstor...ne/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e3gxb3pHHHA.1912@.TK2MSFTNGP03.phx.gbl...
> Whether or not a log file is needed when you attach (or similar) a
> database depends on whether there is recovery work to do in the database.
> Every time a database starts, it will see whether it has to perform
> recovery work. Recovery work include REDO and UNDO of log records. This it
> has to do because transactions might have been in flight when the database
> was shut down. If SQL Server determines that there is recovery work to be
> done, it *need* the log file.
> SQL Server will not allow you to use an inconsistent database (as in the
> case of missing log file and it need to do recovery work).
> I.e., you never know whether SQL Server can create the log file - so you
> should *never* rely on this. (Paul - I welcome elaborations and/or
> corrections to this statement... :-). )
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Celal" <Celal@.discussions.microsoft.com> wrote in message
> news:EF5EC77E-2AFA-42BA-8CEE-A5242D4AD0AF@.microsoft.com...
>|||Ahh, I tend to forget about the detach/offline cases. I guess my sceptism ab
out these things isn't
as much technical or mistrust, but more from these newsgroups. All the posts
where SQL Server cannot
create the log file. "I *did* detach the database first". Perhaps the simple
truth is:
a) The poster (not in this thread, I should add), claims that detach was per
formed even though it
wasn't performed. ...In some vain hope that claiming that fact would somehow
change things.
b) I'm polluted by posts where log files cannot be created, and I just don't
keep track of which
cases detach (or offline) actually happened.
I wish there could be some type of "FK"/link in NTFS so SQL Server could enf
orce that we cannot
delete log files unless it was shutdown cleanly (even when SQL Server is sto
pped). Also, there would
be nice if we could investigate this bit(?) in the mdf file header(?).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:eM0AAPuHHHA.1240@.TK2MSFTNGP03.phx.gbl...
> Well, if you know the database was shutdown cleanly (e.g. by detaching it
while SQL Server is
> running) then the log file won't be needed as there's nothing to recover.
> --
> Paul Randal
> Lead Program Manager, Microsoft SQL Server Storage Engine
> http://blogs.msdn.com/sqlserverstor...ne/default.aspx
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:e3gxb3pHHHA.1912@.TK2MSFTNGP03.phx.gbl...
>|||How would you check the bit in the file header - there's no documented way
to do so :-) and you'd have to have the database attached or know the file
header row structure.
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstor...ne/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eaL4mWuHHHA.1264@.TK2MSFTNGP06.phx.gbl...
> Ahh, I tend to forget about the detach/offline cases. I guess my sceptism
> about these things isn't as much technical or mistrust, but more from
> these newsgroups. All the posts where SQL Server cannot create the log
> file. "I *did* detach the database first". Perhaps the simple truth is:
> a) The poster (not in this thread, I should add), claims that detach was
> performed even though it wasn't performed. ...In some vain hope that
> claiming that fact would somehow change things.
> b) I'm polluted by posts where log files cannot be created, and I just
> don't keep track of which cases detach (or offline) actually happened.
> I wish there could be some type of "FK"/link in NTFS so SQL Server could
> enforce that we cannot delete log files unless it was shutdown cleanly
> (even when SQL Server is stopped). Also, there would be nice if we could
> investigate this bit(?) in the mdf file header(?).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
> news:eM0AAPuHHHA.1240@.TK2MSFTNGP03.phx.gbl...
>|||Hehe, I knew you were to say something like that...
> How would you check the bit in the file header - there's no documented way
to do so :-) and you'd
> have to have the database attached or know the file header row structure.
If we know what bit(?) it is, we could check it with a hex editor. Or, even
produce some tiny
utility that reads the beginning of the file, see what value the bit has and
present it. Heck, that
small utility could even be produced by MS ;-).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:eIKzFlvHHHA.3540@.TK2MSFTNGP02.phx.gbl...
> How would you check the bit in the file header - there's no documented way
to do so :-) and you'd
> have to have the database attached or know the file header row structure.
> --
> Paul Randal
> Lead Program Manager, Microsoft SQL Server Storage Engine
> http://blogs.msdn.com/sqlserverstor...ne/default.aspx
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:eaL4mWuHHHA.1264@.TK2MSFTNGP06.phx.gbl...
>
e
able to recover the MDF and NDF for a particular database, and I was trying
to attach the MDF back to our new server (SQL 2000). However, because the LD
F
transaction log is missing, it is refusing to do so. We were using a "simple
"
log model, so I'm not sure if the transaction log even had anything to usefu
l.
I've tried "fooling" SQL server, like copying a good LDF file of a similary
named database, but it knows it's not part of the set and wont recover it.
Also, barring the inability to restore it, is there a tool to break apart a
big MDF file and get to the underlying tables that make it up, so at least
perhaps I can recover some of the data in some of the tables?
Thanks,
Bill Rosman
Chicago,ILHave you tried sp_attach_single_file_db?
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstor...ne/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rosman Computing" <RosmanComputing@.discussions.microsoft.com> wrote in
message news:6049E918-795A-47A5-9716-AF3A627E313C@.microsoft.com...
> My client had a hard disk crash, was running SQL 7.0. The disk engineers
> were
> able to recover the MDF and NDF for a particular database, and I was
> trying
> to attach the MDF back to our new server (SQL 2000). However, because the
> LDF
> transaction log is missing, it is refusing to do so. We were using a
> "simple"
> log model, so I'm not sure if the transaction log even had anything to
> useful.
> I've tried "fooling" SQL server, like copying a good LDF file of a
> similary
> named database, but it knows it's not part of the set and wont recover it.
> Also, barring the inability to restore it, is there a tool to break apart
> a
> big MDF file and get to the underlying tables that make it up, so at least
> perhaps I can recover some of the data in some of the tables?
> Thanks,
> Bill Rosman
> Chicago,IL|||Yes I have tried sp_attach_single_file, but it still keeps on looking for th
e
LDF transaction log file.
bill r.
"Paul S Randal [MS]" wrote:
> Have you tried sp_attach_single_file_db?
> --
> Paul Randal
> Lead Program Manager, Microsoft SQL Server Storage Engine
> http://blogs.msdn.com/sqlserverstor...ne/default.aspx
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Rosman Computing" <RosmanComputing@.discussions.microsoft.com> wrote in
> message news:6049E918-795A-47A5-9716-AF3A627E313C@.microsoft.com...
>
>|||try using sp_attach_db, attaching .MDF and .NDF files only, no need to
attach .LDF file, it will create a new one.
"Rosman Computing" wrote:
[vbcol=seagreen]
> Yes I have tried sp_attach_single_file, but it still keeps on looking for
the
> LDF transaction log file.
> bill r.
> "Paul S Randal [MS]" wrote:
>|||> try using sp_attach_db, attaching .MDF and .NDF files only, no need to
> attach .LDF file, it will create a new one.
Whether or not a log file is needed when you attach (or similar) a database
depends on whether there
is recovery work to do in the database. Every time a database starts, it wil
l see whether it has to
perform recovery work. Recovery work include REDO and UNDO of log records. T
his it has to do because
transactions might have been in flight when the database was shut down. If S
QL Server determines
that there is recovery work to be done, it *need* the log file.
SQL Server will not allow you to use an inconsistent database (as in the cas
e of missing log file
and it need to do recovery work).
I.e., you never know whether SQL Server can create the log file - so you sho
uld *never* rely on
this. (Paul - I welcome elaborations and/or corrections to this statement...
:-). )
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Celal" <Celal@.discussions.microsoft.com> wrote in message
news:EF5EC77E-2AFA-42BA-8CEE-A5242D4AD0AF@.microsoft.com...[vbcol=seagreen]
> try using sp_attach_db, attaching .MDF and .NDF files only, no need to
> attach .LDF file, it will create a new one.
> "Rosman Computing" wrote:
>|||Well, if you know the database was shutdown cleanly (e.g. by detaching it
while SQL Server is running) then the log file won't be needed as there's
nothing to recover.
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstor...ne/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e3gxb3pHHHA.1912@.TK2MSFTNGP03.phx.gbl...
> Whether or not a log file is needed when you attach (or similar) a
> database depends on whether there is recovery work to do in the database.
> Every time a database starts, it will see whether it has to perform
> recovery work. Recovery work include REDO and UNDO of log records. This it
> has to do because transactions might have been in flight when the database
> was shut down. If SQL Server determines that there is recovery work to be
> done, it *need* the log file.
> SQL Server will not allow you to use an inconsistent database (as in the
> case of missing log file and it need to do recovery work).
> I.e., you never know whether SQL Server can create the log file - so you
> should *never* rely on this. (Paul - I welcome elaborations and/or
> corrections to this statement... :-). )
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Celal" <Celal@.discussions.microsoft.com> wrote in message
> news:EF5EC77E-2AFA-42BA-8CEE-A5242D4AD0AF@.microsoft.com...
>|||Ahh, I tend to forget about the detach/offline cases. I guess my sceptism ab
out these things isn't
as much technical or mistrust, but more from these newsgroups. All the posts
where SQL Server cannot
create the log file. "I *did* detach the database first". Perhaps the simple
truth is:
a) The poster (not in this thread, I should add), claims that detach was per
formed even though it
wasn't performed. ...In some vain hope that claiming that fact would somehow
change things.
b) I'm polluted by posts where log files cannot be created, and I just don't
keep track of which
cases detach (or offline) actually happened.
I wish there could be some type of "FK"/link in NTFS so SQL Server could enf
orce that we cannot
delete log files unless it was shutdown cleanly (even when SQL Server is sto
pped). Also, there would
be nice if we could investigate this bit(?) in the mdf file header(?).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:eM0AAPuHHHA.1240@.TK2MSFTNGP03.phx.gbl...
> Well, if you know the database was shutdown cleanly (e.g. by detaching it
while SQL Server is
> running) then the log file won't be needed as there's nothing to recover.
> --
> Paul Randal
> Lead Program Manager, Microsoft SQL Server Storage Engine
> http://blogs.msdn.com/sqlserverstor...ne/default.aspx
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:e3gxb3pHHHA.1912@.TK2MSFTNGP03.phx.gbl...
>|||How would you check the bit in the file header - there's no documented way
to do so :-) and you'd have to have the database attached or know the file
header row structure.
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstor...ne/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eaL4mWuHHHA.1264@.TK2MSFTNGP06.phx.gbl...
> Ahh, I tend to forget about the detach/offline cases. I guess my sceptism
> about these things isn't as much technical or mistrust, but more from
> these newsgroups. All the posts where SQL Server cannot create the log
> file. "I *did* detach the database first". Perhaps the simple truth is:
> a) The poster (not in this thread, I should add), claims that detach was
> performed even though it wasn't performed. ...In some vain hope that
> claiming that fact would somehow change things.
> b) I'm polluted by posts where log files cannot be created, and I just
> don't keep track of which cases detach (or offline) actually happened.
> I wish there could be some type of "FK"/link in NTFS so SQL Server could
> enforce that we cannot delete log files unless it was shutdown cleanly
> (even when SQL Server is stopped). Also, there would be nice if we could
> investigate this bit(?) in the mdf file header(?).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
> news:eM0AAPuHHHA.1240@.TK2MSFTNGP03.phx.gbl...
>|||Hehe, I knew you were to say something like that...
> How would you check the bit in the file header - there's no documented way
to do so :-) and you'd
> have to have the database attached or know the file header row structure.
If we know what bit(?) it is, we could check it with a hex editor. Or, even
produce some tiny
utility that reads the beginning of the file, see what value the bit has and
present it. Heck, that
small utility could even be produced by MS ;-).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:eIKzFlvHHHA.3540@.TK2MSFTNGP02.phx.gbl...
> How would you check the bit in the file header - there's no documented way
to do so :-) and you'd
> have to have the database attached or know the file header row structure.
> --
> Paul Randal
> Lead Program Manager, Microsoft SQL Server Storage Engine
> http://blogs.msdn.com/sqlserverstor...ne/default.aspx
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:eaL4mWuHHHA.1264@.TK2MSFTNGP06.phx.gbl...
>
disk crash and dwh recover
hi everybody.
A customer of mine has had a disk "crash" few days ago.
I wrote for him a dwh application and
of course the backup was not working...
now some "hardware guys" said that it is possible to recover most of
the files.
what I need to restore would be:
1- the sql server db
2- the sql server dts and jobs
3- the analysis service cube and dimensions
to do so is it enough for me to have:
1- the .mdf and .ldf files
2- the master.mdl /.ldf file
3- the .odb file and .dim* and .role .map ... files
right?
is it enough to recover everything?
if it is so, what would be the right processes to recover everything?
any help greatly appreciated!No RAID and no backups? So this data warehouse is really just a bunch of
data dumped on someone's PC with a few reports tacked onto it? ;-)
Assuming the hardware gurus can actually recover the .mdb (data) files
intact, they can be reattached once the SQL Server box is re-installed. The
.ldf files are the transaction logs, and in a bulk loaded data warehouse,
restoring these may not be important.
http://msdn2.microsoft.com/en-us/library/ms190794.aspx
http://support.microsoft.com/defaul...kb;en-us;224071
What will be a pain is restoring or re-building the master database and how
this affects logins/users for the user database(s). However, unlike
operational databases, most data warehousing databases only have a limited
number of users or profiles (ex: Admin and Reporting), so perhaps this won't
be too much of a deal.
Rebuilding the master Database:
http://msdn.microsoft.com/library/d... />
t_0cvm.asp
User logons and permissions on a database may be incorrect after the
database is restored:
http://support.microsoft.com/defaul...kb;en-us;168001
As for restoring the Analysis Services cubes, I assume you at least have a
backup of the development system which can be restored to production. OLAP
data is typically just derived and aggregated, so once AS is re-installed
and the cube files restored, just re-process and they will be re-loaded from
the source data warehouse tables.
Microsoft SQL Server 2000 Analysis Services Operations Guide:
http://www.microsoft.com/technet/pr...n/anservog.mspx
"ilkaos" <c.caoduro@.gmail.com> wrote in message
news:1138637846.479954.273090@.f14g2000cwb.googlegroups.com...
> hi everybody.
> A customer of mine has had a disk "crash" few days ago.
> I wrote for him a dwh application and
> of course the backup was not working...
> now some "hardware guys" said that it is possible to recover most of
> the files.
> what I need to restore would be:
> 1- the sql server db
> 2- the sql server dts and jobs
> 3- the analysis service cube and dimensions
> to do so is it enough for me to have:
> 1- the .mdf and .ldf files
> 2- the master.mdl /.ldf file
> 3- the .odb file and .dim* and .role .map ... files
> right?
> is it enough to recover everything?
> if it is so, what would be the right processes to recover everything?
> any help greatly appreciated!
>|||
> No RAID and no backups? So this data warehouse is really just a bunch of
> data dumped on someone's PC with a few reports tacked onto it? ;-)
>
kind of...it was my first attempt with analysis service and it did a
"little but good" job..
> Assuming the hardware gurus can actually recover the .mdb (data) files
> intact, they can be reattached once the SQL Server box is re-installed.
The
> .ldf files are the transaction logs, and in a bulk loaded data warehouse,
> restoring these may not be important.
> http://msdn2.microsoft.com/en-us/library/ms190794.aspx
> http://support.microsoft.com/defaul...kb;en-us;224071
I thought so
> What will be a pain is restoring or re-building the master database and
how
> this affects logins/users for the user database(s). However, unlike
> operational databases, most data warehousing databases only have a limited
> number of users or profiles (ex: Admin and Reporting), so perhaps this
won't
> be too much of a deal.
> Rebuilding the master Database:
>
http://msdn.microsoft.com/library/d... />
t_0cvm.asp
in fact there are no particular users or profiles
> User logons and permissions on a database may be incorrect after the
> database is restored:
> http://support.microsoft.com/defaul...kb;en-us;168001
I see...
> As for restoring the Analysis Services cubes, I assume you at least have a
> backup of the development system which can be restored to production. OLAP
> data is typically just derived and aggregated, so once AS is re-installed
> and the cube files restored, just re-process and they will be re-loaded
from
> the source data warehouse tables.
> Microsoft SQL Server 2000 Analysis Services Operations Guide:
>
http://www.microsoft.com/technet/pr...n/anservog.mspx
>
sorry but I do not understand what you mean with a "backup of the
development system which can be restored to production".
As I wrote in my previous message I can have back the files tjat were in the
..\analysis service\* folder...
in any case thanks a lot for your answer, it is a great help!
ciao.sql
A customer of mine has had a disk "crash" few days ago.
I wrote for him a dwh application and
of course the backup was not working...
now some "hardware guys" said that it is possible to recover most of
the files.
what I need to restore would be:
1- the sql server db
2- the sql server dts and jobs
3- the analysis service cube and dimensions
to do so is it enough for me to have:
1- the .mdf and .ldf files
2- the master.mdl /.ldf file
3- the .odb file and .dim* and .role .map ... files
right?
is it enough to recover everything?
if it is so, what would be the right processes to recover everything?
any help greatly appreciated!No RAID and no backups? So this data warehouse is really just a bunch of
data dumped on someone's PC with a few reports tacked onto it? ;-)
Assuming the hardware gurus can actually recover the .mdb (data) files
intact, they can be reattached once the SQL Server box is re-installed. The
.ldf files are the transaction logs, and in a bulk loaded data warehouse,
restoring these may not be important.
http://msdn2.microsoft.com/en-us/library/ms190794.aspx
http://support.microsoft.com/defaul...kb;en-us;224071
What will be a pain is restoring or re-building the master database and how
this affects logins/users for the user database(s). However, unlike
operational databases, most data warehousing databases only have a limited
number of users or profiles (ex: Admin and Reporting), so perhaps this won't
be too much of a deal.
Rebuilding the master Database:
http://msdn.microsoft.com/library/d... />
t_0cvm.asp
User logons and permissions on a database may be incorrect after the
database is restored:
http://support.microsoft.com/defaul...kb;en-us;168001
As for restoring the Analysis Services cubes, I assume you at least have a
backup of the development system which can be restored to production. OLAP
data is typically just derived and aggregated, so once AS is re-installed
and the cube files restored, just re-process and they will be re-loaded from
the source data warehouse tables.
Microsoft SQL Server 2000 Analysis Services Operations Guide:
http://www.microsoft.com/technet/pr...n/anservog.mspx
"ilkaos" <c.caoduro@.gmail.com> wrote in message
news:1138637846.479954.273090@.f14g2000cwb.googlegroups.com...
> hi everybody.
> A customer of mine has had a disk "crash" few days ago.
> I wrote for him a dwh application and
> of course the backup was not working...
> now some "hardware guys" said that it is possible to recover most of
> the files.
> what I need to restore would be:
> 1- the sql server db
> 2- the sql server dts and jobs
> 3- the analysis service cube and dimensions
> to do so is it enough for me to have:
> 1- the .mdf and .ldf files
> 2- the master.mdl /.ldf file
> 3- the .odb file and .dim* and .role .map ... files
> right?
> is it enough to recover everything?
> if it is so, what would be the right processes to recover everything?
> any help greatly appreciated!
>|||
> No RAID and no backups? So this data warehouse is really just a bunch of
> data dumped on someone's PC with a few reports tacked onto it? ;-)
>
kind of...it was my first attempt with analysis service and it did a
"little but good" job..
> Assuming the hardware gurus can actually recover the .mdb (data) files
> intact, they can be reattached once the SQL Server box is re-installed.
The
> .ldf files are the transaction logs, and in a bulk loaded data warehouse,
> restoring these may not be important.
> http://msdn2.microsoft.com/en-us/library/ms190794.aspx
> http://support.microsoft.com/defaul...kb;en-us;224071
I thought so
> What will be a pain is restoring or re-building the master database and
how
> this affects logins/users for the user database(s). However, unlike
> operational databases, most data warehousing databases only have a limited
> number of users or profiles (ex: Admin and Reporting), so perhaps this
won't
> be too much of a deal.
> Rebuilding the master Database:
>
http://msdn.microsoft.com/library/d... />
t_0cvm.asp
in fact there are no particular users or profiles
> User logons and permissions on a database may be incorrect after the
> database is restored:
> http://support.microsoft.com/defaul...kb;en-us;168001
I see...
> As for restoring the Analysis Services cubes, I assume you at least have a
> backup of the development system which can be restored to production. OLAP
> data is typically just derived and aggregated, so once AS is re-installed
> and the cube files restored, just re-process and they will be re-loaded
from
> the source data warehouse tables.
> Microsoft SQL Server 2000 Analysis Services Operations Guide:
>
http://www.microsoft.com/technet/pr...n/anservog.mspx
>
sorry but I do not understand what you mean with a "backup of the
development system which can be restored to production".
As I wrote in my previous message I can have back the files tjat were in the
..\analysis service\* folder...
in any case thanks a lot for your answer, it is a great help!
ciao.sql
2012年3月19日星期一
disaster: How to recover
Today I did the most stupid step in all my working life ,i was working in our
cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
, and there is an urgent change to bookid number for books due to some
criteria from manager so i a have to change the bookid 252 to -1 to indicate
that is not available but by fault i make the following sql statent (UPDATE
BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
there is no backup since 7 working days ,what should I do to recover from
this ? the daily transactions on book ids in hunderds ...what should i do
please to recover my data? all book id colmun be -1"Minimizing data loss when accidents happens "
http://www.karaszi.com/SQLServer/info_restore_log_several_times.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:EA39374D-6F2A-48B5-810A-25ABC4B9E0C6@.microsoft.com...
> Today I did the most stupid step in all my working life ,i was working in our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indicate
> that is not available but by fault i make the following sql statent (UPDATE
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1|||Raed Sawalha wrote:
> Today I did the most stupid step in all my working life ,i was working in our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indicate
> that is not available but by fault i make the following sql statent (UPDATE
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1
is the database in simple recovery model or bulklogged or full?|||it is bulklogged
"Zarko Jovanovic" wrote:
> Raed Sawalha wrote:
> > Today I did the most stupid step in all my working life ,i was working in our
> > cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> > , and there is an urgent change to bookid number for books due to some
> > criteria from manager so i a have to change the bookid 252 to -1 to indicate
> > that is not available but by fault i make the following sql statent (UPDATE
> > BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> > there is no backup since 7 working days ,what should I do to recover from
> > this ? the daily transactions on book ids in hunderds ...what should i do
> > please to recover my data? all book id colmun be -1
> is the database in simple recovery model or bulklogged or full?
>|||Normally, you would now do a transaction log backup. Then restore the most recent database backup
and all subsequent log backups. For the very last log backup (the one you just performed), you would
use the STOPAT option for the restore command to stop just before the accident.
Since you are in bulk logged mode, whether you can do point in time restore for the last log backup
depend on whether you have performed any minimally logged operations. If such have been done, no
point in time.
See the article I posted and Books Online for more information.
Also, a log reader program can be useful (again see my articles).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:A4289B58-3111-4C4C-B028-29698E9945AB@.microsoft.com...
> it is bulklogged
> "Zarko Jovanovic" wrote:
>> Raed Sawalha wrote:
>> > Today I did the most stupid step in all my working life ,i was working in our
>> > cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
>> > , and there is an urgent change to bookid number for books due to some
>> > criteria from manager so i a have to change the bookid 252 to -1 to indicate
>> > that is not available but by fault i make the following sql statent (UPDATE
>> > BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
>> > there is no backup since 7 working days ,what should I do to recover from
>> > this ? the daily transactions on book ids in hunderds ...what should i do
>> > please to recover my data? all book id colmun be -1
>> is the database in simple recovery model or bulklogged or full?
cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
, and there is an urgent change to bookid number for books due to some
criteria from manager so i a have to change the bookid 252 to -1 to indicate
that is not available but by fault i make the following sql statent (UPDATE
BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
there is no backup since 7 working days ,what should I do to recover from
this ? the daily transactions on book ids in hunderds ...what should i do
please to recover my data? all book id colmun be -1"Minimizing data loss when accidents happens "
http://www.karaszi.com/SQLServer/info_restore_log_several_times.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:EA39374D-6F2A-48B5-810A-25ABC4B9E0C6@.microsoft.com...
> Today I did the most stupid step in all my working life ,i was working in our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indicate
> that is not available but by fault i make the following sql statent (UPDATE
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1|||Raed Sawalha wrote:
> Today I did the most stupid step in all my working life ,i was working in our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indicate
> that is not available but by fault i make the following sql statent (UPDATE
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1
is the database in simple recovery model or bulklogged or full?|||it is bulklogged
"Zarko Jovanovic" wrote:
> Raed Sawalha wrote:
> > Today I did the most stupid step in all my working life ,i was working in our
> > cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> > , and there is an urgent change to bookid number for books due to some
> > criteria from manager so i a have to change the bookid 252 to -1 to indicate
> > that is not available but by fault i make the following sql statent (UPDATE
> > BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> > there is no backup since 7 working days ,what should I do to recover from
> > this ? the daily transactions on book ids in hunderds ...what should i do
> > please to recover my data? all book id colmun be -1
> is the database in simple recovery model or bulklogged or full?
>|||Normally, you would now do a transaction log backup. Then restore the most recent database backup
and all subsequent log backups. For the very last log backup (the one you just performed), you would
use the STOPAT option for the restore command to stop just before the accident.
Since you are in bulk logged mode, whether you can do point in time restore for the last log backup
depend on whether you have performed any minimally logged operations. If such have been done, no
point in time.
See the article I posted and Books Online for more information.
Also, a log reader program can be useful (again see my articles).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:A4289B58-3111-4C4C-B028-29698E9945AB@.microsoft.com...
> it is bulklogged
> "Zarko Jovanovic" wrote:
>> Raed Sawalha wrote:
>> > Today I did the most stupid step in all my working life ,i was working in our
>> > cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
>> > , and there is an urgent change to bookid number for books due to some
>> > criteria from manager so i a have to change the bookid 252 to -1 to indicate
>> > that is not available but by fault i make the following sql statent (UPDATE
>> > BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
>> > there is no backup since 7 working days ,what should I do to recover from
>> > this ? the daily transactions on book ids in hunderds ...what should i do
>> > please to recover my data? all book id colmun be -1
>> is the database in simple recovery model or bulklogged or full?
2012年3月11日星期日
disaster: How to recover
Today I did the most stupid step in all my working life ,i was working in our
cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
, and there is an urgent change to bookid number for books due to some
criteria from manager so i a have to change the bookid 252 to -1 to indicate
that is not available but by fault i make the following sql statent (UPDATE
BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
there is no backup since 7 working days ,what should I do to recover from
this ? the daily transactions on book ids in hunderds ...what should i do
please to recover my data? all book id colmun be -1
"Minimizing data loss when accidents happens "
http://www.karaszi.com/SQLServer/inf...eral_times.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:EA39374D-6F2A-48B5-810A-25ABC4B9E0C6@.microsoft.com...
> Today I did the most stupid step in all my working life ,i was working in our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indicate
> that is not available but by fault i make the following sql statent (UPDATE
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1
|||Raed Sawalha wrote:
> Today I did the most stupid step in all my working life ,i was working in our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indicate
> that is not available but by fault i make the following sql statent (UPDATE
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1
is the database in simple recovery model or bulklogged or full?
|||it is bulklogged
"Zarko Jovanovic" wrote:
> Raed Sawalha wrote:
> is the database in simple recovery model or bulklogged or full?
>
|||Normally, you would now do a transaction log backup. Then restore the most recent database backup
and all subsequent log backups. For the very last log backup (the one you just performed), you would
use the STOPAT option for the restore command to stop just before the accident.
Since you are in bulk logged mode, whether you can do point in time restore for the last log backup
depend on whether you have performed any minimally logged operations. If such have been done, no
point in time.
See the article I posted and Books Online for more information.
Also, a log reader program can be useful (again see my articles).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:A4289B58-3111-4C4C-B028-29698E9945AB@.microsoft.com...[vbcol=seagreen]
> it is bulklogged
> "Zarko Jovanovic" wrote:
cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
, and there is an urgent change to bookid number for books due to some
criteria from manager so i a have to change the bookid 252 to -1 to indicate
that is not available but by fault i make the following sql statent (UPDATE
BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
there is no backup since 7 working days ,what should I do to recover from
this ? the daily transactions on book ids in hunderds ...what should i do
please to recover my data? all book id colmun be -1
"Minimizing data loss when accidents happens "
http://www.karaszi.com/SQLServer/inf...eral_times.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:EA39374D-6F2A-48B5-810A-25ABC4B9E0C6@.microsoft.com...
> Today I did the most stupid step in all my working life ,i was working in our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indicate
> that is not available but by fault i make the following sql statent (UPDATE
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1
|||Raed Sawalha wrote:
> Today I did the most stupid step in all my working life ,i was working in our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indicate
> that is not available but by fault i make the following sql statent (UPDATE
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1
is the database in simple recovery model or bulklogged or full?
|||it is bulklogged
"Zarko Jovanovic" wrote:
> Raed Sawalha wrote:
> is the database in simple recovery model or bulklogged or full?
>
|||Normally, you would now do a transaction log backup. Then restore the most recent database backup
and all subsequent log backups. For the very last log backup (the one you just performed), you would
use the STOPAT option for the restore command to stop just before the accident.
Since you are in bulk logged mode, whether you can do point in time restore for the last log backup
depend on whether you have performed any minimally logged operations. If such have been done, no
point in time.
See the article I posted and Books Online for more information.
Also, a log reader program can be useful (again see my articles).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:A4289B58-3111-4C4C-B028-29698E9945AB@.microsoft.com...[vbcol=seagreen]
> it is bulklogged
> "Zarko Jovanovic" wrote:
disaster: How to recover
Today I did the most stupid step in all my working life ,i was working in ou
r
cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
, and there is an urgent change to bookid number for books due to some
criteria from manager so i a have to change the bookid 252 to -1 to indicate
that is not available but by fault i make the following sql statent (UPDATE
BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
there is no backup since 7 working days ,what should I do to recover from
this ? the daily transactions on book ids in hunderds ...what should i do
please to recover my data? all book id colmun be -1"Minimizing data loss when accidents happens "
http://www.karaszi.com/SQLServer/in...veral_times.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:EA39374D-6F2A-48B5-810A-25ABC4B9E0C6@.microsoft.com...
> Today I did the most stupid step in all my working life ,i was working in
our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId
by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indica
te
> that is not available but by fault i make the following sql statent (UPDAT
E
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life an
d
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1|||Raed Sawalha wrote:
> Today I did the most stupid step in all my working life ,i was working in
our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId
by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indica
te
> that is not available but by fault i make the following sql statent (UPDAT
E
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life an
d
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1
is the database in simple recovery model or bulklogged or full?|||it is bulklogged
"Zarko Jovanovic" wrote:
> Raed Sawalha wrote:
> is the database in simple recovery model or bulklogged or full?
>|||Normally, you would now do a transaction log backup. Then restore the most r
ecent database backup
and all subsequent log backups. For the very last log backup (the one you ju
st performed), you would
use the STOPAT option for the restore command to stop just before the accide
nt.
Since you are in bulk logged mode, whether you can do point in time restore
for the last log backup
depend on whether you have performed any minimally logged operations. If suc
h have been done, no
point in time.
See the article I posted and Books Online for more information.
Also, a log reader program can be useful (again see my articles).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:A4289B58-3111-4C4C-B028-29698E9945AB@.microsoft.com...[vbcol=seagreen]
> it is bulklogged
> "Zarko Jovanovic" wrote:
>
r
cutomers LIVE DB (about 150 thounsand record) we have feild called bookId by
, and there is an urgent change to bookid number for books due to some
criteria from manager so i a have to change the bookid 252 to -1 to indicate
that is not available but by fault i make the following sql statent (UPDATE
BOOKS SET BOOKID = -1) without the where statment so I destryed my life and
there is no backup since 7 working days ,what should I do to recover from
this ? the daily transactions on book ids in hunderds ...what should i do
please to recover my data? all book id colmun be -1"Minimizing data loss when accidents happens "
http://www.karaszi.com/SQLServer/in...veral_times.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:EA39374D-6F2A-48B5-810A-25ABC4B9E0C6@.microsoft.com...
> Today I did the most stupid step in all my working life ,i was working in
our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId
by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indica
te
> that is not available but by fault i make the following sql statent (UPDAT
E
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life an
d
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1|||Raed Sawalha wrote:
> Today I did the most stupid step in all my working life ,i was working in
our
> cutomers LIVE DB (about 150 thounsand record) we have feild called bookId
by
> , and there is an urgent change to bookid number for books due to some
> criteria from manager so i a have to change the bookid 252 to -1 to indica
te
> that is not available but by fault i make the following sql statent (UPDAT
E
> BOOKS SET BOOKID = -1) without the where statment so I destryed my life an
d
> there is no backup since 7 working days ,what should I do to recover from
> this ? the daily transactions on book ids in hunderds ...what should i do
> please to recover my data? all book id colmun be -1
is the database in simple recovery model or bulklogged or full?|||it is bulklogged
"Zarko Jovanovic" wrote:
> Raed Sawalha wrote:
> is the database in simple recovery model or bulklogged or full?
>|||Normally, you would now do a transaction log backup. Then restore the most r
ecent database backup
and all subsequent log backups. For the very last log backup (the one you ju
st performed), you would
use the STOPAT option for the restore command to stop just before the accide
nt.
Since you are in bulk logged mode, whether you can do point in time restore
for the last log backup
depend on whether you have performed any minimally logged operations. If suc
h have been done, no
point in time.
See the article I posted and Books Online for more information.
Also, a log reader program can be useful (again see my articles).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:A4289B58-3111-4C4C-B028-29698E9945AB@.microsoft.com...[vbcol=seagreen]
> it is bulklogged
> "Zarko Jovanovic" wrote:
>
2012年3月8日星期四
disaster recovery
my server has 3 partitions (c: , d: ,e:). my sql 2000 is
in d: and my win 2K is in c:. my c drive crashed and i
would like to recover my sql database in d: after i
reinstall my win 2K in c:. is that possible?Hi Bobby.
If SQL Server managed to shot down successfully, it would have checkpointed
the databases & you might be able to re-attach the .mdb files after
re-installing Windows / SQL Server. To attach a db, you can either use the
sp_attach_db stored proc or the SQL Enterprise Manager has a menu option to
do it - right click on the "databases" node, select "All Tasks" then "Attach
Database" & follow the prompts..
Do you have a backup of the database? If so, this is likely the better
option if the system crashed before you lost it.
Regards,
Greg Linwood
SQL Server MVP
"bobby" <bllua@.hotmail.com> wrote in message
news:09e601c37f3f$3ea1bc80$a401280a@.phx.gbl...
> my server has 3 partitions (c: , d: ,e:). my sql 2000 is
> in d: and my win 2K is in c:. my c drive crashed and i
> would like to recover my sql database in d: after i
> reinstall my win 2K in c:. is that possible?|||"Greg Linwood" <g_linwood@.hotmail.com> wrote in message
news:eQepu%230fDHA.944@.TK2MSFTNGP11.phx.gbl...
> Hi Bobby.
> If SQL Server managed to shot down successfully, it would have
checkpointed
> the databases & you might be able to re-attach the .mdb files after
> re-installing Windows / SQL Server. To attach a db, you can either use the
> sp_attach_db stored proc or the SQL Enterprise Manager has a menu option
to
> do it - right click on the "databases" node, select "All Tasks" then
"Attach
> Database" & follow the prompts..
> Do you have a backup of the database? If so, this is likely the better
> option if the system crashed before you lost it.
> Regards,
> Greg Linwood
> SQL Server MVP
Also, if you have a backup of your Master database you would not have to
re-attach the db files
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003
in d: and my win 2K is in c:. my c drive crashed and i
would like to recover my sql database in d: after i
reinstall my win 2K in c:. is that possible?Hi Bobby.
If SQL Server managed to shot down successfully, it would have checkpointed
the databases & you might be able to re-attach the .mdb files after
re-installing Windows / SQL Server. To attach a db, you can either use the
sp_attach_db stored proc or the SQL Enterprise Manager has a menu option to
do it - right click on the "databases" node, select "All Tasks" then "Attach
Database" & follow the prompts..
Do you have a backup of the database? If so, this is likely the better
option if the system crashed before you lost it.
Regards,
Greg Linwood
SQL Server MVP
"bobby" <bllua@.hotmail.com> wrote in message
news:09e601c37f3f$3ea1bc80$a401280a@.phx.gbl...
> my server has 3 partitions (c: , d: ,e:). my sql 2000 is
> in d: and my win 2K is in c:. my c drive crashed and i
> would like to recover my sql database in d: after i
> reinstall my win 2K in c:. is that possible?|||"Greg Linwood" <g_linwood@.hotmail.com> wrote in message
news:eQepu%230fDHA.944@.TK2MSFTNGP11.phx.gbl...
> Hi Bobby.
> If SQL Server managed to shot down successfully, it would have
checkpointed
> the databases & you might be able to re-attach the .mdb files after
> re-installing Windows / SQL Server. To attach a db, you can either use the
> sp_attach_db stored proc or the SQL Enterprise Manager has a menu option
to
> do it - right click on the "databases" node, select "All Tasks" then
"Attach
> Database" & follow the prompts..
> Do you have a backup of the database? If so, this is likely the better
> option if the system crashed before you lost it.
> Regards,
> Greg Linwood
> SQL Server MVP
Also, if you have a backup of your Master database you would not have to
re-attach the db files
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003
订阅:
博文 (Atom)