Introduction
We can create a credential both manually and by using SQL commands but before starting we should know what credential is. A credential is a record having the information of authentication which is required to connect to a resource outside the SQL Server, that means it allows users who are connected to Microsoft SQL Server using SQL Authentication to connect to other resources outside the SQL Server or to Windows also.
It requires Windows user name and password.
Step 1 - Open MS SQL Server Management studio.
Step 2 - Expand
Security.
Step 3 - Right click on
Credentials then, click
New Credential.
Step 4 - Fill the name for credential. Fill the name of the windows account that you are using.
Fill in identity box the valid windows user account or you can also browse the verified user account.
Enter the windows user account password & click OK.
We can also createa credential by using SQL Commands:
- USE [master]
- CREATE CREDENTIAL [TstCredential] WITH
- IDENTITY = N'DESKTOP24\anmol',
- SECRET = N'anmol’
Now expand credentials and you can see a new credential created as below: