clean up CREATE ASYMMETRIC KEY#2200
Merged
Jak-MS merged 1 commit intoMicrosoftDocs:livefrom May 28, 2019
Merged
Conversation
1. **Syntax** section:
1. Lowercased user-supplied values to be consistent with other documentation pages
2. **Arguments** section:
1. Added missing entry for _asym_key_name_
2. Moved `AUTHORIZATION` to the top to match order in **Syntax** section
3. Improved definition of `FILE` option
4. Improved definition of `EXECUTABLE FILE` option
5. Improved definition of `ASSEMBLY` option
6. Added missing entry for `PROVIDER`
7. Removed `ENCRYPTION BY *\<key_name_in_provider>*` as it is not a valid as stated (is part of `ENCRYPTION BY PASSWORD` -- see below)
8. Moved `ALGORITHM` up to match order of options shown in **Syntax** section
9. Changed `PASSWORD` to be `ENCRYPTION BY PASSWORD`
10. Lowercased user-supplied values to be consistent with other documentation pages
3. **Remarks** section:
1. Added "or DLL file" to end of 1st paragraph, regarding the `FROM` clause (yes, DLL from either file system or as a loaded assembly -- same thing just different location -- only stores the public key)
2. Removed 3rd sentence of 2nd paragraph -- "If a database master key does exist, the password is optional." -- as it contradicted the 2nd sentence, and was just incorrect. With no DMK, the following statement:
```sql
CREATE ASYMMETRIC KEY [AKeyNoPassword]
WITH ALGORITHM = RSA_2048;
```
gets the following error:
> /*
> Msg 15581, Level 16, State 6, Line XXXXX
> Please create a master key in the database or open the master key in the session before performing this operation.
> */
4. **Examples** section:
1. In example "B", for correctness changed
> and then authorizes user `Christina` to use the asymmetric key
to be:
> and assigns ownership of the asymmetric key to user `Christina`
2. In example "B", for variety removed `ENCRYPTION BY PASSWORD` clause as that is shown in example "A". Without this clause, the Database Master Key will be used, hence it must already exist. I added a sentence mentioning this to the end of the example description.
3. In example "C", for correctness changed
> stored in a file. It then encrypts it using an Extensible
to be:
> stored in an Extensible
4. In example "C", fixed name "EKMProvider1" to be "EKM_Provider1" (to match T-SQL statement) in example description
5. In example "C", not sure if lack of `ENCRYPTION BY PASSWORD` implies Database Master Key is used, or if that is a non-issue when using an EKM provider. I have never used an EKM provider so for now I am leaving that part as is (i.e. not mentioned in the example description).
5. **See Also** section:
1. Moved "Choose an Encryption Algorithm" to below statements and functions for better organization
2. Added links to functions: `ASYMKEYPROPERTY` and `ASYMKEY_ID`
Contributor
Member
|
@srutzky - The changes look great! Thank you so much for your efforts. We really appreciate it. Reviewed. #sign-off |
Contributor
|
manually added the 'ready-to-merge' label... @VanMSFT - can you check that the relative links are working after this is live? I've reviewed them and they appear to be good, but I can't be sure without staging tools, so they should be double-checked after the changes have been published. Thanks. |
Member
|
Verified links worked. Thanks all! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes pertain to Issue #2198 .
Syntax section:
Arguments section:
AUTHORIZATIONto the top to match order in Syntax sectionFILEoptionEXECUTABLE FILEoptionASSEMBLYoptionPROVIDERENCRYPTION BY *\<key_name_in_provider>*as it is not a valid as stated (is part ofENCRYPTION BY PASSWORD-- see below)ALGORITHMup to match order of options shown in Syntax sectionPASSWORDto beENCRYPTION BY PASSWORDRemarks section:
Added "or DLL file" to end of 1st paragraph, regarding the
FROMclause (yes, DLL from either file system or as a loaded assembly -- same thing just different location -- only stores the public key)Removed 3rd sentence of 2nd paragraph -- "If a database master key does exist, the password is optional." -- as it contradicted the 2nd sentence, and was just incorrect. With no DMK, the following statement:
CREATE ASYMMETRIC KEY [AKeyNoPassword] WITH ALGORITHM = RSA_2048;gets the following error:
Examples section:
In example "B", for correctness changed
to be:
In example "B", for variety removed
ENCRYPTION BY PASSWORDclause as that is shown in example "A". Without this clause, the Database Master Key will be used, hence it must already exist. I added a sentence mentioning this to the end of the example description.In example "C", for correctness changed
to be:
In example "C", fixed name "EKMProvider1" to be "EKM_Provider1" (to match T-SQL statement) in example description
In example "C", not sure if lack of
ENCRYPTION BY PASSWORDimplies Database Master Key is used, or if that is a non-issue when using an EKM provider. I have never used an EKM provider so for now I am leaving that part as is (i.e. not mentioned in the example description).See Also section:
ASYMKEYPROPERTYandASYMKEY_ID