Kill all connections to a specific database

  • Hi All,

    I am wondering if there is a way to kill automatically all connection to a specific database?

    Thanks,

  • depends to what end, but I tend to use

    ALTER DATABASE databasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

    this leaves only the current session (the one you run this command in) open

  • Oh I forgot to add that this is for an Analysis Services database.

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

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