Transaction Log Backup Script issues

  • Declare @FileName varchar(255)

    select @FileName = 'D:\BackupDB\Tlog\DVM_DB_Tlog' + substring(convert(varchar(50),getdate(),120),0,11)+'.TRN'

    BACKUP LOG [DVM] TO DISK = @FileName WITH NOINIT , NOUNLOAD ,

    NAME = N'DVM', NOSKIP , STATS = 10, NOFORMAT , NO_TRUNCATE

    pls give me anybody, i need with time this script

    for example

    DVM_DB_Tlog 2008-09-26 16:50:28.TRN

  • What is the problem you are having with it?

  • TLog Backup has been taken with date, but i need date and time becuse all Tlog overwrite the same file.

    as per script file format is

    D:\BackupDB\Tlog\DVM_DB_Tlog 2008-09-26.TRN

    I want with time as follows

    D:\BackupDB\Tlog\DVM_DB_Tlog 2008-09-26 16:50:28.TRN

  • Try using this in part of your script, I don't think you can have a colon (: ) in the file name, that might be the reason it's not working, this should remove the : from the name:

    LEFT(REPLACE(REPLACE(CONVERT(VARCHAR,GETDATE(), 120), ' ', '_'), ':', ''), 18)

  • That is right file name can't have /\:*?"<>|.

    Rajesh Kasturi

  • Thanks for reply

    i got file format with help of your script,

    DVM_DB_Tlog2008-09-29_173509.TRN

    .. its ok fine,

  • hi,

    could you give me details,

    what is different between incremental backup & differential backup in sql server 2000?

  • As you know we have 3 types of backups available in SQL Server

    Full, Differential and Transactional

    Incremental backup can be Differential or T-Log.

    Rajesh Kasturi

  • ananda.murugesan (9/29/2008)


    what is different between incremental backup & differential backup in sql server 2000?

    SQL SERVER does not have incremental backup.

    But, the Windows OS does have.;)

  • Hi Wildcat,

    Could you please tell me what is meaning of incremental backup weather it is in OS or sql server.

    Rajesh Kasturi

  • Google tells you what you want:

    Types of Backup in Windows:

    http://technet.microsoft.com/en-us/library/cc784306.aspx

    Here is SQL2K BOL: --- (4 types of backup)

    http://technet.microsoft.com/en-us/library/aa174477(SQL.80).aspx

    I skipped SQL2K5 (you can find it by yourself). Please tell me which one is "incremental backup" in SQL2K or SQL2K5.:)

  • Full Backup - Everything is backed up.

    Differential Backup - Everything that has changed since the last Full Backup is backed up.

    Incremental Backup - Everything since the last Incremental Backup is backed up. (This could be analogous to SQL Server Transaction Log backups.)

    Does this help?

    😎

  • Lynn Pettis (9/30/2008)


    Incremental Backup - Everything since the last Incremental Backup is backed up. (This could be analogous to SQL Server Transaction Log backups.)

    Does this help?

    No help.

    Incremental Backup - Everything changed since the last FULL or Incremental Backup is backed up.

    BTW, Oracle has the incremental backup.

Viewing 13 posts - 1 through 12 (of 12 total)

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