adplus-dvertising
frame-decoration

Question

Which of the following is valid code to backup a certificate?

a.

USE Master
GO
BACKUP CERTIFICATE MySQLCert
TO FILE = 'C:\temp\MySQLCert'
WITH PRIVATE KEY (file='C:\temp\MySQLCertKey',
ENCRYPTION BY PASSWORD='MyStrongPassword2')

b.

USE Master
GO
BACK CERTIFICATE MySQLCert
TO FILE = 'C:\temp\MySQLCert'
WITH PRIVATE KEY (file='C:\temp\MySQLCertKey',
ENCRYPTION BY PASSWORD='MyStrongPassword2')

c.

USE Master
GO
BACKUP CERTIFICATE MySQLCert
TO FILE = 'C:\temp\MySQLCert'
WITH PUBLIC KEY (file='C:\temp\MySQLCertKey',
ENCRYPTION BY PASSWORD='MyStrongPassword2')

d.

USE Master
GO
BACKUP CERTIFICATE MySQLCert
TO SUBJECT = 'C:\temp\MySQLCert'
WITH PRIVATE KEY (file='C:\temp\MySQLCertKey',
ENCRYPTION BY PASSWORD='MyStrongPassword2')

Posted under SQL Server

Answer: (a).USE Master
GO
BACKUP CERTIFICATE MySQLCert
TO FILE = 'C:\temp\MySQLCert'
WITH PRIVATE KEY (file='C:\temp\MySQLCertKey',
ENCRYPTION BY PASSWORD='MyStrongPassword2')

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following is valid code to backup a certificate?