Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Technical Reference
 Key_GUID (Transact-SQL)
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
SQL Server 2008 Books Online (October 2009)
Key_GUID (Transact-SQL)

Returns the GUID of a symmetric key in the database.

Topic link icon Transact-SQL Syntax Conventions

Key_GUID( 'Key_Name' )
' Key_Name '

The name of a symmetric key in the database.

uniqueidentifier

If an identity value was specified when the key was created, its GUID is an MD5 hash of that identity value. If no identity value was specified, the server generated the GUID.

If the key is a temporary key, the key name must start with a number sign (#).

Because temporary keys are only available in the session in which they are created, no permissions are required to access them. To access a key that is not temporary, the caller requires some permission on the key and must not have been denied VIEW permission on the key.

The following example returns the GUID of a symmetric key called ABerglundKey1.

SELECT Key_GUID('ABerglundKey1')
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker