Monday, March 19, 2012
Differential Database Backups Strategy in SQL 2005
BOL : "Differential Database Backups Strategy (Full Recovery Model)".
Let's say that I would like to perform a full database backup every hour,
log backups every minutes, differential database backup every 10 minutes. I
would like this to occur every hour every day.
I can't figure out how to sequence and schedule this strategy. In a
maintenance plan, all tasks are running without waiting the time required.
Any help appreciated.Hi Olivier
One way to do this would be to only carry out the task if there is no
exceptions for the other jobs by looking at sysjobhistory.
John
"Olivier Matrot" wrote:
> I would like to implement the Backup strategy that is documented in SQL 2005
> BOL : "Differential Database Backups Strategy (Full Recovery Model)".
> Let's say that I would like to perform a full database backup every hour,
> log backups every minutes, differential database backup every 10 minutes. I
> would like this to occur every hour every day.
> I can't figure out how to sequence and schedule this strategy. In a
> maintenance plan, all tasks are running without waiting the time required.
> Any help appreciated.
>
>|||Oliver
http://vyaskn.tripod.com/sql_server_administration_best_practices.htm#Step1
--administaiting best practices
"Olivier Matrot" <olivier.matrot.rte@.online.nospam> wrote in message
news:%23QmHEdr8GHA.2364@.TK2MSFTNGP02.phx.gbl...
>I would like to implement the Backup strategy that is documented in SQL
>2005 BOL : "Differential Database Backups Strategy (Full Recovery Model)".
> Let's say that I would like to perform a full database backup every hour,
> log backups every minutes, differential database backup every 10 minutes.
> I would like this to occur every hour every day.
> I can't figure out how to sequence and schedule this strategy. In a
> maintenance plan, all tasks are running without waiting the time required.
> Any help appreciated.
>|||I've finally created 3 maintenance plans:
1) Full database backup Occurs every day every 1 hour(s) between 00:00:00
and 23:59:59. Schedule will be used starting on 18/10/2006.
2) Log Backup Occurs every day every 1 minute(s) between 00:00:01 and
23:59:59. Schedule will be used starting on 18/10/2006.
3) Differential Database Backup Occurs every day every 10 minute(s) between
00:10:00 and 23:59:59. Schedule will be used starting on 18/10/2006.
But one problem remains : Differential datatabase backup and transaction log
backup run at the same time at : hour + 0, Hour +10, Hour +20, Hour+30,
Hour+40, Hour+50. But maybe this is not a problem at all ?
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:8AE1D2D7-49AD-431F-B85C-FDAC178B05E0@.microsoft.com...
> Hi Olivier
> One way to do this would be to only carry out the task if there is no
> exceptions for the other jobs by looking at sysjobhistory.
> John
> "Olivier Matrot" wrote:
>> I would like to implement the Backup strategy that is documented in SQL
>> 2005
>> BOL : "Differential Database Backups Strategy (Full Recovery Model)".
>> Let's say that I would like to perform a full database backup every hour,
>> log backups every minutes, differential database backup every 10
>> minutes. I
>> would like this to occur every hour every day.
>> I can't figure out how to sequence and schedule this strategy. In a
>> maintenance plan, all tasks are running without waiting the time
>> required.
>> Any help appreciated.
>>|||Olivier Matrot wrote:
> I've finally created 3 maintenance plans:
> 1) Full database backup Occurs every day every 1 hour(s) between 00:00:00
> and 23:59:59. Schedule will be used starting on 18/10/2006.
> 2) Log Backup Occurs every day every 1 minute(s) between 00:00:01 and
> 23:59:59. Schedule will be used starting on 18/10/2006.
> 3) Differential Database Backup Occurs every day every 10 minute(s) between
> 00:10:00 and 23:59:59. Schedule will be used starting on 18/10/2006.
> But one problem remains : Differential datatabase backup and transaction log
> backup run at the same time at : hour + 0, Hour +10, Hour +20, Hour+30,
> Hour+40, Hour+50. But maybe this is not a problem at all ?
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:8AE1D2D7-49AD-431F-B85C-FDAC178B05E0@.microsoft.com...
> > Hi Olivier
> >
> > One way to do this would be to only carry out the task if there is no
> > exceptions for the other jobs by looking at sysjobhistory.
> >
> > John
> >
> > "Olivier Matrot" wrote:
> >
> >> I would like to implement the Backup strategy that is documented in SQL
> >> 2005
> >> BOL : "Differential Database Backups Strategy (Full Recovery Model)".
> >> Let's say that I would like to perform a full database backup every hour,
> >> log backups every minutes, differential database backup every 10
> >> minutes. I
> >> would like this to occur every hour every day.
> >> I can't figure out how to sequence and schedule this strategy. In a
> >> maintenance plan, all tasks are running without waiting the time
> >> required.
> >> Any help appreciated.
> >>
> >>
> >>
What I feel is that taking full backup every hour you are creating
overhead on the system.
You should take full backup once in a day , differential backup after
some hours and logbackup at some mintues interval.
For high availability of data you should look at replication , log
shipping or database mirroring.
Regards
Amish Shah
http://shahamishm.tripod.com|||The database is in fact the mailboxstore of a POP3 server.
There could be up to 120000 unique mailboxes. Each client connects every
minute, download the mailbox content, and delete message(s). Unless new
messages comes in and the POP server is unavailable, all mailboxes are
empty, which means that the database size is very small, unless empty.
"amish" <shahamishm@.gmail.com> wrote in message
news:1161182960.766731.136870@.b28g2000cwb.googlegroups.com...
> Olivier Matrot wrote:
>> I've finally created 3 maintenance plans:
>> 1) Full database backup Occurs every day every 1 hour(s) between 00:00:00
>> and 23:59:59. Schedule will be used starting on 18/10/2006.
>> 2) Log Backup Occurs every day every 1 minute(s) between 00:00:01 and
>> 23:59:59. Schedule will be used starting on 18/10/2006.
>> 3) Differential Database Backup Occurs every day every 10 minute(s)
>> between
>> 00:10:00 and 23:59:59. Schedule will be used starting on 18/10/2006.
>> But one problem remains : Differential datatabase backup and transaction
>> log
>> backup run at the same time at : hour + 0, Hour +10, Hour +20, Hour+30,
>> Hour+40, Hour+50. But maybe this is not a problem at all ?
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:8AE1D2D7-49AD-431F-B85C-FDAC178B05E0@.microsoft.com...
>> > Hi Olivier
>> >
>> > One way to do this would be to only carry out the task if there is no
>> > exceptions for the other jobs by looking at sysjobhistory.
>> >
>> > John
>> >
>> > "Olivier Matrot" wrote:
>> >
>> >> I would like to implement the Backup strategy that is documented in
>> >> SQL
>> >> 2005
>> >> BOL : "Differential Database Backups Strategy (Full Recovery Model)".
>> >> Let's say that I would like to perform a full database backup every
>> >> hour,
>> >> log backups every minutes, differential database backup every 10
>> >> minutes. I
>> >> would like this to occur every hour every day.
>> >> I can't figure out how to sequence and schedule this strategy. In a
>> >> maintenance plan, all tasks are running without waiting the time
>> >> required.
>> >> Any help appreciated.
>> >>
>> >>
>> >>
> What I feel is that taking full backup every hour you are creating
> overhead on the system.
> You should take full backup once in a day , differential backup after
> some hours and logbackup at some mintues interval.
> For high availability of data you should look at replication , log
> shipping or database mirroring.
> Regards
> Amish Shah
> http://shahamishm.tripod.com
>|||Hello Olivier,
A full/differential backup can be made while your SQL Server is in use.
This is considered a "fuzzy" backup?that is, it is not an exact image of
the state of the database at any particular point in time. The backup
threads just copy extents, and if other processes need to make changes to
those extents while the backup is in progress, they can do so.
On the other hand, transaction log backup back up transaction log other
than the data itself. A log backup copies all the log records that have
been written to the transaction log since the last full or log backup was
made.
Therefore, I think this shall not be a problem even if differential/log
back up starts at the exact same time. Actually, there shall be one backup
starts first. For example, if transaction log backup starts first, after
the restoration of the differetial backup, you shall restore the
transaction log backup at next minute.
I think the important thing is get the proper sequence of the backup files
so that you may be able to restore it properly when issues occurs. Also,
since you have so many backup files, mangement of their store shall be
considered.
You may want to test your plan and see if there is any issues when
restoring the backups.
If anything is unclear or you have further questions on the issue, please
feel free to let's know. Thank you.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
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>.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Peter for this explaination.
In this strategy, backup files older than one hour could be deleted because
I have a full database backup every hour. The number of files to manage is
small.
The main goal here is to be able to restart as quickly as possible in the
event of a disk failure. I already know that the the tail of the transaction
log should be backuped immediately in this cas before the restore process.
At this time I have choosen to put the database data file on a RAID 0 array,
while backup and transaction log files are located on a RAID1 array.
"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:k3osyry8GHA.4340@.TK2MSFTNGXA01.phx.gbl...
> Hello Olivier,
> A full/differential backup can be made while your SQL Server is in use.
> This is considered a "fuzzy" backup-that is, it is not an exact image of
> the state of the database at any particular point in time. The backup
> threads just copy extents, and if other processes need to make changes to
> those extents while the backup is in progress, they can do so.
> On the other hand, transaction log backup back up transaction log other
> than the data itself. A log backup copies all the log records that have
> been written to the transaction log since the last full or log backup was
> made.
> Therefore, I think this shall not be a problem even if differential/log
> back up starts at the exact same time. Actually, there shall be one backup
> starts first. For example, if transaction log backup starts first, after
> the restoration of the differetial backup, you shall restore the
> transaction log backup at next minute.
> I think the important thing is get the proper sequence of the backup files
> so that you may be able to restore it properly when issues occurs. Also,
> since you have so many backup files, mangement of their store shall be
> considered.
> You may want to test your plan and see if there is any issues when
> restoring the backups.
> If anything is unclear or you have further questions on the issue, please
> feel free to let's know. Thank you.
>
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> <http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
> 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>.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Olivier,
Yes, I agree Differential backup/restore shall improve the recovery time.
If you encounter any issues or have further comments, please feel free to
let's know. Thank you. :-)
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
Friday, March 9, 2012
Differential Backup
below from SQL Server 2000 BOL. I was able to create the
full backup and the differential backups with the script
listed below without a problem. I trying to restore the
full and differential from SQL Server 2000 Enterprise
Manager GUI. First I restored the full back from the SQL
Server 2000 Enterprise Manager Restore GUI without a
problem.
Next I tried to restore the differential backup from the
SQL Server 2000 Enterprise Manager GUI using the restore
type as differential. I received the following error:
The preceding restore operation did not specify WITH
NORECOVERY or WITH STANDBY, Restart the restore sequence,
specifying WITH NORECOVERY or WITH STANDBY for all but
the final step. RESTORE DATABASE is terminating
abnormally.
Is it possible to restore a full/differential backup from
the SQL Server 2000 Enterprise Manager Restore GUI?
Please help me resolve this problem.
Thanks,
Jan
Hi,
Check the "Leave database nonoperational but able to restore additional
transaction logs." or "Leave database read-only and able to restore
additional transaction logs." radio button on the Options tab before start
the restore from full backup.
This operation create restore script with "WIH NORECOWERY" or "WITH STANDBY"
clause, and you can restore from differential backup as need.
Andras Jakus MCDBA
"anonymous@.discussions.microsoft.com" wrote:
> I have a full and differential backups with script listed
> below from SQL Server 2000 BOL. I was able to create the
> full backup and the differential backups with the script
> listed below without a problem. I trying to restore the
> full and differential from SQL Server 2000 Enterprise
> Manager GUI. First I restored the full back from the SQL
> Server 2000 Enterprise Manager Restore GUI without a
> problem.
> Next I tried to restore the differential backup from the
> SQL Server 2000 Enterprise Manager GUI using the restore
> type as differential. I received the following error:
> The preceding restore operation did not specify WITH
> NORECOVERY or WITH STANDBY, Restart the restore sequence,
> specifying WITH NORECOVERY or WITH STANDBY for all but
> the final step. RESTORE DATABASE is terminating
> abnormally.
> Is it possible to restore a full/differential backup from
> the SQL Server 2000 Enterprise Manager Restore GUI?
> Please help me resolve this problem.
> Thanks,
> Jan
>
>
Differential Backup
below from SQL Server 2000 BOL. I was able to create the
full backup and the differential backups with the script
listed below without a problem. I trying to restore the
full and differential from SQL Server 2000 Enterprise
Manager GUI. First I restored the full back from the SQL
Server 2000 Enterprise Manager Restore GUI without a
problem.
Next I tried to restore the differential backup from the
SQL Server 2000 Enterprise Manager GUI using the restore
type as differential. I received the following error:
The preceding restore operation did not specify WITH
NORECOVERY or WITH STANDBY, Restart the restore sequence,
specifying WITH NORECOVERY or WITH STANDBY for all but
the final step. RESTORE DATABASE is terminating
abnormally.
Is it possible to restore a full/differential backup from
the SQL Server 2000 Enterprise Manager Restore GUI?
Please help me resolve this problem.
Thanks,
JanHi,
Check the "Leave database nonoperational but able to restore additional
transaction logs." or "Leave database read-only and able to restore
additional transaction logs." radio button on the Options tab before start
the restore from full backup.
This operation create restore script with "WIH NORECOWERY" or "WITH STANDBY"
clause, and you can restore from differential backup as need.
Andras Jakus MCDBA
"anonymous@.discussions.microsoft.com" wrote:
> I have a full and differential backups with script listed
> below from SQL Server 2000 BOL. I was able to create the
> full backup and the differential backups with the script
> listed below without a problem. I trying to restore the
> full and differential from SQL Server 2000 Enterprise
> Manager GUI. First I restored the full back from the SQL
> Server 2000 Enterprise Manager Restore GUI without a
> problem.
> Next I tried to restore the differential backup from the
> SQL Server 2000 Enterprise Manager GUI using the restore
> type as differential. I received the following error:
> The preceding restore operation did not specify WITH
> NORECOVERY or WITH STANDBY, Restart the restore sequence,
> specifying WITH NORECOVERY or WITH STANDBY for all but
> the final step. RESTORE DATABASE is terminating
> abnormally.
> Is it possible to restore a full/differential backup from
> the SQL Server 2000 Enterprise Manager Restore GUI?
> Please help me resolve this problem.
> Thanks,
> Jan
>
>
Friday, February 17, 2012
Different Aggregation Function for Single Measure
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/uas9/html/c359b4c1-9c3f-41bc-a585-de7c934e2c11.htm
It states that an aggregation function can be set on the measure (as the default, using the AggregateFunction property) in the Properties pane of the Cube Designer. Which is fine.
But, it also states that an aggregation function can be specified for a particular measure when aggregated along a specific hierarchy. The problem is, it doesn't state where this might be done in the Cube Designer and I can't seem to find any property setting or other setting that might lend itself to doing this.
Being able to specify a different aggregation function for a measure based on the hierarchy involved would be very useful. For example, a dimension with multiple date dimensions or hierarchies using different aggregation functions to apply slightly different additive or semiadditive aggregations.
Anyone know how to do this?
Thanks...
Dave Fackler
A way to do this is in the calculations for the cube. Set a scope (for your measure), set a scope for your dimension, the change the value of the calculation. For example:
where the aggregation method for [myMeasure] is SUM:
SCOPE [Measures].[myMeasure];
SCOPE leaves([Region]);
this = [Measures].[myMeasure] * 2;
END SCOPE;
END SCOPE;
Note: the specifics depend strongly on the aggregation effect you're trying to achieve. I've often found that I needed to approach the problem in reverse, to get the results I wanted.
Good luck.