Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Monday, January 19, 2009

terminate sessions of SQL

to terminate sessions of SQL Server with confirming

PS> get-process -name sql* | stop-process -passthru

Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
52 2 900 3020 47 0.05 1564 sqlmangr

Warning!
Are you sure you want to perform this action?
Performing operation 'Stop-Process' on Target 'sqlservr(1072)'
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):l <--- stands for 'No to All'