2009. 7. 10. 16:35

복제::article 상세 속성 정보

복제를 구성한 후 article 속성을 셋팅해서 게시 한 경우 추후 Aritical 속성을 확인할때 UI를 통한 확인도 가능하지만 부하가 있는 서버의 복제를 확인할때 UI가 응답 없음으로 될 경우가 있다.

 

sysarticles 테이블의 schema_option 값에 바이너리 값으로 속성값이 저장되며, 도움말 확인하여 연산해서 속성 확인 가능하다.

 

http://msdn.microsoft.com/ko-kr/library/ms173857.aspx

 

(트랜잭션 복제 기준)

select pub.name,art.pubid,art.artid --, art.objid
    ,art.dest_table
    ,case art.pre_creation_cmd when 0 then '없음' when 1 then 'DROP' when 2 then 'DELETE' when 3 then 'TRUNCATE' end as pre_creation_cmd
    ,case when (art.schema_option & 4) > 0 then 'TRUE' ELSE 'FALE' end as 'identity_ID열'
    ,case when (art.schema_option & 16) > 0 then 'TRUE' ELSE 'FALE' end as 'clustered'
    ,case when (art.schema_option & 32) > 0 then 'TRUE' ELSE 'FALE' end as 'UDT'
    ,case when (art.schema_option & 64) > 0 then 'TRUE' ELSE 'FALE' end as 'nonclustered'
    ,case when (art.schema_option & 128) > 0 then 'TRUE' ELSE 'FALE' end as 'PK'
    ,case when (art.schema_option & 256) > 0 then 'TRUE' ELSE 'FALE' end as 'triggers'
    ,case when (art.schema_option & 512) > 0 then 'TRUE' ELSE 'FALE' end as 'FK'
    ,case when (art.schema_option & 1024) > 0 then 'TRUE' ELSE 'FALE' end as 'check'
    ,case when (art.schema_option & 2048) > 0 then 'TRUE' ELSE 'FALE' end as 'default'
    ,case when (art.schema_option & 16384) > 0 then 'TRUE' ELSE 'FALE' end as 'unique_const'
    ,case when (art.schema_option & 134217728) > 0 then 'TRUE' ELSE 'FALE' end as 'ddl'
    ,case when (art.schema_option & 262144) > 0 then 'TRUE' ELSE 'FALE' end as 'filegroup'
    ,case when (art.schema_option & 524288) > 0 then 'TRUE' ELSE 'FALE' end as 'partition'
    ,case when (art.schema_option & 1048576) > 0 then 'TRUE' ELSE 'FALE' end as 'partition_index'
    ,case when (art.schema_option & 1073741824) > 0 then 'TRUE' ELSE 'FALE' end as 'permissions'
from sysarticles as  art
    inner join syspublications as pub  on art.pubid = pub.pubid
order by pub.pubid