共用方式為


TraceServer.InitializeAsReader 方法

Initializes the server as a trace reader.

命名空間:  Microsoft.SqlServer.Management.Trace
組件:  Microsoft.SqlServer.ConnectionInfoExtended (在 Microsoft.SqlServer.ConnectionInfoExtended.dll 中)

語法

'宣告
Public Sub InitializeAsReader ( _
    serverConnInfo As ConnectionInfoBase, _
    profileFileName As String _
)
'用途
Dim instance As TraceServer 
Dim serverConnInfo As ConnectionInfoBase 
Dim profileFileName As String

instance.InitializeAsReader(serverConnInfo, _
    profileFileName)
public void InitializeAsReader(
    ConnectionInfoBase serverConnInfo,
    string profileFileName
)
public:
void InitializeAsReader(
    ConnectionInfoBase^ serverConnInfo, 
    String^ profileFileName
)
member InitializeAsReader : 
        serverConnInfo:ConnectionInfoBase * 
        profileFileName:string -> unit
public function InitializeAsReader(
    serverConnInfo : ConnectionInfoBase, 
    profileFileName : String
)

參數

  • profileFileName
    型別:System.String
    A String value that specifies the path and the name of the file that contains the SQL Server Profiler trace profile. For information about how to create a trace profile manually using SQL Server Profiler, see SQL Server Profiler Procedures.

範例

Readme_Tracer

請參閱

參考

TraceServer 類別

Microsoft.SqlServer.Management.Trace 命名空間

其他資源

追蹤旗標 (Transact-SQL)

SQL Server Profiler 範本和權限