CREATE CREDENTIAL SYNTAX – SQL SERVER

Posted on : 05-07-2011 | By : Devi Prasad | In : Credentials

0



CREATE CREDENTIAL SYNTAX:

Syntax for creating credentials:
[sql]
CREATE CREDENTIAL credentialname WITH IDENTITY = ‘identity_name’
, SECRET = ‘secret’
FOR CRYPTOGRAPHIC PROVIDER cryptographic_provider_name
[/sql]

credentialname – Name of the credential, this is used for refereceing the credential
IDENTITY – This is basically the username
SECRET – Password of the identity/username.
CRYPTOGRAPHIC PROVIDER – Name of Enterprise Key Management Provider.

SECRET and cryptographic_provider_name are optional in the above syntax.

Example:
[sql]
USE [master]
GO
CREATE CREDENTIAL [credential1] WITH IDENTITY = N’username’, SECRET = N’password’
GO
[/sql]

CRYPTOGRAPHIC PROVIDER can be created and used with credentials.

Syntax for creating CRYPTOGRAPHIC PROVIDER:
[sql]
CREATE CRYPTOGRAPHIC PROVIDER provider_name
FROM FILE = ‘path of the dll’
[/sql]

The dll provided above should implement SQL Server Extensible Key Management interface.

CREATING CREDENTIAL USING SQL SERVER MANAGEMENT STUDIO:

  • Open SSMS and connect to the server in object explorer.
  • Expand server and Security
  • In Security Expand
    Create Credential

    Expand Security

  • Right Click on “Credentials” and click on “New Credential…”
    Click on new credential

    Click On New Credential

  • Now a New Credential Window will pop up

    New Credential Window

    New Credential Window

  • Now Enter values for Credential Name, Identity, Password.
    Password and Confirm password must match.
  • Now click on OK.

Thats all.. Now you are done creating a sql server credential.. 🙂




Reference : Devi Prasad (sqlserverlearner.com)

Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.



Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.




Your Ad Here


Tags: , ,