Showing posts with label state. Show all posts
Showing posts with label state. Show all posts

Wednesday, March 28, 2012

Restore Transaction log or the .bak

If there is inconsistency on the DB and I want to restore to a last known good state, should I restore the transaction log files which is backed up every hour or the .bak file which is backed up every night. Basically, what is the difference between the t
wo? When should I use the Transaction log files? Thanks.
This depends on when you what you want to do and when you database was last
consistant.
If the last consistant state was just after you last nightly full or
differential backups then you will not need any transaction log backups.
The transaction log allows you to restore up to a particular point in time
between your nightly full and/or differentials backups. If your requirement
is to restore your database to 8:36 AM today, then you will need to use the
last full backup, plus the closest differential (last nights, if there was
one) and then the 1 am, 2 am, 3, am, 4 am, 5 am, 6 am, 7 am, 8 am and 9 am
transaction logs to restore using the STOPAT. The STOPAT command allows you
to stop the restore process at 8:36 am.
What backups do you have and when where they taken? Also when was the last
time you knew for sure the database was consistant.
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"mmc" <anonymous@.discussions.microsoft.com> wrote in message
news:AD0940C9-56AF-4851-88B0-CBC2AB05058E@.microsoft.com...
> If there is inconsistency on the DB and I want to restore to a last known
good state, should I restore the transaction log files which is backed up
every hour or the .bak file which is backed up every night. Basically, what
is the difference between the two? When should I use the Transaction log
files? Thanks.
|||You need to read the BOL (Books On-Line) section on Backing up and Restoring
Databases located under Administering SQL Server. It is a bit long and
complex, but then the topic is somewhat complex and deserves a long
explanation.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"mmc" <anonymous@.discussions.microsoft.com> wrote in message
news:AD0940C9-56AF-4851-88B0-CBC2AB05058E@.microsoft.com...
> If there is inconsistency on the DB and I want to restore to a last known
good state, should I restore the transaction log files which is backed up
every hour or the .bak file which is backed up every night. Basically, what
is the difference between the two? When should I use the Transaction log
files? Thanks.

Restore Transaction log or the .bak

If there is inconsistency on the DB and I want to restore to a last known go
od state, should I restore the transaction log files which is backed up ever
y hour or the .bak file which is backed up every night. Basically, what is t
he difference between the t
wo? When should I use the Transaction log files? Thanks.This depends on when you what you want to do and when you database was last
consistant.
If the last consistant state was just after you last nightly full or
differential backups then you will not need any transaction log backups.
The transaction log allows you to restore up to a particular point in time
between your nightly full and/or differentials backups. If your requirement
is to restore your database to 8:36 AM today, then you will need to use the
last full backup, plus the closest differential (last nights, if there was
one) and then the 1 am, 2 am, 3, am, 4 am, 5 am, 6 am, 7 am, 8 am and 9 am
transaction logs to restore using the STOPAT. The STOPAT command allows you
to stop the restore process at 8:36 am.
What backups do you have and when where they taken? Also when was the last
time you knew for sure the database was consistant.
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"mmc" <anonymous@.discussions.microsoft.com> wrote in message
news:AD0940C9-56AF-4851-88B0-CBC2AB05058E@.microsoft.com...
> If there is inconsistency on the DB and I want to restore to a last known
good state, should I restore the transaction log files which is backed up
every hour or the .bak file which is backed up every night. Basically, what
is the difference between the two? When should I use the Transaction log
files? Thanks.|||You need to read the BOL (Books On-Line) section on Backing up and Restoring
Databases located under Administering SQL Server. It is a bit long and
complex, but then the topic is somewhat complex and deserves a long
explanation.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"mmc" <anonymous@.discussions.microsoft.com> wrote in message
news:AD0940C9-56AF-4851-88B0-CBC2AB05058E@.microsoft.com...
> If there is inconsistency on the DB and I want to restore to a last known
good state, should I restore the transaction log files which is backed up
every hour or the .bak file which is backed up every night. Basically, what
is the difference between the two? When should I use the Transaction log
files? Thanks.sql

Restore Transaction log or the .bak

If there is inconsistency on the DB and I want to restore to a last known good state, should I restore the transaction log files which is backed up every hour or the .bak file which is backed up every night. Basically, what is the difference between the two? When should I use the Transaction log files? Thanks.This depends on when you what you want to do and when you database was last
consistant.
If the last consistant state was just after you last nightly full or
differential backups then you will not need any transaction log backups.
The transaction log allows you to restore up to a particular point in time
between your nightly full and/or differentials backups. If your requirement
is to restore your database to 8:36 AM today, then you will need to use the
last full backup, plus the closest differential (last nights, if there was
one) and then the 1 am, 2 am, 3, am, 4 am, 5 am, 6 am, 7 am, 8 am and 9 am
transaction logs to restore using the STOPAT. The STOPAT command allows you
to stop the restore process at 8:36 am.
What backups do you have and when where they taken? Also when was the last
time you knew for sure the database was consistant.
--
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"mmc" <anonymous@.discussions.microsoft.com> wrote in message
news:AD0940C9-56AF-4851-88B0-CBC2AB05058E@.microsoft.com...
> If there is inconsistency on the DB and I want to restore to a last known
good state, should I restore the transaction log files which is backed up
every hour or the .bak file which is backed up every night. Basically, what
is the difference between the two? When should I use the Transaction log
files? Thanks.|||You need to read the BOL (Books On-Line) section on Backing up and Restoring
Databases located under Administering SQL Server. It is a bit long and
complex, but then the topic is somewhat complex and deserves a long
explanation.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"mmc" <anonymous@.discussions.microsoft.com> wrote in message
news:AD0940C9-56AF-4851-88B0-CBC2AB05058E@.microsoft.com...
> If there is inconsistency on the DB and I want to restore to a last known
good state, should I restore the transaction log files which is backed up
every hour or the .bak file which is backed up every night. Basically, what
is the difference between the two? When should I use the Transaction log
files? Thanks.

Monday, March 26, 2012

restore to a specific state

Dear all,
I'm using SQL server 2000.
The last backup made was on 02/Jul/2007.
Today is 24/Jul/2007: 2 days ago, some majors changes (insert/update/delete)
were made on the database. and I want to rollback these transactions (and
only those made in the 2 days).
Is there any code, or something to do that can help me?
Thank you in advance.
jouj
Perform transaction log backup. Then restore your full backup made on
02/Jul/2007 and use just created transaction log backup by restoring it with
option STOP AT (this will allow you to limit the number of restored
transactions just to the date and time you need).
Regards
Pawel Potasinski
Uytkownik "jouj" <jouj@.discussions.microsoft.com> napisa w wiadomoci
news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
> Dear all,
> I'm using SQL server 2000.
> The last backup made was on 02/Jul/2007.
> Today is 24/Jul/2007: 2 days ago, some majors changes
> (insert/update/delete)
> were made on the database. and I want to rollback these transactions (and
> only those made in the 2 days).
> Is there any code, or something to do that can help me?
> Thank you in advance.
> jouj
|||Hi,
I followed your steps and on the last one:
RESTORE LOG mydb
FROM Disk = 'F:\BACKUP\mydbLogfile24_07_2007.bak'
WITH RECOVERY, STOPAT = 'Jul 23, 2007 12:00 AM'
I'm getting this error message:
[
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.
]
Regards,
jouj
"Pawel Potasinski" wrote:

> Perform transaction log backup. Then restore your full backup made on
> 02/Jul/2007 and use just created transaction log backup by restoring it with
> option STOP AT (this will allow you to limit the number of restored
> transactions just to the date and time you need).
> --
> Regards
> Pawel Potasinski
>
> U?ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa3 w wiadomo?ci
> news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
>
>
|||1. Backup your transaction log with NORECOVERY option (this will put
database in Restoring state).
2. Restore full backup (created on 02/Jul/2007) with NORECOVERY and REPLACE
options. <-- THIS IS WHAT YOU DID WRONG (did not specify NORECOVERY option)
3. Restore transaction log backup created in step 1 witn RECOVERY and STOP
AT options.
Regards
Pawel Potasinski
Uytkownik "jouj" <jouj@.discussions.microsoft.com> napisa w wiadomoci
news:62D1A0E0-D972-403C-BC39-356BCD56BAAC@.microsoft.com...[vbcol=seagreen]
> Hi,
> I followed your steps and on the last one:
> RESTORE LOG mydb
> FROM Disk = 'F:\BACKUP\mydbLogfile24_07_2007.bak'
> WITH RECOVERY, STOPAT = 'Jul 23, 2007 12:00 AM'
> I'm getting this error message:
> [
> 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.
> ]
> Regards,
> jouj
> "Pawel Potasinski" wrote:
|||Dear Mr. Pawel,
Thank you for your help but it did'nt work for me.
I'm getting this message:
The log in this backup set begins at LSN 86445000000038300001, which is too
late to apply to the database. An earlier log backup that includes LSN
72624000011844600001 can be restored.
So I think there was an old backup for the log file made after my backup of
02/07/2007 and the actual log file does not start from the backup time.
Thank you for your efforts,
Regards,
jouj
--
G.Haddad
"Pawel Potasinski" wrote:

> 1. Backup your transaction log with NORECOVERY option (this will put
> database in Restoring state).
> 2. Restore full backup (created on 02/Jul/2007) with NORECOVERY and REPLACE
> options. <-- THIS IS WHAT YOU DID WRONG (did not specify NORECOVERY option)
> 3. Restore transaction log backup created in step 1 witn RECOVERY and STOP
> AT options.
> --
> Regards
> Pawel Potasinski
>
> U?ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa3 w wiadomo?ci
> news:62D1A0E0-D972-403C-BC39-356BCD56BAAC@.microsoft.com...
>
>
|||This should encourage you to set some solid backup strategy for your
databases.
Regards
Pawel Potasinski
Uytkownik "jouj" <jouj@.discussions.microsoft.com> napisa w wiadomoci
news:B5442BF8-1D64-4583-A939-BB43F87C22CC@.microsoft.com...[vbcol=seagreen]
> Dear Mr. Pawel,
> Thank you for your help but it did'nt work for me.
> I'm getting this message:
> The log in this backup set begins at LSN 86445000000038300001, which is
> too
> late to apply to the database. An earlier log backup that includes LSN
> 72624000011844600001 can be restored.
> So I think there was an old backup for the log file made after my backup
> of
> 02/07/2007 and the actual log file does not start from the backup time.
> Thank you for your efforts,
> Regards,
> jouj
> --
> --
> G.Haddad
> --
>
> "Pawel Potasinski" wrote:
sql

restore to a specific state

Dear all,
I'm using SQL server 2000.
The last backup made was on 02/Jul/2007.
Today is 24/Jul/2007: 2 days ago, some majors changes (insert/update/delete)
were made on the database. and I want to rollback these transactions (and
only those made in the 2 days).
Is there any code, or something to do that can help me?
Thank you in advance.
joujPerform transaction log backup. Then restore your full backup made on
02/Jul/2007 and use just created transaction log backup by restoring it with
option STOP AT (this will allow you to limit the number of restored
transactions just to the date and time you need).
Regards
Pawel Potasinski
Uytkownik "jouj" <jouj@.discussions.microsoft.com> napisa w wiadomoci
news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
> Dear all,
> I'm using SQL server 2000.
> The last backup made was on 02/Jul/2007.
> Today is 24/Jul/2007: 2 days ago, some majors changes
> (insert/update/delete)
> were made on the database. and I want to rollback these transactions (and
> only those made in the 2 days).
> Is there any code, or something to do that can help me?
> Thank you in advance.
> jouj|||Hi,
I followed your steps and on the last one:
RESTORE LOG mydb
FROM Disk = 'F:\BACKUP\mydbLogfile24_07_2007.bak'
WITH RECOVERY, STOPAT = 'Jul 23, 2007 12:00 AM'
I'm getting this error message:
[
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.
]
Regards,
jouj
"Pawel Potasinski" wrote:

> Perform transaction log backup. Then restore your full backup made on
> 02/Jul/2007 and use just created transaction log backup by restoring it wi
th
> option STOP AT (this will allow you to limit the number of restored
> transactions just to the date and time you need).
> --
> Regards
> Pawel Potasinski
>
> U?ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa3 w wiadomo?ci
> news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
>
>|||1. Backup your transaction log with NORECOVERY option (this will put
database in Restoring state).
2. Restore full backup (created on 02/Jul/2007) with NORECOVERY and REPLACE
options. <-- THIS IS WHAT YOU DID WRONG (did not specify NORECOVERY option)
3. Restore transaction log backup created in step 1 witn RECOVERY and STOP
AT options.
Regards
Pawel Potasinski
Uytkownik "jouj" <jouj@.discussions.microsoft.com> napisa w wiadomoci
news:62D1A0E0-D972-403C-BC39-356BCD56BAAC@.microsoft.com...[vbcol=seagreen]
> Hi,
> I followed your steps and on the last one:
> RESTORE LOG mydb
> FROM Disk = 'F:\BACKUP\mydbLogfile24_07_2007.bak'
> WITH RECOVERY, STOPAT = 'Jul 23, 2007 12:00 AM'
> I'm getting this error message:
> [
> 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.
> ]
> Regards,
> jouj
> "Pawel Potasinski" wrote:
>|||Dear Mr. Pawel,
Thank you for your help but it did'nt work for me.
I'm getting this message:
The log in this backup set begins at LSN 86445000000038300001, which is too
late to apply to the database. An earlier log backup that includes LSN
72624000011844600001 can be restored.
So I think there was an old backup for the log file made after my backup of
02/07/2007 and the actual log file does not start from the backup time.
Thank you for your efforts,
Regards,
jouj
--
G.Haddad
--
"Pawel Potasinski" wrote:

> 1. Backup your transaction log with NORECOVERY option (this will put
> database in Restoring state).
> 2. Restore full backup (created on 02/Jul/2007) with NORECOVERY and REPLAC
E
> options. <-- THIS IS WHAT YOU DID WRONG (did not specify NORECOVERY option
)
> 3. Restore transaction log backup created in step 1 witn RECOVERY and STOP
> AT options.
> --
> Regards
> Pawel Potasinski
>
> U?ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa3 w wiadomo?ci
> news:62D1A0E0-D972-403C-BC39-356BCD56BAAC@.microsoft.com...
>
>|||This should encourage you to set some solid backup strategy for your
databases.
Regards
Pawel Potasinski
Uytkownik "jouj" <jouj@.discussions.microsoft.com> napisa w wiadomoci
news:B5442BF8-1D64-4583-A939-BB43F87C22CC@.microsoft.com...[vbcol=seagreen]
> Dear Mr. Pawel,
> Thank you for your help but it did'nt work for me.
> I'm getting this message:
> The log in this backup set begins at LSN 86445000000038300001, which is
> too
> late to apply to the database. An earlier log backup that includes LSN
> 72624000011844600001 can be restored.
> So I think there was an old backup for the log file made after my backup
> of
> 02/07/2007 and the actual log file does not start from the backup time.
> Thank you for your efforts,
> Regards,
> jouj
> --
> --
> G.Haddad
> --
>
> "Pawel Potasinski" wrote:
>

restore to a specific state

Dear all,
I'm using SQL server 2000.
The last backup made was on 02/Jul/2007.
Today is 24/Jul/2007: 2 days ago, some majors changes (insert/update/delete)
were made on the database. and I want to rollback these transactions (and
only those made in the 2 days).
Is there any code, or something to do that can help me?
Thank you in advance.
joujPerform transaction log backup. Then restore your full backup made on
02/Jul/2007 and use just created transaction log backup by restoring it with
option STOP AT (this will allow you to limit the number of restored
transactions just to the date and time you need).
--
Regards
Pawel Potasinski
U¿ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa³ w wiadomo¶ci
news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
> Dear all,
> I'm using SQL server 2000.
> The last backup made was on 02/Jul/2007.
> Today is 24/Jul/2007: 2 days ago, some majors changes
> (insert/update/delete)
> were made on the database. and I want to rollback these transactions (and
> only those made in the 2 days).
> Is there any code, or something to do that can help me?
> Thank you in advance.
> jouj|||Hi,
I followed your steps and on the last one:
RESTORE LOG mydb
FROM Disk = 'F:\BACKUP\mydbLogfile24_07_2007.bak'
WITH RECOVERY, STOPAT = 'Jul 23, 2007 12:00 AM'
I'm getting this error message:
[
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.
]
Regards,
jouj
"Pawel Potasinski" wrote:
> Perform transaction log backup. Then restore your full backup made on
> 02/Jul/2007 and use just created transaction log backup by restoring it with
> option STOP AT (this will allow you to limit the number of restored
> transactions just to the date and time you need).
> --
> Regards
> Pawel Potasinski
>
> U¿ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa³ w wiadomo¶ci
> news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
> > Dear all,
> > I'm using SQL server 2000.
> > The last backup made was on 02/Jul/2007.
> >
> > Today is 24/Jul/2007: 2 days ago, some majors changes
> > (insert/update/delete)
> > were made on the database. and I want to rollback these transactions (and
> > only those made in the 2 days).
> > Is there any code, or something to do that can help me?
> >
> > Thank you in advance.
> > jouj
>
>|||1. Backup your transaction log with NORECOVERY option (this will put
database in Restoring state).
2. Restore full backup (created on 02/Jul/2007) with NORECOVERY and REPLACE
options. <-- THIS IS WHAT YOU DID WRONG (did not specify NORECOVERY option)
3. Restore transaction log backup created in step 1 witn RECOVERY and STOP
AT options.
--
Regards
Pawel Potasinski
U¿ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa³ w wiadomo¶ci
news:62D1A0E0-D972-403C-BC39-356BCD56BAAC@.microsoft.com...
> Hi,
> I followed your steps and on the last one:
> RESTORE LOG mydb
> FROM Disk = 'F:\BACKUP\mydbLogfile24_07_2007.bak'
> WITH RECOVERY, STOPAT = 'Jul 23, 2007 12:00 AM'
> I'm getting this error message:
> [
> 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.
> ]
> Regards,
> jouj
> "Pawel Potasinski" wrote:
>> Perform transaction log backup. Then restore your full backup made on
>> 02/Jul/2007 and use just created transaction log backup by restoring it
>> with
>> option STOP AT (this will allow you to limit the number of restored
>> transactions just to the date and time you need).
>> --
>> Regards
>> Pawel Potasinski
>>
>> U?ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa3 w wiadomo?ci
>> news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
>> > Dear all,
>> > I'm using SQL server 2000.
>> > The last backup made was on 02/Jul/2007.
>> >
>> > Today is 24/Jul/2007: 2 days ago, some majors changes
>> > (insert/update/delete)
>> > were made on the database. and I want to rollback these transactions
>> > (and
>> > only those made in the 2 days).
>> > Is there any code, or something to do that can help me?
>> >
>> > Thank you in advance.
>> > jouj
>>|||Dear Mr. Pawel,
Thank you for your help but it did'nt work for me.
I'm getting this message:
The log in this backup set begins at LSN 86445000000038300001, which is too
late to apply to the database. An earlier log backup that includes LSN
72624000011844600001 can be restored.
So I think there was an old backup for the log file made after my backup of
02/07/2007 and the actual log file does not start from the backup time.
Thank you for your efforts,
Regards,
jouj
--
--
G.Haddad
--
"Pawel Potasinski" wrote:
> 1. Backup your transaction log with NORECOVERY option (this will put
> database in Restoring state).
> 2. Restore full backup (created on 02/Jul/2007) with NORECOVERY and REPLACE
> options. <-- THIS IS WHAT YOU DID WRONG (did not specify NORECOVERY option)
> 3. Restore transaction log backup created in step 1 witn RECOVERY and STOP
> AT options.
> --
> Regards
> Pawel Potasinski
>
> U¿ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa³ w wiadomo¶ci
> news:62D1A0E0-D972-403C-BC39-356BCD56BAAC@.microsoft.com...
> > Hi,
> >
> > I followed your steps and on the last one:
> >
> > RESTORE LOG mydb
> > FROM Disk = 'F:\BACKUP\mydbLogfile24_07_2007.bak'
> > WITH RECOVERY, STOPAT = 'Jul 23, 2007 12:00 AM'
> >
> > I'm getting this error message:
> > [
> > 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.
> > ]
> >
> > Regards,
> > jouj
> > "Pawel Potasinski" wrote:
> >
> >> Perform transaction log backup. Then restore your full backup made on
> >> 02/Jul/2007 and use just created transaction log backup by restoring it
> >> with
> >> option STOP AT (this will allow you to limit the number of restored
> >> transactions just to the date and time you need).
> >>
> >> --
> >> Regards
> >> Pawel Potasinski
> >>
> >>
> >> U?ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa3 w wiadomo?ci
> >> news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
> >> > Dear all,
> >> > I'm using SQL server 2000.
> >> > The last backup made was on 02/Jul/2007.
> >> >
> >> > Today is 24/Jul/2007: 2 days ago, some majors changes
> >> > (insert/update/delete)
> >> > were made on the database. and I want to rollback these transactions
> >> > (and
> >> > only those made in the 2 days).
> >> > Is there any code, or something to do that can help me?
> >> >
> >> > Thank you in advance.
> >> > jouj
> >>
> >>
> >>
>
>|||This should encourage you to set some solid backup strategy for your
databases.
--
Regards
Pawel Potasinski
U¿ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa³ w wiadomo¶ci
news:B5442BF8-1D64-4583-A939-BB43F87C22CC@.microsoft.com...
> Dear Mr. Pawel,
> Thank you for your help but it did'nt work for me.
> I'm getting this message:
> The log in this backup set begins at LSN 86445000000038300001, which is
> too
> late to apply to the database. An earlier log backup that includes LSN
> 72624000011844600001 can be restored.
> So I think there was an old backup for the log file made after my backup
> of
> 02/07/2007 and the actual log file does not start from the backup time.
> Thank you for your efforts,
> Regards,
> jouj
> --
> --
> G.Haddad
> --
>
> "Pawel Potasinski" wrote:
>> 1. Backup your transaction log with NORECOVERY option (this will put
>> database in Restoring state).
>> 2. Restore full backup (created on 02/Jul/2007) with NORECOVERY and
>> REPLACE
>> options. <-- THIS IS WHAT YOU DID WRONG (did not specify NORECOVERY
>> option)
>> 3. Restore transaction log backup created in step 1 witn RECOVERY and
>> STOP
>> AT options.
>> --
>> Regards
>> Pawel Potasinski
>>
>> U?ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa3 w wiadomo?ci
>> news:62D1A0E0-D972-403C-BC39-356BCD56BAAC@.microsoft.com...
>> > Hi,
>> >
>> > I followed your steps and on the last one:
>> >
>> > RESTORE LOG mydb
>> > FROM Disk = 'F:\BACKUP\mydbLogfile24_07_2007.bak'
>> > WITH RECOVERY, STOPAT = 'Jul 23, 2007 12:00 AM'
>> >
>> > I'm getting this error message:
>> > [
>> > 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.
>> > ]
>> >
>> > Regards,
>> > jouj
>> > "Pawel Potasinski" wrote:
>> >
>> >> Perform transaction log backup. Then restore your full backup made on
>> >> 02/Jul/2007 and use just created transaction log backup by restoring
>> >> it
>> >> with
>> >> option STOP AT (this will allow you to limit the number of restored
>> >> transactions just to the date and time you need).
>> >>
>> >> --
>> >> Regards
>> >> Pawel Potasinski
>> >>
>> >>
>> >> U?ytkownik "jouj" <jouj@.discussions.microsoft.com> napisa3 w
>> >> wiadomo?ci
>> >> news:C419271B-0404-48F9-A973-41AB4F0D964F@.microsoft.com...
>> >> > Dear all,
>> >> > I'm using SQL server 2000.
>> >> > The last backup made was on 02/Jul/2007.
>> >> >
>> >> > Today is 24/Jul/2007: 2 days ago, some majors changes
>> >> > (insert/update/delete)
>> >> > were made on the database. and I want to rollback these transactions
>> >> > (and
>> >> > only those made in the 2 days).
>> >> > Is there any code, or something to do that can help me?
>> >> >
>> >> > Thank you in advance.
>> >> > jouj
>> >>
>> >>
>> >>
>>

Friday, March 23, 2012

Restore successfull BUT......

Hi Group,
I performed a restore operation on a database. The restore said it was
successful, however the database is in an unusable state. It is greyed out
and just says (Loading) after it. It stays in this status forever. I
restarted SQL Services, and even rebooted the server, which made a few
people cry but they'll get over it.
I also detached the database, since I have a copy of it stored on another
drive, but when I went to re-attach it to the copy, I get a Error 5173
Cannot associate files with different databases. That is all it says.
What am I missing here?
Thanks
CurtSounds like you did not recover the database when you restored it.
Try running the following from Query Analyzer (assuming your database is
called MyDB for example and you still have it in the "loading" state on your
server):
restore database MyDB with recovery
This should bring it online again.
Tony.
"C Fish" <cfish@.qwpi.com> wrote in message
news:D7XQa.1291$cX.480@.newssvr23.news.prodigy.com...
> Hi Group,
> I performed a restore operation on a database. The restore said it was
> successful, however the database is in an unusable state. It is greyed out
> and just says (Loading) after it. It stays in this status forever. I
> restarted SQL Services, and even rebooted the server, which made a few
> people cry but they'll get over it.
> I also detached the database, since I have a copy of it stored on another
> drive, but when I went to re-attach it to the copy, I get a Error 5173
> Cannot associate files with different databases. That is all it says.
> What am I missing here?
> Thanks
> Curt
>|||Hi Tony,
Well that got me this far
Server: Msg 913, Level 16, State 8, Line 1
Could not find database ID 65535. Database may not be activated yet or may
be in transition.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Does this mean anything to you' The database is on the list in enterprise
manager, however it is gray whereas the other databases are yellow and it
has (Loading) after the name in parenthesis. It does not however show up in
ISQL list nor the list in SQL Query Analyzer. FYI this is SQL Server 2000
with SP3 and the Backup set is from Veritas Back Up Exec ver 8.5 with SQL
Server plug in. I have restored before without any issues. I followed the
same procedures as I have in the past, but this time I am feeling like I'm
in some trouble.
Curt
"Tony Lewis" <tony.lewis@.unspam_dowcorning.com> wrote in message
news:OMHhz1vSDHA.2084@.TK2MSFTNGP11.phx.gbl...
> Sounds like you did not recover the database when you restored it.
> Try running the following from Query Analyzer (assuming your database is
> called MyDB for example and you still have it in the "loading" state on
your
> server):
> restore database MyDB with recovery
> This should bring it online again.
> Tony.
> "C Fish" <cfish@.qwpi.com> wrote in message
> news:D7XQa.1291$cX.480@.newssvr23.news.prodigy.com...
> > Hi Group,
> >
> > I performed a restore operation on a database. The restore said it was
> > successful, however the database is in an unusable state. It is greyed
out
> > and just says (Loading) after it. It stays in this status forever. I
> > restarted SQL Services, and even rebooted the server, which made a few
> > people cry but they'll get over it.
> >
> > I also detached the database, since I have a copy of it stored on
another
> > drive, but when I went to re-attach it to the copy, I get a Error 5173
> > Cannot associate files with different databases. That is all it says.
> >
> > What am I missing here?
> >
> > Thanks
> >
> > Curt
> >
> >
>
>

Monday, March 12, 2012

Restore problem... "The media family on device '%ls' is incorrectly formed"

A client keeps sending me .BAK files. A couple have worked, but I
have gotten this error on many:
Error 3241 Severity 16 State 1
The media family on device '%ls' is incorrectly formed. SQL Server
cannot process this media family.
If I view the contents of the .BAK (in Enterprise Manager), it says it
is INCOMPLETE.
This indicates that maybe the backup was bad. However, since they have
sent me so many bad ones, my question is why are these backups turning
out bad?
Some details:
-The client is using SQL Server 2000 SP4, so am I
-I am running Win2K Server, they are running Win 2003 server.
-I looked at KB 297104 which deals with this error, but that is for
pre-SP4.
-When I run a restore verifyonly, I get the same error
Since I am off-site and can't go to the client site, any ideas on what
they may be doing wrong or what we can do for me to get a legitimate
copy of this database on my server? I am going crazy with these files
that won't load and don't know what to tell my client.have them run a verify before sending them to you. This should guarantee a
valid backup.
--
RelevantNoise.com - dedicated to mining blogs for business intelligence.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Mike C" <michaeljc70@.hotmail.com> wrote in message
news:1187736521.741462.231380@.l22g2000prc.googlegroups.com...
>A client keeps sending me .BAK files. A couple have worked, but I
> have gotten this error on many:
> Error 3241 Severity 16 State 1
> The media family on device '%ls' is incorrectly formed. SQL Server
> cannot process this media family.
> If I view the contents of the .BAK (in Enterprise Manager), it says it
> is INCOMPLETE.
> This indicates that maybe the backup was bad. However, since they have
> sent me so many bad ones, my question is why are these backups turning
> out bad?
> Some details:
> -The client is using SQL Server 2000 SP4, so am I
> -I am running Win2K Server, they are running Win 2003 server.
> -I looked at KB 297104 which deals with this error, but that is for
> pre-SP4.
> -When I run a restore verifyonly, I get the same error
> Since I am off-site and can't go to the client site, any ideas on what
> they may be doing wrong or what we can do for me to get a legitimate
> copy of this database on my server? I am going crazy with these files
> that won't load and don't know what to tell my client.
>|||Hello,
First of all tell your client to do a restore with verify only or header only
to test, on their side, the correctness of the backup. If it's possible, tell
the client to do a full restore of the backup.
Second, if the first worked out well, send back the media to the client and
tell them to try the above process.
It is possible that between different copies of the backup file it becomes
corrupt. If the transfer of the backup file it is done over wan this is
something sure. A second possibility it is this file is part of a multivolume
backup. Sql Server has the option to backup a database to more than one file
to speed up the backup process.
Hope this helps you solve the problem.
I recommend you reading this too
http://www.dbforums.com/showthread.php?t=682406.
Cheers.
Mike C wrote:
>A client keeps sending me .BAK files. A couple have worked, but I
>have gotten this error on many:
>Error 3241 Severity 16 State 1
>The media family on device '%ls' is incorrectly formed. SQL Server
>cannot process this media family.
>If I view the contents of the .BAK (in Enterprise Manager), it says it
>is INCOMPLETE.
>This indicates that maybe the backup was bad. However, since they have
>sent me so many bad ones, my question is why are these backups turning
>out bad?
>Some details:
>-The client is using SQL Server 2000 SP4, so am I
>-I am running Win2K Server, they are running Win 2003 server.
>-I looked at KB 297104 which deals with this error, but that is for
>pre-SP4.
>-When I run a restore verifyonly, I get the same error
>Since I am off-site and can't go to the client site, any ideas on what
>they may be doing wrong or what we can do for me to get a legitimate
>copy of this database on my server? I am going crazy with these files
>that won't load and don't know what to tell my client.|||On Aug 22, 5:08 am, "flooriin" <u36842@.uwe> wrote:
> Hello,
> First of all tell your client to do arestorewith verify only or header only
> to test, on their side, the correctness of the backup. If it's possible, tell
> the client to do a fullrestoreof the backup.
> Second, if the first worked out well, send back themediato the client and
> tell them to try the above process.
> It is possible that between different copies of the backup file it becomes
> corrupt. If the transfer of the backup file it is done over wan this is
> something sure. A second possibility it is this file is part of a multivolume
> backup. Sql Server has the option to backup a database to more than one file
> to speed up the backup process.
> Hope this helps you solve theproblem.
> I recommend you reading this toohttp://www.dbforums.com/showthread.php?t=682406.
> Cheers.
> Mike C wrote:
> >A client keeps sending me .BAK files. A couple have worked, but I
> >have gotten this error on many:
> >Error 3241 Severity 16 State 1
> >Themediafamily on device '%ls' is incorrectly formed. SQL Server
> >cannot process thismediafamily.
> >If I view the contents of the .BAK (in Enterprise Manager), it says it
> >is INCOMPLETE.
> >This indicates that maybe the backup was bad. However, since they have
> >sent me so many bad ones, my question is why are these backups turning
> >out bad?
> >Some details:
> >-The client is using SQL Server 2000 SP4, so am I
> >-I am running Win2K Server, they are running Win 2003 server.
> >-I looked at KB 297104 which deals with this error, but that is for
> >pre-SP4.
> >-When I run arestoreverifyonly, I get the same error
> >Since I am off-site and can't go to the client site, any ideas on what
> >they may be doing wrong or what we can do for me to get a legitimate
> >copy of this database on my server? I am going crazy with these files
> >that won't load and don't know what to tell my client.
The client said they did a verify when they did the backup. I will
have them check to see if RESTORE VERIFYONLY works. Assuming the file
is good, I can only think of 2 unlikely issues:
-The file is becoming corrupt when they zip it up. Since it is bigger
than a DVD, that is the only way to get it to me.
-Running W2K Server vs. W2003 Server is making some dofference.|||On Aug 22, 5:08 am, "flooriin" <u36842@.uwe> wrote:
> Hello,
> First of all tell your client to do a restore with verify only or header only
> to test, on their side, the correctness of the backup. If it's possible, tell
> the client to do a full restore of the backup.
> Second, if the first worked out well, send back the media to the client and
> tell them to try the above process.
> It is possible that between different copies of the backup file it becomes
> corrupt. If the transfer of the backup file it is done over wan this is
> something sure. A second possibility it is this file is part of a multivolume
> backup. Sql Server has the option to backup a database to more than one file
> to speed up the backup process.
> Hope this helps you solve the problem.
> I recommend you reading this toohttp://www.dbforums.com/showthread.php?t=682406.
> Cheers.
> Mike C wrote:
> >A client keeps sending me .BAK files. A couple have worked, but I
> >have gotten this error on many:
> >Error 3241 Severity 16 State 1
> >The media family on device '%ls' is incorrectly formed. SQL Server
> >cannot process this media family.
> >If I view the contents of the .BAK (in Enterprise Manager), it says it
> >is INCOMPLETE.
> >This indicates that maybe the backup was bad. However, since they have
> >sent me so many bad ones, my question is why are these backups turning
> >out bad?
> >Some details:
> >-The client is using SQL Server 2000 SP4, so am I
> >-I am running Win2K Server, they are running Win 2003 server.
> >-I looked at KB 297104 which deals with this error, but that is for
> >pre-SP4.
> >-When I run a restore verifyonly, I get the same error
> >Since I am off-site and can't go to the client site, any ideas on what
> >they may be doing wrong or what we can do for me to get a legitimate
> >copy of this database on my server? I am going crazy with these files
> >that won't load and don't know what to tell my client.
The restore verifyonly or backuponly works at the client site. I
verified versions. They are using Sql Server 2000 SP3 (plus a
cumulative patch) while I am running SP4. I can try and go back to
SP3, but that seems unlikely culprit (more likely if their version
were higher than mine). Any other ideas?|||On Aug 22, 5:08 am, "flooriin" <u36842@.uwe> wrote:
> Hello,
> First of all tell your client to do a restore with verify only or header only
> to test, on their side, the correctness of the backup. If it's possible, tell
> the client to do a full restore of the backup.
> Second, if the first worked out well, send back the media to the client and
> tell them to try the above process.
> It is possible that between different copies of the backup file it becomes
> corrupt. If the transfer of the backup file it is done over wan this is
> something sure. A second possibility it is this file is part of a multivolume
> backup. Sql Server has the option to backup a database to more than one file
> to speed up the backup process.
> Hope this helps you solve the problem.
> I recommend you reading this toohttp://www.dbforums.com/showthread.php?t=682406.
> Cheers.
> Mike C wrote:
> >A client keeps sending me .BAK files. A couple have worked, but I
> >have gotten this error on many:
> >Error 3241 Severity 16 State 1
> >The media family on device '%ls' is incorrectly formed. SQL Server
> >cannot process this media family.
> >If I view the contents of the .BAK (in Enterprise Manager), it says it
> >is INCOMPLETE.
> >This indicates that maybe the backup was bad. However, since they have
> >sent me so many bad ones, my question is why are these backups turning
> >out bad?
> >Some details:
> >-The client is using SQL Server 2000 SP4, so am I
> >-I am running Win2K Server, they are running Win 2003 server.
> >-I looked at KB 297104 which deals with this error, but that is for
> >pre-SP4.
> >-When I run a restore verifyonly, I get the same error
> >Since I am off-site and can't go to the client site, any ideas on what
> >they may be doing wrong or what we can do for me to get a legitimate
> >copy of this database on my server? I am going crazy with these files
> >that won't load and don't know what to tell my client.
Do you think me being on w2K and them on W2003 server makes a
difference?|||I do not believe the problem arise because of different Windows versions. I
think it's more about database and the process to backup and deliver the
database. You have said that are cases when the backup was restored
successfully. What is different from your current situation? I am more
concern about different Sql Server version. I know about a bug in SP3 when a
differential database backup could miss to save some extents ... but you are
talking about full backup.
Read this too
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=24&messageid=167366&p=2
Maybe it will help you. Read the last post and try out the utility told
there.
Cheers.
Mike C wrote:
>> Hello,
>[quoted text clipped - 40 lines]
>> >copy of this database on my server? I am going crazy with these files
>> >that won't load and don't know what to tell my client.
>Do you think me being on w2K and them on W2003 server makes a
>difference?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1|||On Aug 24, 6:25 am, "flooriin via SQLMonster.com" <u36842@.uwe> wrote:
> I do not believe the problem arise because of different Windows versions. I
> think it's more about database and the process to backup and deliver the
> database. You have said that are cases when the backup was restored
> successfully. What is different from your current situation? I am more
> concern about different Sql Server version. I know about a bug in SP3 when a
> differential database backup could miss to save some extents ... but you are
> talking about full backup.
> Read this toohttp://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=24&mes...
> Maybe it will help you. Read the last post and try out the utility told
> there.
> Cheers.
> Mike C wrote:
> >> Hello,
> >[quoted text clipped - 40 lines]
> >> >copy of this database on my server? I am going crazy with these files
> >> >that won't load and don't know what to tell my client.
> >Do you think me being on w2K and them on W2003 server makes a
> >difference?
> --
> Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1
I installed SQL Server 2000 MSDE on an XP box and I was able to
restore the backup. That means the file is fine. I am just going to
work with that since I don't need any of the enterprise features.
This is a short project and it isn't worth spending 100 hrs trying to
figure out what the problem is.