April 20, 2010 at 5:56 am
Hi,
In our production system TRN file names are being created as "dbname_yyyymmddhh24miss.trn".
files names used be created with 2 hour earlier names and now after Daylight saving time change our TRN files happen to be 4 hours
back of the current time. this sometimes confuses us about which file has been coppied or restored to Standby databases.
Is there any way to overcome this situation.
thanks.
sample file name
dbname_20100420115115.trn
current datetime 201004201453
Regards,
MShenel
April 20, 2010 at 7:21 am
Couple of questions as it sounds like you are running log shipping. How did you setup log shipping and what is your time zone?
April 20, 2010 at 7:31 am
Time Zone is GMT+2 and LogShipping has been configured via SSMS with default next-next setup.
Regards,
MShenel
April 20, 2010 at 7:52 am
shen-dest (4/20/2010)
Time Zone is GMT+2 and LogShipping has been configured via SSMS with default next-next setup.
Thank you.
Based on this:
dbname_20100420115115.trn
current datetime 201004201453
The time difference is 3 hours, not 4 hours. This fits nicely into what is happening. The datetime stamp you are seeing is UTC, prior to daylight savings time, it was two hours behind, and since the start of daylight savings time it is now 3 hours behind.
I don't know if there is a way to change this.
April 20, 2010 at 8:04 am
thanks,
You are right time difference is 3 hours. I have configured LS for a new db, no change it still uses UTC time as you said.
Can UTC be changed somewhere? or is it only available while installing SQL Server?
Regards,
MShenel
April 20, 2010 at 8:22 am
Not that I am aware. I am not familiar with log shipping as I have not worked in an environment where it is used at this time.
April 20, 2010 at 8:29 am
I see ,thank you. I will try to figure it out.
Regards,
MShenel
April 20, 2010 at 9:09 am
If you're using a monitor server, the "Transaction Log Shipping Status" report (available in SSMS, right-click the server, select reports | Standard Reports | Transaction Log Shipping Status), and you can see the last file(s) backed up, copied, and restored. Will this handle your need to determine which files have been copied/restored to the standby database?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 20, 2010 at 9:24 am
In terms of confusion, is this just because of restores? Or is there something else?
You ought to be copying all these to another location. You can use the RESTORE HEADERONLY to check LSNs and build a chain of sorts. A script to do that ought to be fairly easy to write, load the LSNs into a table, find gaps.
April 21, 2010 at 12:36 am
We have 3 Standby databases,2 of them are for disaster recovery one in same location and one at remote.
the other one is used for reporting. For the reporting database sometimes we have to do manuel operations like renaming trn files to stop recovering, and open DB in read only mode.Finding the right file sometimes takes time.
For monitoring we have in-house scripts mailing us about the status of LS with the below information.
Status Primary Server-Secondary ServerTime Since Last Backup Time Since Last Copy Time Since Last Restore
thank you all
Regards,
MShenel
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply