I nedd code to purge or clear sql server logs (current) not database logs

  • I nedd code to purge or clear sql server logs (current) not database logs

  • sp_cycle_errorlog

    😎

  • Deg-235673 (7/24/2016)


    I nedd code to purge or clear sql server logs (current) not database logs

    "Current" log? What mistake are you trying to cover up?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (7/24/2016)


    Deg-235673 (7/24/2016)


    I nedd code to purge or clear sql server logs (current) not database logs

    "Current" log? What mistake are you trying to cover up?

    He he, was thinking the same:-P

    😎

  • it is not a mistake just put some operation as private for DBA to avoid speculation by the operator! thanks

  • So, it WAS a "hide". 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • the windows application log will likely hold detail too, do you intend to trim that as well?

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • declare @CoverUp varchar(16)

    select @CoverUp = ['True'|'False'] --> make your choice

    if CoverUp = 'True'

    begin

    exec sp_update_resume @parm_make_backup_copy='Yes'

    exec sp_send_resume @parm_email_address='some.headhunter@any_corp.com'

    exec sp_pack_up_yourdesk @parm_priority='Immediately'

    end

    --> exit the building

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Rudyx - the Doctor (7/26/2016)


    declare @CoverUp varchar(16)

    select @CoverUp = ['True'|'False'] --> make your choice

    if CoverUp = 'True'

    begin

    exec sp_update_resume @parm_make_backup_copy='Yes'

    exec sp_send_resume @parm_email_address='some.headhunter@any_corp.com'

    exec sp_pack_up_yourdesk @parm_priority='Immediately'

    end

    --> exit the building

    That would be a t-sql for URAR (update resume and relocate)

    😎

  • I am sharing online Database Design and Implementation[/url] 2016.

  • You can probably edit the log files directly using Notepad.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • I am sharing online Database Design and Implementation[/url]. You only need copy and paste

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

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