EnumLocks 方法 (Int32)
列舉 SQL Server 執行個體上指定之處理序所持有的目前鎖定清單。
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
Public Function EnumLocks ( _
processId As Integer _
) As DataTable
'用途
Dim instance As Server
Dim processId As Integer
Dim returnValue As DataTable
returnValue = instance.EnumLocks(processId)
public DataTable EnumLocks(
int processId
)
public:
DataTable^ EnumLocks(
int processId
)
member EnumLocks :
processId:int -> DataTable
public function EnumLocks(
processId : int
) : DataTable
參數
- processId
型別:System. . :: . .Int32
Int32 值,指定可唯一識別處理序的系統識別碼值。
傳回值
型別:System.Data. . :: . .DataTable
DataTable 系統物件值,包含 SQL Server 執行個體上指定之處理序所持有的目前鎖定清單。下表將描述傳回之 DataTable 的不同資料行。
備註
Use this method to determine the locks that are currently held on the instance of SQL Server. The information that is returned can help you identify locking problems that might affect performance.