I am doing a point in time recover of a database. I point to the backup and
trans logs and begin the recovery. It says (Loading database) and it
starts.. It goes through the backup then applies all the translogs. When
it gets to the end it says, DATABASE RESTORE HAS COMPLETED SUCCESSFULLY. But
when I go to the database, it is still at a status of LOADING. How do I
bring the database online? Thanks
Jason Greene
Hi Jason
You may not have requested that SQL Server run the recovery process after
the last log was loaded in.
From the Query Analyzer, try:
RESTORE DATABASE <name of db> WITH RECOVERY
(Note that you don't need to specify any backup files, as these have already
been loaded. The WITH RECOVERY is the important part.)
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
news:73331569-98FB-4010-A7F9-F4EBA2B9DFF4@.microsoft.com...
>I am doing a point in time recover of a database. I point to the backup
>and
> trans logs and begin the recovery. It says (Loading database) and it
> starts.. It goes through the backup then applies all the translogs.
> When
> it gets to the end it says, DATABASE RESTORE HAS COMPLETED SUCCESSFULLY.
> But
> when I go to the database, it is still at a status of LOADING. How do I
> bring the database online? Thanks
> Jason Greene
>
|||I will try that now and let you know.. Thanks
"Kalen Delaney" wrote:
> Hi Jason
> You may not have requested that SQL Server run the recovery process after
> the last log was loaded in.
> From the Query Analyzer, try:
> RESTORE DATABASE <name of db> WITH RECOVERY
> (Note that you don't need to specify any backup files, as these have already
> been loaded. The WITH RECOVERY is the important part.)
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
> news:73331569-98FB-4010-A7F9-F4EBA2B9DFF4@.microsoft.com...
>
>
|||Thanks for the fast response.. Also, I have another posting with a
question.. I was wondering if you had any insite on it..
I had a hardware crash where my Datafile got corrupted but my Logfile was on
another array of disks so it was fine. Every two hours, I do a backup of my
Transaction Log. When my hardware crashed, it had be awhile since the last
Transaction log backup. Can I do a restore to a point it time. I can not
backup my current logfile because it has to be attached to a datafile an
online in order to be backed up. I tried to restore an old COLD backup of my
datafile and attach the logfile to it to try to back it up and that did not
work.. Any help would be appreciated. I need to recover to the point of
hardware failure..
"Kalen Delaney" wrote:
> Hi Jason
> You may not have requested that SQL Server run the recovery process after
> the last log was loaded in.
> From the Query Analyzer, try:
> RESTORE DATABASE <name of db> WITH RECOVERY
> (Note that you don't need to specify any backup files, as these have already
> been loaded. The WITH RECOVERY is the important part.)
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
> news:73331569-98FB-4010-A7F9-F4EBA2B9DFF4@.microsoft.com...
>
>
|||Answered in your post "Point in Time Recovery" in this group.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
news:50564A61-1266-412E-846E-F7376C511708@.microsoft.com...[vbcol=seagreen]
> Thanks for the fast response.. Also, I have another posting with a
> question.. I was wondering if you had any insite on it..
> I had a hardware crash where my Datafile got corrupted but my Logfile was
> on
> another array of disks so it was fine. Every two hours, I do a backup of
> my
> Transaction Log. When my hardware crashed, it had be awhile since the
> last
> Transaction log backup. Can I do a restore to a point it time. I can not
> backup my current logfile because it has to be attached to a datafile an
> online in order to be backed up. I tried to restore an old COLD backup of
> my
> datafile and attach the logfile to it to try to back it up and that did
> not
> work.. Any help would be appreciated. I need to recover to the point of
> hardware failure..
>
>
> "Kalen Delaney" wrote:
|||When I issue that command I get the following error.
Server: Msg 3101, Level 16, State 2, Line 1
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
"Kalen Delaney" wrote:
> Hi Jason
> You may not have requested that SQL Server run the recovery process after
> the last log was loaded in.
> From the Query Analyzer, try:
> RESTORE DATABASE <name of db> WITH RECOVERY
> (Note that you don't need to specify any backup files, as these have already
> been loaded. The WITH RECOVERY is the important part.)
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
> news:73331569-98FB-4010-A7F9-F4EBA2B9DFF4@.microsoft.com...
>
>
|||Hi
There is another connection using the DB, put it into single user mode
(Right click on it and select properties)
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
news:5D6388E6-A38F-4C5F-A715-6433A0A43588@.microsoft.com...[vbcol=seagreen]
> When I issue that command I get the following error.
>
> Server: Msg 3101, Level 16, State 2, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
> "Kalen Delaney" wrote:
|||That did it.. Thanks.. Now I got my database back to the last good Translog
that was backed up.. Now I am going to try to see if I can use the Online
Translog that was part of the database when it crashed to see if I can
restore to the point of failure..
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> There is another connection using the DB, put it into single user mode
> (Right click on it and select properties)
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
> news:5D6388E6-A38F-4C5F-A715-6433A0A43588@.microsoft.com...
>
>
|||Hi
No, the transaction log is no good to you as the sequences do not agree
anymore between the log and the DB.
Kiss that data good bye.
The fast that your drive crashed and it took your DB's along with it, how
about getting some RAID?
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
news:3B80AE01-78FA-4D68-BD58-96BDDC08D97F@.microsoft.com...[vbcol=seagreen]
> That did it.. Thanks.. Now I got my database back to the last good
> Translog
> that was backed up.. Now I am going to try to see if I can use the Online
> Translog that was part of the database when it crashed to see if I can
> restore to the point of failure..
>
> "Mike Epprecht (SQL MVP)" wrote:
|||It is raid 5 double parity. The entire array died.. All drives at the same
time. I think it was electrical.
On the original note.. I got an old copy of my database .mdf file and
logfile .ldf file. I mounted this database and brought it only. Then I took
the database offline, then swithed the logfile of the old one with the good
current one. Then I restarted the computer.. When it came online, it
brought the database online as Suspect.. Old datafile, current logfile. I
then issued a Backup Logfile command and it backed it up. I then used that
logfile backup to restore the database to the time the database crashed..
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> No, the transaction log is no good to you as the sequences do not agree
> anymore between the log and the DB.
> Kiss that data good bye.
> The fast that your drive crashed and it took your DB's along with it, how
> about getting some RAID?
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Jason Greene" <JasonGreene@.discussions.microsoft.com> wrote in message
> news:3B80AE01-78FA-4D68-BD58-96BDDC08D97F@.microsoft.com...
>
>
No comments:
Post a Comment