Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Managed Instance
Returns a public key of the certificate used for authentication on endpoint of specified type with certificate-based trust configured. Supported types of endpoints are Database Mirroring endpoint (also used for Link feature of Azure SQL Managed Instance) and Service Broker endpoint.
Transact-SQL syntax conventions
sp_get_endpoint_certificate [ @endpoint_type = ] endpoint_type
[ ; ]
Type of endpoint for which certificate's public key is required. @endpoint_type is int, and can be one of these values:
Value | Endpoint |
---|---|
3 |
Service Broker |
4 |
Database Mirroring |
Values correspond to the endpoint payload types in sys.endpoints system catalog view.
If any other integer value is provided, stored procedure returns NULL
.
0
(success) or 1
(failure).
Column name | Data type | Description |
---|---|---|
EndpointCertificatePublicKey |
varbinary | Public key of the certificate, in binary format |
If authentication type configured on the endpoint isn't certificate-based, stored procedure returns error.
User must have VIEW
permission on the endpoint to execute sp_get_endpoint_certificate
.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today