Creating a synonym for a MYSQL-linked server within SQL Server 2008 and above

In a current project it was a requirement to setup synonyms for tables that reside in a MySQL database. This MySQL database was added as “linked server” into SQL Server (via ODBC). If you do this for other SQL Server objects the syntax is like so CREATE SYNONYM app.EX_tbl_foobar FOR [LinkedServerName].[dbname].[schema].[tbl_foobar];CREATE SYNONYM app.EX_tbl_foobar FOR [LinkedServerName].[dbname].[schema].[tbl_foobar]; […]

SQL Server FILESTREAM and master key

When dealing with RBS and SharePoint all guides provide the statement: USE [WSS_Content] IF NOT EXISTS (SELECT * FROM sys.symmetric_keys WHERE name = N’##MS_DatabaseMasterKey##’) CREATE master KEY encryption BY password = N’Admin Key Password !2#4’use [WSS_Content] if not exists (select * from sys.symmetric_keys where name = N’##MS_DatabaseMasterKey##’) create master key encryption by password = N’Admin […]