Server.KillProcess 메서드

Stops the specified process.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

구문

‘선언
Public Sub KillProcess ( _
    processId As Integer _
)
‘사용 방법
Dim instance As Server 
Dim processId As Integer

instance.KillProcess(processId)
public void KillProcess(
    int processId
)
public:
void KillProcess(
    int processId
)
member KillProcess : 
        processId:int -> unit
public function KillProcess(
    processId : int
)

매개 변수

  • processId
    유형: System.Int32
    An Int32 that specifies the system ID value that uniquely identifies the process.

Visual Basic

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Stop all processes running on the AdventureWorks2012 database.
srv.KillAllProcesses("AdventureWorks2012")
'Stop the AventureWorks database.
srv.KillDatabase("AdventureWorks2012")
'Stop the specified process with ID 52.
srv.KillProcess(52)

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$srv.KillAllProcesses("AdventureWorks2012")
$srv.KillDatabase("AdventureWorks2012")
$srv.KillProcess(52)

참고 항목

참조

Server 클래스

Microsoft.SqlServer.Management.Smo 네임스페이스

관련 자료

메서드 호출

서버 관리

KILL(Transact-SQL)