December 3, 2015 at 1:43 am
I am currently work with SQL 2008, I want search my transaction log which never truncate before and around sized 1XXGB,
When I doing search, it only show current date records, if I specify yesterday (for example) it return nothing
My Code:
===============
SELECT Operation,[Transaction ID], [Begin Time], [Transaction Name], [Transaction SID]
FROM fn_dblog(NULL, NULL) WHERE [Transaction ID] = ‘0000:00000752’
AND [Operation] = ‘LOP_BEGIN_XACT’ And [Begin Time] = cast(2015-12-02 as date)
===========================Return Nothing, If change today, it return records,
I don't know why, and hope all you can help me
Best Regards and Thanks
Calvin
December 3, 2015 at 2:25 am
Why do you say it's never truncated? What recovery model, what backups are scheduled?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 3, 2015 at 3:14 am
The predicate
[Begin Time] = cast('2015-12-02' as date)
requires transactions to start exactly at 2015-12-02 00:00:00.000 .
Is it what you mean really?
December 3, 2015 at 5:58 pm
Even I try use select * from fn_dblog(null,null)
it only return recent (today's records)
Any solution ?
Thanks
December 3, 2015 at 10:23 pm
calvin_wk_wong (12/3/2015)
Even I try use select * from fn_dblog(null,null)it only return recent (today's records)
Any solution ?
Thanks
If you're backing up the transaction log like you should be, why would you expect to see yesterday's rows in it?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 4, 2015 at 1:49 am
GilaMonster (12/3/2015)
Why do you say it's never truncated? What recovery model, what backups are scheduled?
???
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply