INF: Interpreting Msg 4305 "Specified File Is Out of Sequence"

ID: Q95867


The information in this article applies to:


SUMMARY

When restoring transaction log dumps, the following error is displayed:

( Msg. 4305, Level 16, State 1, "Specified file 'dumpfile' is out of sequence. Current time stamp is <datetime> while dump was from <datetime>."

These messages can be confusing, as the datetime values returned will generally not be the date of the database or transaction log dump file creation.

The datetime value specified for "current timestamp" reflects the time at which the last dump of the transaction log was made. This value is obtained from the database into which the dump is being loaded.

The datetime value specified for "dump was from" reflects the time from which transactions will be rolled forward by loading the transaction log dump. This value is obtained from information contained in the dump header of the dump file.


MORE INFORMATION

For example, suppose the following sequence of dumps and loads is executed against a database to two dump devices, datadump and logdump, with the physical names of C:\SQL\DATA\DATADUMP.DAT and C:\SQL\DATA\LOGDUMP.DAT:


dump database pubs to datadump          << executed at 4:10pm
go
dump transaction pubs to logdump        << executed at 4:15pm
go
load database pubs from datadump        << executed at 4:20pm
go
load transaction pubs from logdump      << executed at 4:30pm
go 


Timestamp on C:\SQL\DATA\DATADUMP.DAT = 4:10pm
Timestamp on C:\SQL\DATA\LOGDUMP.DAT = 4:15pm 


dump database pubs to datadump          << executed at 5:10pm
go
dump transaction pubs with NO_LOG       << executed at 5:15pm
go
dump transaction pubs to logdump        << executed at 5:20pm
go
load database pubs from datadump        << executed at 5:25pm
go
load transaction pubs from logdump      << executed at 5:35pm
go 

The final load transaction statement will now fail with error 4305:
Specified file 'logdump' is out of sequence. Current time stamp is MM DD YYYY 4:15pm while dump was from MM DD YYYY 5:15pm


Timestamp on C:\SQL\DATA\DATADUMP.DAT = 5:10pm
Timestamp on C:\SQL\DATA\LOGDUMP.DAT = 5:20pm 

In this case, the database is dumped at 4:10pm, followed by a transaction log dump at 4:15pm. These dumps are then reloaded into the database. Thus the database now contains information indicating that the last dump occurred at 4:15pm. If you dump the database again, this new dump will contain the information in the database indicating that the last dump occurred at 4:15pm. We then dump the transaction log with NO_LOG, updating the database in order to specify a new transaction log dump time of 5:15pm. We then dump the transaction log to a file. The transaction log dump file created by this dump will contain the last dump time of 5:15pm in its dump header.

Now when the database dump is loaded, you restore a database containing information indicating that the last dump occurred at 4:15pm. When you now attempt to restore the transaction log dump, the load process compares the value stored in the database with the value contained in the dump header of the dump file. As the dump file contains a value of 5:15pm as the time of the databases last transaction log dump, and this value does not equal the 4:15pm dump time stored in the database, the LOAD TRANSACTION fails with a 4305 error.

Additional query words: backup sql trans


Keywords          : kbother SSrvServer SSrvWinNT 
Version           : 4.2 | 4.2a 4.21
Platform          : OS/2 WINDOWS 
Issue type        : 

Last Reviewed: March 16, 1999