sys.external_job_streams (Transact-SQL)sys.external_job_streams (Transact-SQL)

針對對應至外部串流作業的輸入或輸出外部串流物件各傳回一個資料列。Returns a row each for the input or output external stream object mapped to an external streaming job.

資料行名稱Column name 資料類型Data type 描述Description
job_idjob_id intint 串流作業物件的物件識別碼。Object identification number for the streaming job object. 此資料行會對應至 sys.external_streaming_jobs 的 object_id 資料行。This column maps to the object_id column of sys.external_streaming_jobs.
stream_idstream_id intint 串流物件的物件識別碼。Object identification number for the stream object. 此資料行會對應至 sys.external_streams 的 object_id 資料行。This column maps to the object_id column of sys.external_streams.
is_inputis_input bitbit 如果使用串流物件作為串流作業的輸入則為 1,否則為 0。1 if the stream object is used an input for the streaming job, otherwise 0.
is_outputis_output bitbit 如果使用串流物件作為串流作業的輸出則為 1,否則為 0。1 if the stream object is used an output for the streaming job, otherwise 0.

範例Example

此目錄檢視會與 sys.external_streamssys.external_streaming_jobs 目錄檢視一起使用。This catalog view is used together with sys.external_streams and sys.external_streaming_jobs catalog views. 範例查詢如下所示A sample query is shown below

Select
    sj.Name as Job_Name,
    sj.Create_date as Job_Create_date,
    sj.modify_date as Job_Modify_date,
    sj.statement as Stream_Job_Query,
    Input_Stream_Name =
        Case js.is_input
            when 1 then s.Name
            else null
        END,
    output_Stream_Name =
        case js.is_output
            when 1 then s.Name
            else null
        END,
    s.location as Stream_Location
from sys.external_job_streams js
inner join sys.external_streams s on s.object_id = js.stream_id
inner join sys.external_streaming_jobs sj on sj.object_id = js.job_id

權限Permissions

目錄檢視內中繼資料的可見性會限制在使用者所擁有的安全性實體,或已授與使用者某些權限的安全性實體。The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. 如需相關資訊,請參閱 Metadata Visibility ConfigurationFor more information, see Metadata Visibility Configuration.

另請參閱See also