Showing posts with label point. Show all posts
Showing posts with label point. Show all posts

Friday, March 30, 2012

Recovery of database on a mount point

When restoring a database where the data file(s) are located under a mount point, seems to be a problem with reporting free space available.

DB Size - Say 30GB (25 Data, 5 Log)

E:\ Drive 20GB with 15GB Free

Restoring database file to

E:\SQLMountPoint\

- This points to separate disk with more than enough free space

SQL prevents the restore by stating there is not enough free space.

A long work around is

assign a drive letter to the large disk

Restore database using temp drive letter - F:\SQLDATA\MyDB_Data.mdf

Update sysfiles - changing drive & path - E:\SQLMountPoint\SQLDATA\MyDB_Data.mdf

Stop & restart database...

Is there a better way?

Wishlist - Restore only warns about free space - but allows continue...

Regards

Which OS version and SQL Server version are you using?

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Thanks for the reply.

OS: Windows2003 x64 Datacenter R2

SQL: Now running 9.00.3175 - seems to have resolved the problem?

- unable to find mention in fixlists

More testing required just to be sure.

LateNightDBA...

|||

You will typically not find every fix in the published fix list.

I'm glad it works now.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

Monday, March 26, 2012

Recovery from a Restore without replication info

Can anyone point me to a set of documented steps on how to clean up the
following mess?
Three days ago a developer (not me) deployed some changes to a production
database by restoring from a backup created on another server. The problem
is the production database was set for replication. Now there is an
inconsistency between the replication metadata stored in Master and
Distribution vs. the production database. The type of replication is
snapshot and the servers are all version 2005 SP1.
I've recovered from this exact same situation in SQL 2000 but never in 2005.
Unfortunately I didn't bother to document the steps. I dimly recall however
a lot of false starts and direct editing of the contents of the Master
database. I'd really love to avoid experimentation this time around.
Hi, Kevin,
To let me better understand your issue, coulder you please let me know the
follwing questions:
1. Who is the publisher?
2. Who is the distributor?
3. Who is the subscriber?
4. What is the type of your replication?
5. Could you please describe me more detailed of the inconsistency that you
mentioned?
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||As it is snapshot replication, what I'd do is to remove the publication, run
sp_removedbreplication on the relevant databases (assuming no other
publications there) and then readd the publication. If you have been backing
up your replication scripts (http://www.replicationanswers.com/Script7.asp)
this is pretty straightforward to do.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||Thanks for the suggestion. That's what I am going to try to do this morning.
I spent all part of yesterday setting up a test environment that reproduces
the problem. I know that on 2000 the system stored procs that delete
replication data from the Master and Distribution databases fail if the
publishing database does not contain replication metadata. My hope is that
the procs have been improved in 2005 and will no longer fail.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:e5JCCbGbHHA.4176@.TK2MSFTNGP02.phx.gbl...
> As it is snapshot replication, what I'd do is to remove the publication,
> run sp_removedbreplication on the relevant databases (assuming no other
> publications there) and then readd the publication. If you have been
> backing up your replication scripts
> (http://www.replicationanswers.com/Script7.asp) this is pretty
> straightforward to do.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
|||Hi, Kevin,
I am sorry that I missed reading that your replication type was snapshot.
Did you mean that your publication database was polluted?
In this case, you can just restore your publication database from the
latest dabase backup file since it is a snapshot replication; however there
may be data loss between the backup time to now.
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Wednesday, March 21, 2012

Recovering Database

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...
>
>

Recovering Database

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. Bu
t
when I go to the database, it is still at a status of LOADING. How do I
bring the database online? Thanks
Jason GreeneHi 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 alrea
dy
> 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 m
y
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 alrea
dy
> 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 alrea
dy
> 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 sam
e
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 too
k
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...
>
>

Recovering Database

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 GreeneHi 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...
> >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
> >
>
>|||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...
> >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
> >
>
>|||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...
> 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...
>> >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
>> >
>>|||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...
> >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
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...
> 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...
>> >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
>> >
>>|||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...
> > 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...
> >> >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
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...
> 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...
>> > 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...
>> >> >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
>> >> >
>> >>
>> >>
>> >>
>>|||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...
> > 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...
> >> > 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...
> >> >> >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 everybody:
Hi Jason. what command did you execute to backup the transacation log file
when you had "the old datafile with the current logfile"?.
I'm getting the following error when trying to backup the transaction log
file:
--
Database 'NorthwindTest' cannot be opened due to inaccessible files or
insufficient memory or disk space. See the SQL Server errorlog for details.
BACKUP LOG is terminating abnormally.
--
The event log shows that the following command its executing:
--
BACKUP LOG [NorthwindTest] TO DISK = N'C:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\NorthwindTest.bak' WITH NOINIT , NOUNLOAD , NAME =N'NorthwindTest backup', NOSKIP , STATS = 10, NOFORMAT
--
Any one knows a good procedure to achieve a restore of a database to the
point of failure?
Cheers!
Amando Reséndez
"Jason Greene" 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...
> > > 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...
> > >> > 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...
> > >> >> >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 did it through the Enterprise Manager.
Backup Transaction Logs.
"Amando Resendez" wrote:
> Hi everybody:
> Hi Jason. what command did you execute to backup the transacation log file
> when you had "the old datafile with the current logfile"?.
> I'm getting the following error when trying to backup the transaction log
> file:
> --
> Database 'NorthwindTest' cannot be opened due to inaccessible files or
> insufficient memory or disk space. See the SQL Server errorlog for details.
> BACKUP LOG is terminating abnormally.
> --
> The event log shows that the following command its executing:
> --
> BACKUP LOG [NorthwindTest] TO DISK = N'C:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\NorthwindTest.bak' WITH NOINIT , NOUNLOAD , NAME => N'NorthwindTest backup', NOSKIP , STATS = 10, NOFORMAT
> --
> Any one knows a good procedure to achieve a restore of a database to the
> point of failure?
> Cheers!
> Amando Reséndez
>
> "Jason Greene" 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...
> > > > 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...
> > > >> > 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...
> > > >> >> >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
> > > >> >> >
> > > >> >>
> > > >> >>
> > > >> >>
> > > >>
> > > >>
> > > >>
> > >
> > >
> > >sql

Saturday, February 25, 2012

Records drilled through multiple times due to Partitions

Hi,

I have created a cube for a telephony database. In this database there are two fields that point to the same table named tblPhonebook. These fields are FromPhonebookID and ToPhonebookID, which respectively contain the Person in the phonebook who placed the call and the Person in the phonebook who received the call. (the latter could both be an internal person and an external person).

I created one dimension. The Phonebook dimension which points to the table tblPhonebook.

When I select a person in this dimension I want to see all the calls this person placed and also all the calls this person received. So I created two "views" in SQL Server.

view1: SELECT ToID as UseID, * FROM tblData

view2: SELECT FromID as UseID, * FROM tblData

With the Cube I created two partitions. The first partition takes view1 as data table, the second partition takes view2 as data table. My Phonebook dimension is related to the UseID in these views.

So far so good. When I select a person in the Phonebook dimension, I get a neat result of his ingoing and outgoing phonecalls. However, when I select "All Phonebook", so not a specific user in the phonebook list, and instead select a date for instance, there occurs a problem. Because no Phonebook entry is specified there are always two entries per phonecall. One from view1 and one from view2. So my calls are counted double.

For counting the calls this is also not a problem, because I can perform a Distinct Count on the tblData.ID. I also measure the Average of the Conversation Time. This is also not a problem, because every value is counted double, not one excluded, so the average stays the same (isn't it? conversations lasting 1, 8 and 12 seconds average on 7 seconds. If those are counted twice then it would be 1,1,8,8,12,12 which also average on 7).

But when I select a drillthrough (with "All Phonebook" selected) the problem arrises. All entries are showed double in my drillthrough. First all the From Data ordered by date, then all the To Data ordered by date.

Ofcourse I don't want that. I want them only to be listed once. How do I filter this drillthrough that when no phonebook entry is selected, they still only appear once in my list?

(Sorry for the long introduction to a one line question ;))

Greets,

Edward

For one, Analysis Server in this case delivers exactly to the promise : in the result of the drillrhough it returns you all the data you selected to perform the drillthrough into.

Now about your situation. To solve your problem, you might decide to model your cube a bit different. You can create another dimension with only a single non-aggregatable attribute and 2 values "From" and "To". Then your user will choose to drill through into which part of the data.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hmmm... so no filter possible? that was what I was afraid for ;)

Thanks for looking into my problem....

Greets,

Edward