/*Create the Certificate*/ CREATE CERTIFICATE cert_access_other_db ENCRYPTION BY PASSWORD = 'c3rtPa$$word'WITH subject = 'Access Other DB' GO /* Backup the certificate being sure to use a Private Key*/BACKUP CERTIFICATE cert_access_other_db TO FILE = 'C:\Certificates\cert_access_other_db.cer'WITH PRIVATE KEY (FILE = 'C:\Certificates\cert_access_other_db.pvk' ,ENCRYPTION BY PASSWORD = '3ncRyptKeyPa$$word',DECRYPTION BY PASSWORD = 'c3rtPa$$word');GO/*Create the certificate in the new database from the file*/CREATE CERTIFICATE cert_access_other_db FROM FILE = 'C:\Certificates\cert_access_other_db.cer'WITH PRIVATE KEY (FILE = 'C:\Certificates\cert_access_other_db.pvk',/*The password used to create the private key*/DECRYPTION BY PASSWORD = '3ncRyptKeyPa$$word', ENCRYPTION BY PASSWORD = 'D3cryptKeyPa$$word');GO