backup

  • m running this code for backing up and to have backup log

    backup database adventureworks

    to disk = 'g:radvent6.bak'

    mirror to disk='g:radvent7.bak'

    with format,checksum,stop_on_error

    use adventureworks

    insert into HumanResources.department

    (name,groupname)values('dreee','reserch')

    backup log adventureworks

    to disk='g:radvent6.trn'

    after the backup log command executes shows the error as

    The statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.

    Msg 3013, Level 16, State 1, Line 1

    BACKUP LOG is terminating abnormally.

    what should i do how could i correct it .pls suggest.

  • As the error clearly states, backup log is not allowed when the database is in simple recovery (which AdventureWorks is). If you want to plan with log backups, switch it to full recovery (alter database), take a full database backup and then you'll be able to make log backups.

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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