IS_OBJECTSIGNED(Transact-SQL)

개체가 지정된 인증서 또는 비대칭 키로 서명되었는지를 나타냅니다.

항목 링크 아이콘Transact-SQL 구문 표기 규칙

구문

IS_OBJECTSIGNED ( 
'OBJECT', @object_id, @class, @thumbprint
    ) 

인수

  • 'OBJECT'
    보안 개체 클래스의 유형입니다.

  • @object\_id
    테스트 중인 개체의 object_id입니다. @object\_id의 형식은 int입니다.

  • @class
    개체의 클래스입니다.

    • '인증서'

    • '비대칭 키'

    @class는 sysname입니다.

  • @thumbprint
    개체의 SHA 지문입니다. @thumbprint의 형식은 varbinary(32)입니다.

반환 형식

int

주의

IS_OBJECTSIGNED는 다음과 같은 값을 반환합니다.

반환 값

설명

0

개체가 서명되지 않았습니다.

1

개체가 서명되었습니다.

NULL

개체가 유효하지 않습니다.

사용 권한

인증서 또는 비대칭 키에 대한 VIEW DEFINITION이 필요합니다.

1. 데이터베이스의 확장 속성 표시

다음 예에서는 master 데이터베이스의 spt_fallback_db 테이블이 스키마 서명 인증서로 서명되었는지를 테스트합니다.

USE master
-- Declare a variable to hold a thumbprint and an object name
DECLARE @thumbprint varbinary(20), @objectname sysname;

-- Populate the thumbprint variable with the thumbprint of 
-- the master database schema signing certificate
SELECT @thumbprint = thumbprint 
FROM sys.certificates 
WHERE name LIKE '%SchemaSigningCertificate%';

-- Populate the object name variable with a table name in master
SELECT @objectname = 'spt_fallback_db';

-- Query to see if the table is signed by the thumbprint
SELECT @objectname AS [object name],
IS_OBJECTSIGNED(
'OBJECT', OBJECT_ID(@objectname), 'certificate', @thumbprint
) AS [Is the object signed?] ;