PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > SQL Server Backups
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
SQL Server Backups

Réponse
 
LinkBack Outils de la discussion
Vieux 29/08/2008, 23h07   #1
Loren Z
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut SQL Server Backups

We have an SQL Server backup job that backups up a database every two
minutes. We also have an alert where if the percent log used is greater then
75 then the response is to run this same backup job.

The backup file is named as such:

Databasename_backup_YYYYMMDDHHMM.trn

The database is named to the nearest minute.
We had a situation where the percent log used got greater then 75 and this
triggered the alert and the transaction log was backed up. Before the minute
increased the scheduled backup ran. As it is named to the nearest minute,
the scheduled backup over wrote the previous triggered backup as they were
named the same.

The client asked us to do a restore and we were not able to do so in that
MSDB two files are in the history and they are named the same. Has anyone
else seen this?


  Réponse avec citation
Vieux 29/08/2008, 23h27   #2
TheSQLGuru
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server Backups

1) Develop a naming scheme that guarantees uniqueness.

2) Do the restores using hand-written RESTORE... commands.

--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"Loren Z" <anonymous@discussions.microsoft.com> wrote in message
news:eZegIthCJHA.5316@TK2MSFTNGP04.phx.gbl...
> We have an SQL Server backup job that backups up a database every two
> minutes. We also have an alert where if the percent log used is greater
> then 75 then the response is to run this same backup job.
>
> The backup file is named as such:
>
> Databasename_backup_YYYYMMDDHHMM.trn
>
> The database is named to the nearest minute.
> We had a situation where the percent log used got greater then 75 and this
> triggered the alert and the transaction log was backed up. Before the
> minute increased the scheduled backup ran. As it is named to the nearest
> minute, the scheduled backup over wrote the previous triggered backup as
> they were named the same.
>
> The client asked us to do a restore and we were not able to do so in that
> MSDB two files are in the history and they are named the same. Has anyone
> else seen this?
>



  Réponse avec citation
Vieux 29/08/2008, 23h55   #3
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server Backups

Did the backup commands have INIT or FORMAT? If not, you probably have two backup in the same file.
Verify using RESTORE HEADERONLY.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Loren Z" <anonymous@discussions.microsoft.com> wrote in message
news:eZegIthCJHA.5316@TK2MSFTNGP04.phx.gbl...
> We have an SQL Server backup job that backups up a database every two minutes. We also have an
> alert where if the percent log used is greater then 75 then the response is to run this same
> backup job.
>
> The backup file is named as such:
>
> Databasename_backup_YYYYMMDDHHMM.trn
>
> The database is named to the nearest minute.
> We had a situation where the percent log used got greater then 75 and this triggered the alert and
> the transaction log was backed up. Before the minute increased the scheduled backup ran. As it is
> named to the nearest minute, the scheduled backup over wrote the previous triggered backup as they
> were named the same.
>
> The client asked us to do a restore and we were not able to do so in that MSDB two files are in
> the history and they are named the same. Has anyone else seen this?
>


  Réponse avec citation
Vieux 03/09/2008, 16h30   #4
Chris Wood
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server Backups

Hi,

We are using a maintenance plan to generate the backup job running SQL2005
build 3239 (CU7). Did something change in the post SP2 builds in that I am
sure we would have had a backup failure because of the duplicate name? Looks
like it now creates file 1/file 2 etc into the same backup file.

Thanks

Chris

"Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.co m> wrote in
message news:%23nIoHIiCJHA.5808@TK2MSFTNGP04.phx.gbl...
> Did the backup commands have INIT or FORMAT? If not, you probably have two
> backup in the same file. Verify using RESTORE HEADERONLY.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
>
> "Loren Z" <anonymous@discussions.microsoft.com> wrote in message
> news:eZegIthCJHA.5316@TK2MSFTNGP04.phx.gbl...
>> We have an SQL Server backup job that backups up a database every two
>> minutes. We also have an alert where if the percent log used is greater
>> then 75 then the response is to run this same backup job.
>>
>> The backup file is named as such:
>>
>> Databasename_backup_YYYYMMDDHHMM.trn
>>
>> The database is named to the nearest minute.
>> We had a situation where the percent log used got greater then 75 and
>> this triggered the alert and the transaction log was backed up. Before
>> the minute increased the scheduled backup ran. As it is named to the
>> nearest minute, the scheduled backup over wrote the previous triggered
>> backup as they were named the same.
>>
>> The client asked us to do a restore and we were not able to do so in that
>> MSDB two files are in the history and they are named the same. Has anyone
>> else seen this?
>>

>



  Réponse avec citation
Vieux 03/09/2008, 21h12   #5
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server Backups

Hi Chris,

Why would build level come into play here? If you do a backup to a file which already exist, it will
quite simply be appended. Unless you specify INIT, which I'm pretty certain that main plan do not
specify. If you have INIT, then it will overwrite. No error will be produced in any case.

An error *will* be produced if your earlier backup specified RETAINDAYS or EXPIREDATE and the date
when the backup will expire hasn't come yet. These options are mostly useless (TM) and exposing
these in maint wiz was a bad idea to start with since most users do not understand what these
options do and what they don't do.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Chris Wood" <anonymous@microsoft.com> wrote in message
news:eQFJlGdDJHA.5196@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> We are using a maintenance plan to generate the backup job running SQL2005 build 3239 (CU7). Did
> something change in the post SP2 builds in that I am sure we would have had a backup failure
> because of the duplicate name? Looks like it now creates file 1/file 2 etc into the same backup
> file.
>
> Thanks
>
> Chris
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.co m> wrote in message
> news:%23nIoHIiCJHA.5808@TK2MSFTNGP04.phx.gbl...
>> Did the backup commands have INIT or FORMAT? If not, you probably have two backup in the same
>> file. Verify using RESTORE HEADERONLY.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>>
>> "Loren Z" <anonymous@discussions.microsoft.com> wrote in message
>> news:eZegIthCJHA.5316@TK2MSFTNGP04.phx.gbl...
>>> We have an SQL Server backup job that backups up a database every two minutes. We also have an
>>> alert where if the percent log used is greater then 75 then the response is to run this same
>>> backup job.
>>>
>>> The backup file is named as such:
>>>
>>> Databasename_backup_YYYYMMDDHHMM.trn
>>>
>>> The database is named to the nearest minute.
>>> We had a situation where the percent log used got greater then 75 and this triggered the alert
>>> and the transaction log was backed up. Before the minute increased the scheduled backup ran. As
>>> it is named to the nearest minute, the scheduled backup over wrote the previous triggered backup
>>> as they were named the same.
>>>
>>> The client asked us to do a restore and we were not able to do so in that MSDB two files are in
>>> the history and they are named the same. Has anyone else seen this?
>>>

>>

>
>


  Réponse avec citation
Vieux 03/09/2008, 23h10   #6
Chris Wood
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server Backups

Thanks Tibor.

It might have been in SQL2000 that gave the error. As I cannot see under the
hood at what the SSIS package has for parameters I will assume that we could
now have many 'files' in the log backup so a recovery would need to look at
this aspect as well.

Thanks

Chris

"Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.co m> wrote in
message news:%23TAPzjfDJHA.1628@TK2MSFTNGP02.phx.gbl...
> Hi Chris,
>
> Why would build level come into play here? If you do a backup to a file
> which already exist, it will quite simply be appended. Unless you specify
> INIT, which I'm pretty certain that main plan do not specify. If you have
> INIT, then it will overwrite. No error will be produced in any case.
>
> An error *will* be produced if your earlier backup specified RETAINDAYS or
> EXPIREDATE and the date when the backup will expire hasn't come yet. These
> options are mostly useless (TM) and exposing these in maint wiz was a bad
> idea to start with since most users do not understand what these options
> do and what they don't do.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
>
> "Chris Wood" <anonymous@microsoft.com> wrote in message
> news:eQFJlGdDJHA.5196@TK2MSFTNGP04.phx.gbl...
>> Hi,
>>
>> We are using a maintenance plan to generate the backup job running
>> SQL2005 build 3239 (CU7). Did something change in the post SP2 builds in
>> that I am sure we would have had a backup failure because of the
>> duplicate name? Looks like it now creates file 1/file 2 etc into the same
>> backup file.
>>
>> Thanks
>>
>> Chris
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.co m> wrote
>> in message news:%23nIoHIiCJHA.5808@TK2MSFTNGP04.phx.gbl...
>>> Did the backup commands have INIT or FORMAT? If not, you probably have
>>> two backup in the same file. Verify using RESTORE HEADERONLY.
>>>
>>> --
>>> Tibor Karaszi, SQL Server MVP
>>> http://www.karaszi.com/sqlserver/default.asp
>>> http://sqlblog.com/blogs/tibor_karaszi
>>>
>>>
>>> "Loren Z" <anonymous@discussions.microsoft.com> wrote in message
>>> news:eZegIthCJHA.5316@TK2MSFTNGP04.phx.gbl...
>>>> We have an SQL Server backup job that backups up a database every two
>>>> minutes. We also have an alert where if the percent log used is greater
>>>> then 75 then the response is to run this same backup job.
>>>>
>>>> The backup file is named as such:
>>>>
>>>> Databasename_backup_YYYYMMDDHHMM.trn
>>>>
>>>> The database is named to the nearest minute.
>>>> We had a situation where the percent log used got greater then 75 and
>>>> this triggered the alert and the transaction log was backed up. Before
>>>> the minute increased the scheduled backup ran. As it is named to the
>>>> nearest minute, the scheduled backup over wrote the previous triggered
>>>> backup as they were named the same.
>>>>
>>>> The client asked us to do a restore and we were not able to do so in
>>>> that MSDB two files are in the history and they are named the same. Has
>>>> anyone else seen this?
>>>>
>>>

>>
>>

>



  Réponse avec citation
Vieux 04/09/2008, 08h28   #7
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SQL Server Backups

We have had the possibility to have several files in a backup since 1.0. So there's no behavior
changes in that aspect.

As I said earlier, the only thing that would cause an error is if the prior backup was performed
using EXPIREDATE or RETAINDAYS and the second one is done using INIT. I would be surprised if that
is how maint plan backups are done in 2000, I know I've used Profiler to trace the backup commands
some years ago, but I don't remember exactly what settings was used.

As for maint plan in 2005, we have the option to control EXPOREDATE and RETAINDAYS but they are both
not included by default. As for having INIT in there, we need to specify for the backup task to
*not* create files with timestamp in the name, but we instead select a backup device/file (an option
seldom used since we get no with backup generation handling).

:-)

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Chris Wood" <anonymous@microsoft.com> wrote in message
news:e9xaEmgDJHA.2484@TK2MSFTNGP06.phx.gbl...
> Thanks Tibor.
>
> It might have been in SQL2000 that gave the error. As I cannot see under the hood at what the SSIS
> package has for parameters I will assume that we could now have many 'files' in the log backup so
> a recovery would need to look at this aspect as well.
>
> Thanks
>
> Chris
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.co m> wrote in message
> news:%23TAPzjfDJHA.1628@TK2MSFTNGP02.phx.gbl...
>> Hi Chris,
>>
>> Why would build level come into play here? If you do a backup to a file which already exist, it
>> will quite simply be appended. Unless you specify INIT, which I'm pretty certain that main plan
>> do not specify. If you have INIT, then it will overwrite. No error will be produced in any case.
>>
>> An error *will* be produced if your earlier backup specified RETAINDAYS or EXPIREDATE and the
>> date when the backup will expire hasn't come yet. These options are mostly useless (TM) and
>> exposing these in maint wiz was a bad idea to start with since most users do not understand what
>> these options do and what they don't do.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>>
>> "Chris Wood" <anonymous@microsoft.com> wrote in message
>> news:eQFJlGdDJHA.5196@TK2MSFTNGP04.phx.gbl...
>>> Hi,
>>>
>>> We are using a maintenance plan to generate the backup job running SQL2005 build 3239 (CU7). Did
>>> something change in the post SP2 builds in that I am sure we would have had a backup failure
>>> because of the duplicate name? Looks like it now creates file 1/file 2 etc into the same backup
>>> file.
>>>
>>> Thanks
>>>
>>> Chris
>>>
>>> "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.co m> wrote in message
>>> news:%23nIoHIiCJHA.5808@TK2MSFTNGP04.phx.gbl...
>>>> Did the backup commands have INIT or FORMAT? If not, you probably have two backup in the same
>>>> file. Verify using RESTORE HEADERONLY.
>>>>
>>>> --
>>>> Tibor Karaszi, SQL Server MVP
>>>> http://www.karaszi.com/sqlserver/default.asp
>>>> http://sqlblog.com/blogs/tibor_karaszi
>>>>
>>>>
>>>> "Loren Z" <anonymous@discussions.microsoft.com> wrote in message
>>>> news:eZegIthCJHA.5316@TK2MSFTNGP04.phx.gbl...
>>>>> We have an SQL Server backup job that backups up a database every two minutes. We also have an
>>>>> alert where if the percent log used is greater then 75 then the response is to run this same
>>>>> backup job.
>>>>>
>>>>> The backup file is named as such:
>>>>>
>>>>> Databasename_backup_YYYYMMDDHHMM.trn
>>>>>
>>>>> The database is named to the nearest minute.
>>>>> We had a situation where the percent log used got greater then 75 and this triggered the alert
>>>>> and the transaction log was backed up. Before the minute increased the scheduled backup ran.
>>>>> As it is named to the nearest minute, the scheduled backup over wrote the previous triggered
>>>>> backup as they were named the same.
>>>>>
>>>>> The client asked us to do a restore and we were not able to do so in that MSDB two files are
>>>>> in the history and they are named the same. Has anyone else seen this?
>>>>>
>>>>
>>>
>>>

>>

>
>


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h39.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18002 seconds with 15 queries