Trn Log Shipping Timestamp/Format

  • Hello Experts

    I am shipping the Trn.Log to the Standby and is getting shipped properly. But for some reasons unknown to me, the file gets created with the timestamp 9 hrs ahead of my time. (eg) a file created at 12:45 in the afternoon gets created as DB_YYYYMMDD214516.trn; I am not sure from where it arrives at the 9 hour difference and also how to reset the same. The the Trn. Log gets applied properly.

    Any help would be appreciated.

    Thanks

  • I haven't seen this before.

    I suggest that you start up profiler and run a trace. Select Events (Stored Procedures and TSQL) ..I've done the same thing on my server. (sql 2k)

    For ease of locating the code, start the trace when you are the only one on the server-or 1 of a few. Then run the job that backs up the transaction log. Immediately stop the trace.

    Look through the trace (or Edit Find/BACKUP LOG) and find the code that is creating the transaction log file name. See where SQL Server is generating the date portion of the name.

    You are looking for something similar to this is the TextData column.

    BACKUP LOG [MIT] TO DISK = N'D:\MSSQL7\BACKUP\MIT_tlog_200710301710.TRN' WITH INIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT

    I created my test using the built-in maintenance plan and the ApplicationName in the Trace says: SQLDMO_1. My filename & time are correct. I have to assume you have used the maintenance plan since you are getting the date/time stamp included and didn't mention custom code to build the timestamp.

    Check this out and see if your results match what I see. If you see the same thing, using DMO but the file date and the OS date don't match - mine do, my WAG would be to check the versions of software/patches of SQL DMO installed. Was your installation part of an upgrade or a fresh server/fresh install? Sometimes an upgrade doesn't work as well as we'd like.

    If it looks like a problem with SQL DMO, then maybe it would help to make sure you have the correct DLL's for the correct DMO version loaded. Here is SQL DMO information.

    http://msdn.microsoft.com/msdnmag/issues/01/05/sqldmo/

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply