Posts

Showing posts from October, 2018

SQL Server Encryption Example

USE master; GO SELECT * FROM sys.symmetric_keys WHERE name = '##MS_ServiceMasterKey##'; GO -- Create database Key USE VAS_SeedScriptTest; GO CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Password123'; GO -- Create self signed certificate USE VAS_SeedScriptTest; GO CREATE CERTIFICATE Certificate1 WITH SUBJECT = 'Protect Data'; GO -- Create symmetric Key USE VAS_SeedScriptTest; GO CREATE SYMMETRIC KEY SymmetricKey1  WITH ALGORITHM = AES_128  ENCRYPTION BY CERTIFICATE Certificate1; GO USE VAS_SeedScriptTest; GO ALTER TABLE CompsType ADD CompsTypeNameEncrypted varbinary(MAX) NULL GO -- Populating encrypted data into new column USE VAS_SeedScriptTest; GO -- Opens the symmetric key for use OPEN SYMMETRIC KEY SymmetricKey1 DECRYPTION BY CERTIFICATE Certificate1; GO UPDATE CompsType SET CompsTypeNameEncrypted = EncryptByKey (Key_GUID('SymmetricKey1'),CompsTypeName) FROM dbo.CompsType; GO -- Closes the symmetric...

How to Create and Configure a linked Server on SQL SERVER

Detailed article on how to create and configure a linked server in sql server https://www.sqlshack.com/how-to-create-and-configure-a-linked-server-in-sql-server-management-studio/