stopat question

rdaltonrdalton Posts: 36
edited June 5, 2006 11:30AM in SQL Backup Previous Versions
I'm doing a point in time restore using version 4.1. I'm using the command line. I have the stopat = 12:05pm but there are records in the database with a timestamp of 12:14pm. How is this possible?

Comments

  • peteypetey Posts: 2,358 New member
    Could you pls check the script on the Restore Wizard, to see if it includes the STOPAT option, and if the datetime format is something that SQL Server would recognise?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Here is the full script I am running:


    master..sqlbackup 'sql "restore database [hchb_hha_20060529rd] from disk =
    ''\\lounas01\sqlbackups\hchb_hha\HCHB_HHA_PSQL0305_(local)_FULL_20060527_00.sqb'' with NOrecovery,
    move ''HCHB_TSCH_Data'' to ''G:\Program Files\Microsoft SQL Server\MSSQL\Data\hchb_hha20060529rd2.mdf'',
    move ''HCHB_TSCH_log'' to ''h:\Program Files\Microsoft SQL Server\MSSQL\Data\hchb_hha20060529rdlog2.ldf''"'



    master..sqlbackup 'sql "restore database hchb_hha_20060529rd from disk =
    ''\\lounas01\sqlbackups\hchb_hha\HCHB_HHA_PSQL0305_(local)_DIFF_20060529_00.sqb'' with norecovery "'



    master..sqlbackup 'sql "restore log hchb_hha_20060529rd from disk =
    ''\\lounas01\sqlbackups\hchb_hha\HCHB_HHA_PSQL0305_(local)_LOG_20060529_03.sqb'' with norecovery"'


    master..sqlbackup 'sql "restore log hchb_hha_20060529rd from disk =
    ''\\lounas01\sqlbackups\hchb_hha\HCHB_HHA_PSQL0305_(local)_LOG_20060529_05.sqb'' with norecovery"'


    master..sqlbackup 'sql "restore log hchb_hha_20060529rd from disk =
    ''\\lounas01\sqlbackups\hchb_hha\HCHB_HHA_PSQL0305_(local)_LOG_20060529_07.sqb'' with norecovery"'


    master..sqlbackup 'sql "restore log hchb_hha_20060529rd from disk =
    ''\\lounas01\sqlbackups\hchb_hha\HCHB_HHA_PSQL0305_(local)_LOG_20060529_09.sqb'' with norecovery"'


    master..sqlbackup 'sql "restore log hchb_hha_20060529rd from disk =
    ''\\lounas01\sqlbackups\hchb_hha\HCHB_HHA_PSQL0305_(local)_LOG_20060529_11.sqb'' with norecovery"'



    master..sqlbackup 'sql "restore log hchb_hha_20060529rd from disk =
    ''\\lounas01\sqlbackups\hchb_hha\HCHB_HHA_PSQL0305_(local)_LOG_20060529_13.sqb '' with recovery,
    stopat = ''May 29 2006 12:05PM'' "'
  • peteypetey Posts: 2,358 New member
    I see nothing wrong with your script.

    Could you pls try converting the last log file to the native backup format, then try restoring with the same STOPAT value? Do you get the expected results there?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.