Shares an existing key with another database user. For examples, see Examples.
SHARE KEY "key_name" WITH <database_principal>
[IMPORTANT] Database principals in the SHARE KEY command are currently restricted to logins in the master database.
The name of the key to be shared.
The user or role to receive access to the key.
Any user can share a key, but the user must have ownership of the key. Once shared, the target database principal can use the key to encrypt and decrypt blockchain data and files.
Creating and sharing a key.
The following example creates a new symmetric key named "shipKey", and shares the key with the user product_manager.
"shipKey" WITH product_manager