What is the correct syntax to CREATE CERTIFICATE from pfx?
The syntax is correct, your SQL Server version "is wrong".
Haven't you read
WITH FORMAT = 'PFX' Applies to: SQL Server 2022 (16.x) and later
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I'm trying to use the CREATE CERTIFICATE command in SQL SERVER 2019 but I get the error: Incorrect syntax near '='.
Using the example: E. Creating a certificate from a PFX file
CREATE CERTIFICATE Shipping04
FROM FILE = 'c:\storedcerts\shipping04cert.pfx'
WITH
FORMAT = 'PFX',
PRIVATE KEY (
DECRYPTION BY PASSWORD = '9n34khUbhk$w4ecJH5gh'
);
Documented here: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-certificate-transact-sql?view=sql-server-ver15
What is the correct syntax to CREATE CERTIFICATE from pfx?
Thanks,
Adrian
What is the correct syntax to CREATE CERTIFICATE from pfx?
The syntax is correct, your SQL Server version "is wrong".
Haven't you read
WITH FORMAT = 'PFX' Applies to: SQL Server 2022 (16.x) and later