Problem with simple databases

  • Hi

    I have a database in simple recovery model (sql server enterprise edition 2008).I need its log , but because it's in simple ,i can't do.

    how does Apex sql log do this with simple databases?is it possible to have logs for simple databases with SSMS?

    I read that simple db s ,doesn't keep any logs so we can see that it keeps it some where which Apex can extract it.how can i have logs?

  • All databases have a log, the recovery model tells SQL how to handle the log.

    Simple recovery, the log is marked as re-useable by a checkpoint which occurs at regular intervals

    Bulk-Logged / Full, a transaction log backup marks the log as re-useable

    What Apex is seeing is the live database log.

  • tanks a lot

    i'm so confused

    1:in simple recovery when i shrink log file to zero i cant see the logs in fn_dblog(null, null) but still apex can show the logs,what do you mean by 'What Apex is seeing is the live database log'?

    2:in full recovery,i have a full backup from 09:00 am yesterday,and a log backup from 11:00 pm yesterday,can i restore the data from 8:00 pm yesterday?

    how can i obtain the right LSN?or how to restore to 8:00 pm?

    i read these pages but understanding nothing:ermm:

    http://msdn.microsoft.com/en-us/library/ms191459.aspx

    http://www.sqlservercentral.com/Forum/Topic1104430-391-1.aspx#bm1104439

  • Look at the STOPAT clause of the restore command.

    So restore the full backup with NORECOVERY, then restore the log with STOPAT and RECOVERY

    RESTORE DATABASE ...... FROM DISK = '...............' WITH NORECOVERY

    GO

    RESTORE LOG ........... FROM DISK = '...........' WITH STOPAT '2012-02-12 20:00', RECOVERY

    GO

  • mah_j (9/19/2012)


    2:in full recovery,i have a full backup from 09:00 am yesterday,and a log backup from 11:00 pm yesterday,can i restore the data from 8:00 pm yesterday?

    how can i obtain the right LSN?or how to restore to 8:00 pm?

    i read these pages but understanding nothing:ermm:

    It's normal to be confused. There is so much to know before you get this right!

    This link should help you:

    http://www.mssqltips.com/sqlservertip/1229/sql-server-point-in-time-recovery/

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • great it works ,tanks alot both of you.

    what about apex?is there any table that it reads from that?

    i need to know it shows the log from where?

    i think it is fn_dblog(null, null) .but when i shrink log or bakup full it shows nothing but apex still shows.

    is it msdb.dbo.backupset?

  • mah_j (9/19/2012)


    great it works ,tanks alot both of you.

    what about apex?is there any table that it reads from that?

    i need to know it shows the log from where?

    i think it is fn_dblog(null, null) .but when i shrink log or bakup full it shows nothing but apex still shows.

    is it msdb.dbo.backupset?

    Never used Apex tools I'm afraid so no idea.....Are you using ApexSQL Log?

    I wonder, could it be cached information you're seeing? Maybe re-starting the tool to see if that makes any difference?

    Excuse my ignorance but I've never used this tool before.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

Viewing 7 posts - 1 through 6 (of 6 total)

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