{"id":402,"date":"2017-05-02T12:58:07","date_gmt":"2017-05-02T18:58:07","guid":{"rendered":"http:\/\/s1095387061.online-home.ca\/?p=402"},"modified":"2017-11-12T13:01:01","modified_gmt":"2017-11-12T20:01:01","slug":"mssql-tips-template-to-create-sql-server-synonyms-with-checks","status":"publish","type":"post","link":"https:\/\/databaserefresh.com\/blog\/mssql-tips-template-to-create-sql-server-synonyms-with-checks\/","title":{"rendered":"MSSQL Tips: Tip #37 &#8211; Template to Create SQL Server Synonyms with checks"},"content":{"rendered":"<p>When a SQL Server <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/ms187552.aspx\" target=\"_blank\" rel=\"noopener\">synonym<\/a> is created with T-SQL the base object&#8217;s existence is checked only at run time. SQL Server Management Studio (SSMS) has some built-in checks that are performed during synonym creation whereas T-SQL scripts can be written several different ways and do not have any checks by default. In this tip I explain what is the best way to create synonyms and why.<\/p>\n<p>Please read the latest MSSQL Tip: &#8220;<a href=\"https:\/\/www.mssqltips.com\/sqlservertip\/4849\/template-to-create-sql-server-synonyms-with-checks\/\">Template to Create SQL Server Synonyms with checks<\/a>&#8220;.<\/p>\n<p>Check out all of my tips here: <a title=\"http:\/\/www.mssqltips.com\/sqlserverauthor\/94\/svetlana-golovko\/\" href=\"http:\/\/www.mssqltips.com\/sqlserverauthor\/94\/svetlana-golovko\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.mssqltips.com\/sqlserverauthor\/94\/svetlana-golovko\/<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a SQL Server synonym is created with T-SQL the base object&#8217;s existence is checked only at run time. SQL Server Management Studio (SSMS) has some built-in checks that are performed during synonym creation whereas T-SQL scripts can be written &hellip; <a href=\"https:\/\/databaserefresh.com\/blog\/mssql-tips-template-to-create-sql-server-synonyms-with-checks\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[5,41,3,30],"tags":[156,51,42,16,158,155,152,157,29,151],"class_list":["post-402","post","type-post","status-publish","format-standard","hentry","category-db_dev","category-scripts","category-sql_server","category-tips-sql_server","tag-checks","tag-development","tag-mssqltips","tag-sql-server","tag-ssms","tag-synonyms","tag-t-sql","tag-template","tag-tips","tag-tsql"],"_links":{"self":[{"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/posts\/402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/comments?post=402"}],"version-history":[{"count":1,"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/posts\/402\/revisions"}],"predecessor-version":[{"id":404,"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/posts\/402\/revisions\/404"}],"wp:attachment":[{"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/media?parent=402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/categories?post=402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/databaserefresh.com\/blog\/wp-json\/wp\/v2\/tags?post=402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}