I am using backup and after imaging to save a server db. Now i want to restore this db to my local pc.
prorest db %network_drive%:%backupPath%\db.bk
rfutil %db_destination%\db -C roll forward -ailist %network_drive%:%backupPath%\ai_db.lst
This works fine excepting the sequences of the db, all sequences now starting at one or maybe zero. Searching for a solution is not so easy, becouse of the ai sequences which appear all the time.
When you successfully restore a db the sequences are also restored. They are not separate from the rest of the db.
So if the sequences have not been restored something has failed. The db.lg file should contain messages that point to the failure.
Perhaps the problem is confusion because the term "sequences" can refer to two different things?
DB sequences are part of the database schema and are used by applications to do things like automatically increment a field. These are part of the database and will always be restored with the db. As you (successfully) roll-forward after-image extents any updates to their values will also be applied.
After image sequence numbers are used to organize the archived after image logs. Each AI log file has a sequence number associated with it in order to ensure that they are applied in the correct order. If you are using the AI management daemon that sequence number is part of the file name. It is also discoverable by attempting to roll forward the file; if you pick the wrong one the error message tells you which sequence you tried as well as what the db was expecting you to try. If you are managing the archiving of extents via your own scripting rather than with the AIMD it is a very good idea to add the ai sequence number to the file name.
AI sequence numbers are reset whenever you enable after-imaging. After restoring a db after-imaging is disabled so one of the first things you should do is to re-enable after-imaging. This will cause the ai sequence numbers to start over again on the restored db.