<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Synonyms on Andy M Mallon - AM²</title><link>https://am2.co/tag/synonyms/</link><description>Recent content in Synonyms on Andy M Mallon - AM²</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 22 May 2014 15:18:00 -0400</lastBuildDate><atom:link href="https://am2.co/tag/synonyms/index.xml" rel="self" type="application/rss+xml"/><item><title>sp_get_basetable_list</title><link>https://am2.co/2014/05/22/sp_get_basetable_list/</link><pubDate>Thu, 22 May 2014 15:18:00 -0400</pubDate><guid>https://am2.co/2014/05/22/sp_get_basetable_list/</guid><description>&lt;p&gt;At work, we make extensive use of views &amp;amp; synonyms. The reasons are complex (and fodder for another post), but here&amp;rsquo;s a simplified example:&lt;/p&gt;&#10;&lt;blockquote&gt;Pricing data is updated multiple times per day, and we want to keep multiple generations of the pricing table online. By pointing the synonym to the latest pricing table, we can redirect users to the current/correct data. If there's a problem, we can "roll back" the latest pricing updates by simply pointing the synonym back to the prior generation of pricing data.&lt;/blockquote&gt;&#10;&lt;p&gt;Obviously, this can create some confusion when you do need to find the actual table (eg, to see indexes, or to update data). What pricing table is the real pricing table?&#10;Sure&amp;ndash; you can query system views to find out the real table(s) referenced by the synonym or view.&#10;When you do this hundreds (or thousands) of times, &lt;a href="http://xkcd.com/1205/"&gt;it can really add up.&lt;/a&gt; Time to automate.&lt;/p&gt;</description></item></channel></rss>