Dogodek
31. mar., 23h - 2. apr., 23h
Največji dogodek učenja SQL, Fabric in Power BI. 31. marec - 2. april Če želite shraniti 400 $, uporabite kodo FABINSIDER.
Registrirajte se danesTa brskalnik ni več podprt.
Izvedite nadgradnjo na Microsoft Edge, če želite izkoristiti vse prednosti najnovejših funkcij, varnostnih posodobitev in tehnične podpore.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
SQL database in Microsoft Fabric
Closes a symmetric key, or closes all symmetric keys open in the current session.
Transact-SQL syntax conventions
Opomba
This syntax is not supported by serverless SQL pool in Azure Synapse Analytics.
CLOSE { SYMMETRIC KEY key_name | ALL SYMMETRIC KEYS }
Key_name
Is the name of the symmetric key to be closed.
Open symmetric keys are bound to the session not to the security context. An open key will continue to be available until it is either explicitly closed or the session is terminated. CLOSE ALL SYMMETRIC KEYS will close any database master key that was opened in the current session by using the OPEN MASTER KEY statement. Information about open keys is visible in the sys.openkeys (Transact-SQL) catalog view.
No explicit permission is required to close a symmetric key.
The following example closes the symmetric key ShippingSymKey04
.
CLOSE SYMMETRIC KEY ShippingSymKey04;
GO
The following example closes all symmetric keys that are open in the current session, and also the explicitly opened database master key.
CLOSE ALL SYMMETRIC KEYS;
GO
CREATE SYMMETRIC KEY (Transact-SQL)
ALTER SYMMETRIC KEY (Transact-SQL)
OPEN SYMMETRIC KEY (Transact-SQL)
DROP SYMMETRIC KEY (Transact-SQL)
Dogodek
31. mar., 23h - 2. apr., 23h
Največji dogodek učenja SQL, Fabric in Power BI. 31. marec - 2. april Če želite shraniti 400 $, uporabite kodo FABINSIDER.
Registrirajte se danes