Killing users

  • Is there a way to kill certain users after hours for an application before doing backup ? Since when application is running, backup software refuses to continue. Any ideas !?

  • francis (9/19/2008)


    Is there a way to kill certain users after hours for an application before doing backup ? Since when application is running, backup software refuses to continue. Any ideas !?

    I find that cyanide works pretty well, however it is best to exercise some restraint as a DBA needs a certain number of users to justify their continued employment.

    😀

    Seriously though, try this:

    ALTER Database MyDB set single_user with rollback immediate

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • 😉 I do mean to kill them cause I am not be able to complete the daily backup !

    😛 Thanks for the formula, how could I apply the cyanide process, in the coffee or distilled water ??

    How could I catch the session/application !? Any SQL system variables to be used ?

    Thanks any way for putting me in the 'Hall of Frame" !!!!

  • francis (9/20/2008)


    😉 I do mean to kill them cause I am not be able to complete the daily backup !

    😛 Thanks for the formula, how could I apply the cyanide process, in the coffee or distilled water ??

    Well, if it's after-hours, then alcohol is the way to go.

    😛

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • rbarryyoung (9/19/2008)


    Seriously though, try this:

    ALTER Database MyDB set single_user with rollback immediate

    I knew this was going to be a fun one when I saw the title. And, heh, I'm still laughing... even the code snippet above has a bit of humor to it if you think about it... HAAA!!! It should be a bloody Question of the Day!!

    "Using T-SQL, how do you say EVERYBODY OUT OF THE POOL!!!"? :):D:P:hehe:

    --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)
    Intro to Tally Tables and Functions

  • Heh. Yeah, I should mention that any Junior DBA's reading this probably want to check with their boss before they use this command. It is not gentle with the users or the application.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

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

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