<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Rob Paller &#187; Databases</title>
	<atom:link href="http://robpaller.com/archive/category/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://robpaller.com</link>
	<description>Databases, Data, and Geek Tendencies</description>
	<lastBuildDate>Mon, 04 Jul 2011 21:03:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
		<item>
		<title>A Data Quality Riot Act</title>
		<link>http://robpaller.com/archive/2010/01/a-data-quality-riot-act/</link>
		<comments>http://robpaller.com/archive/2010/01/a-data-quality-riot-act/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:45:00 +0000</pubDate>
		<dc:creator>Rob Paller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Data Quality]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[data warehousing]]></category>

		<guid isPermaLink="false">http://robpaller.com/?p=217</guid>
		<description><![CDATA[As the son of a former Marine Chief Warrant Officer (CW2) I have not only seen the occasional riot act being doled out to my brother; I have been on the receiving end of a few myself.  I have discovered &#8230; <a href="http://robpaller.com/archive/2010/01/a-data-quality-riot-act/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Frobpaller.com%252Farchive%252F2010%252F01%252Fa-data-quality-riot-act%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fdk7u95%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22A%20Data%20Quality%20Riot%20Act%22%20%7D);"></div>
<p><a href="http://robpaller.com/wp-content/uploads/2010/01/ermey.jpg"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft size-full wp-image-220" title="R. Lee Ermey - Drill Sergeant" src="http://robpaller.com/wp-content/uploads/2010/01/ermey.jpg" alt="" width="128" height="209" /></a>As the son of a former Marine Chief Warrant Officer (CW2) I have not only seen the occasional riot act being doled out to my brother; I have been on the receiving end of a few myself.  I have discovered that in order for your data quality initiatives to be successful you need someone who is willing to play the role of drill sergeant on occasion. There are going to be occasions where someone needs to take control when a business process or system provides the latitude to introduce bad data into the environment. This person is going to need to motivated and passionate about rooting out bad data and the processes that allow it to be introduced.</p>
<p>Recently I received an email from a business analyst inquiring about a discrepancy in the between the operational system and the analytical application that his team had recently distributed across the enterprise. The discrepancy was that a name change in the operational system was not being reflected in the analytical application. At the surface, this seemed fairly benign. We took a look at the table responsible for this particular entity the table below depicts what was discovered.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="106" valign="top"><strong>Id</strong></td>
<td width="106" valign="top"><strong>First Name</strong></td>
<td width="106" valign="top"><strong>Last Name</strong></td>
<td width="106" valign="top"><strong>Employee Id</strong></td>
<td width="106" valign="top"><strong>User Id</strong></td>
</tr>
<tr>
<td width="106" valign="top">10087632</td>
<td width="106" valign="top">Olivia</td>
<td width="106" valign="top">Johnson</td>
<td width="106" valign="top">257303</td>
<td width="106" valign="top">johnsono</td>
</tr>
<tr>
<td width="106" valign="top">10108465</td>
<td width="106" valign="top">Olivia</td>
<td width="106" valign="top">Matthews</td>
<td width="106" valign="top">0257303</td>
<td width="106" valign="top">matthews</td>
</tr>
</tbody>
</table>
<p>Since this table behaves as a Type 4 slowly changing dimension, an update of the last name and user id would have simply move the original record to an audit table and introduced a new record with the correct last name. Instead, a new record was created not only introducing a new surrogate key for the same person but the unique constraint on the employee id was bypassed by inserting a leading zero into the field.  This had to have been done by a user who was not properly trained on handling employee name changes in the operational system. A well written email can prevent this from happening again. The user could even be instructed to go back in to the system, delete the new record, and update the existing record properly. But that was not the case.</p>
<p>The users responsible for managing user accounts in the operational system have been instructed to create a new user account when someone submits a name change. These instructions also explicitly state to insert a leading zero for the employee id to bypass the uniqueness constraint placed on the field. What happens when an employee gets married then divorced and no longer wishes to retain her now ex-husband&#8217;s last name or marries again? Will they add a second leading zero to the employee id?</p>
<p>It was upon hearing the details of the business process that I could feel the increase in my blood pressure. This operational system has been live enterprise wide for less than six months and the business processes that support it are already showing signs of failure. History did not provide the learning experience that you would have hoped; it will take someone to put on their drill instructor uniform and break the privates in their platoon of their bad habits. Only then can they be built back up with understanding that they are to protect the enterprises data like it was their homeland.</p>

]]></content:encoded>
			<wfw:commentRss>http://robpaller.com/archive/2010/01/a-data-quality-riot-act/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Teradata Database Object Summary</title>
		<link>http://robpaller.com/archive/2009/12/teradata-database-object-summary/</link>
		<comments>http://robpaller.com/archive/2009/12/teradata-database-object-summary/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 14:00:28 +0000</pubDate>
		<dc:creator>Rob Paller</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Teradata]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://robpaller.com/?p=181</guid>
		<description><![CDATA[In my previous blog post I showed how to build an Object Catalog of your Teradata data warehouse. Trouble is even on moderately sized systems your Object catalog could result in tens of thousands of rows. One of my object &#8230; <a href="http://robpaller.com/archive/2009/12/teradata-database-object-summary/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Frobpaller.com%252Farchive%252F2009%252F12%252Fteradata-database-object-summary%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Teradata%20Database%20Object%20Summary%22%20%7D);"></div>
<p>In my previous blog post I showed how to build an <a href="http://robpaller.com/archive/2009/12/building-a-teradata-object-catalog/" target="_self">Object Catalog</a> of your Teradata data warehouse. Trouble is even on moderately sized systems your Object catalog could result in tens of thousands of rows. One of my object summaries is over thirty thousand rows. This can be overwhelming if you hand it off to management since they prefer a thirty thousand foot view.</p>
<p>So in order to provide a higher level overview of your Teradata system you can create a view on top of your object catalog that summarizes information at the database or user level providing information such perm space allocation/consumption, average table perm space consumption, average number of rows per table, number of tables with/without stats, and a count of each object type in the database.</p>
<p>The following view could be extended fairly easily to include additional metrics on such as the largest and smallest tables in both row count or perm space consumption. For my needs, I didn&#8217;t need to include those items.  The SQL can be found below:</p>
<p><span id="more-181"></span></p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #993333; font-weight: bold;">VIEW</span> SysDBA<span style="color: #66cc66;">.</span>Database_Object_Overview <span style="color: #993333; font-weight: bold;">AS</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> C<span style="color: #66cc66;">.</span>DatabaseName
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> RowType <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'u'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'User'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> RowType <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'D'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Database'</span>
            <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #993333; font-weight: bold;">NULL</span>
       <span style="color: #993333; font-weight: bold;">END</span> DatabaseType
     <span style="color: #66cc66;">,</span> DatabaseAvailablePerm
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span>TableSize<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> DatabaseSize
     <span style="color: #66cc66;">,</span> AVG<span style="color: #66cc66;">&#40;</span>TableSize<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> AvgTableSize
     <span style="color: #66cc66;">,</span> AVG<span style="color: #66cc66;">&#40;</span>TableRows<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> AvgTableRows
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableMissingStats <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'Y'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> TablesMissingStats
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableMissingStats <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'N'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> TablesWithStats
     <span style="color: #66cc66;">,</span> TablesWithStats<span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#40;</span>NULLIFZERO<span style="color: #66cc66;">&#40;</span>TableCount<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">1.000</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> PercentTableWithStats
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>TableName<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> ObjectCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'T'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> TableCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'V'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> ViewCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'M'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> MacroCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'P'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> ProcedureCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'E'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> ExternalCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'F'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> FunctionCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'I'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> JoinIndexCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'U'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> UserDefinedTypeCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'S'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> OLAPFunctionCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'R'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> TableFunctionCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'G'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> TriggerCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'D'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> JARCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'Q'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> QueueTableCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'N'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> HashIndexCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'J'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> JournalCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'H'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> InstanceOrMethodCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'B'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> CombinedAggOLAPCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'A'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> AggregateFunctionCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'X'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">END</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> AuthorizationCount
<span style="color: #993333; font-weight: bold;">FROM</span> SysDBA<span style="color: #66cc66;">.</span>Object_Catalog C
   <span style="color: #66cc66;">,</span> DBC<span style="color: #66cc66;">.</span>Dbase D
   <span style="color: #66cc66;">,</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> DatabaseName
           <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span>MaxPerm<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> DatabaseAvailablePerm
      <span style="color: #993333; font-weight: bold;">FROM</span> DBC<span style="color: #66cc66;">.</span>DiskSpace
      <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span>
     <span style="color: #66cc66;">&#41;</span> S
<span style="color: #993333; font-weight: bold;">WHERE</span> C<span style="color: #66cc66;">.</span>DatabaseName <span style="color: #66cc66;">=</span> D<span style="color: #66cc66;">.</span>DatabaseName
  <span style="color: #993333; font-weight: bold;">AND</span> S<span style="color: #66cc66;">.</span>DatabaseName <span style="color: #66cc66;">=</span> D<span style="color: #66cc66;">.</span>DatabaseName
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">3</span>
;</pre></div></div>


]]></content:encoded>
			<wfw:commentRss>http://robpaller.com/archive/2009/12/teradata-database-object-summary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Building a Teradata Object Catalog</title>
		<link>http://robpaller.com/archive/2009/12/building-a-teradata-object-catalog/</link>
		<comments>http://robpaller.com/archive/2009/12/building-a-teradata-object-catalog/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 14:00:16 +0000</pubDate>
		<dc:creator>Rob Paller</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Teradata]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://robpaller.com/?p=161</guid>
		<description><![CDATA[Recently I was asked to provide an inventory of a production Teradata system that included a list of all user created objects and as much information about the objects that I could gather included perm space usage, row counts, and &#8230; <a href="http://robpaller.com/archive/2009/12/building-a-teradata-object-catalog/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Frobpaller.com%252Farchive%252F2009%252F12%252Fbuilding-a-teradata-object-catalog%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Building%20a%20Teradata%20Object%20Catalog%22%20%7D);"></div>
<p>Recently I was asked to provide an inventory of a production Teradata system that included a list of all user created objects and as much information about the objects that I could gather included perm space usage, row counts, and object type. Two of the three could easily be gathered using the data dictionary tables in DBC. However, the row count requirement made me pause for a moment and weigh the impact this could have. The production system that I was working on had hundreds of databases and thousands of tables.</p>
<p>I knew writing an SQL script that would build the SELECT queries that would perform a COUNT(*) against every table and capture that in a flat file or table on the system was trivial. However, when you have a system with thousands or tens of thousands of objects it would take quite some time to run all of those statements even if many of the tables are relatively small. It just didn&#8217;t make good sense to take that approach.</p>
<p>Then I realized that nearly every table had some level of statistics collected against it and maintained at least semi-regularly depending on the DBA that was responsible for the database. The trouble is that Teradata&#8217;s HELP STATISTICS command only shows you the number of unique values for each set of columns containing statistics. But then I remembered that the view I used as part of my stats maintenance routine did have a column for the number of rows. The views that I use as the basis for my stats maintenance routine were written by Dieter Noeth and is available for the general public to use courtesy of the <a href="http://www.teradataforum.com/">TeradataForum</a>. For the sake of brevity and maintaining a single source for the code I am not going to post the SQL for the views here but you can find them <a href="http://www.teradataforum.com/attachments/a091019a.txt" target="_blank">here</a> in the <a href="http://www.teradataforum.com/attach.htm" target="_blank">Attachment Library</a> over at the TeradataForum. (It should be noted that there are two different sets of views that support both the 32 bit and 64 bit versions of Teradata. Make sure you use the correct set of views for your installation.)</p>
<p>In order to keep things organized there are three views used to gather the information instead of creating a bunch of derived tables. The view Stats_Data is responsible for collapsing the number of fields into a comma delimited list for the first 16 columns and then extracting the pertinent binary data for the statistics collected on a given set of columns. The second view Stats_Basics_[32/64]bit extrapolates the binary data from the Stats_Data view into individual binary fields that require further refining. The final view Stats_Details composes the binary data into its final numeric and temporal values from which additional reporting and analysis can be done.</p>
<p>With these three views in place the Object_Catalog view could easily be constructed by simply bringing together a view additional data dictionary tables and the Stats_Details view. The Object_Catalog view displays the following attributes about the objects in each database on the system:</p>
<ul>
<li>Database Name &#8211; self-explanatory</li>
<li>Object Name &#8211; self-explanatory</li>
<li>Column Count &#8211; This is a count of the number of fields for the object in TVFields.</li>
<li>Table Rows &#8211; The number of rows on the table when the stats were last collected. NULL if stats are not collected.</li>
<li>Table Size &#8211; The current perm space being consumed by the table.</li>
<li>Table Missing Stats &#8211; Indicator field for if stats exist on the table. NULL for non-table objects.</li>
<li>Table Kind &#8211; A single character field categorizing the object type. (e.g. T, V, M, etc.)</li>
<li>Table Kind Description &#8211; A description of the object type (e.g. Table, View, Macro, etc.)</li>
</ul>
<p>The SQL for the Object_Catalog view can be found below:<span id="more-161"></span></p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #993333; font-weight: bold;">VIEW</span> SysDBA<span style="color: #66cc66;">.</span>Object_Catalog <span style="color: #993333; font-weight: bold;">AS</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span>
       T<span style="color: #66cc66;">.</span>DatabaseName
     <span style="color: #66cc66;">,</span> T<span style="color: #66cc66;">.</span>ObjectName
     <span style="color: #66cc66;">,</span> DT4<span style="color: #66cc66;">.</span>ColumnCount
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span>DT2<span style="color: #66cc66;">.</span>NumRows <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">BIGINT</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> TableRows
     <span style="color: #66cc66;">,</span> DT3<span style="color: #66cc66;">.</span>TableSize
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>Tablekind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'T'</span>
             <span style="color: #993333; font-weight: bold;">AND</span> TableRows <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #993333; font-weight: bold;">NULL</span>
            <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'y'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>Tablekind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'T'</span>
             <span style="color: #993333; font-weight: bold;">AND</span> Tablerows &amp;gt; <span style="color: #cc66cc;">0</span>
            <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'n'</span>
            <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #993333; font-weight: bold;">NULL</span>
       <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> TableMissingStats
     <span style="color: #66cc66;">,</span> T<span style="color: #66cc66;">.</span>TableKind
     <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">CASE</span> <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'A'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Aggregate function'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'B'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Combined aggregate and ordered analytical function'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'D'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'JAR'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'E'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'External Stored Procedure'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'F'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Standard function'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'G'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Trigger'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'H'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Instance or Constructor Method'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'I'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Join Index'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'J'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Journal'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'M'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Macro'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'N'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Hash Index'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'P'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'SQL Procedure'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'Q'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Queue Table'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'R'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Table function'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'S'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Ordered analytical function'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'T'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Table'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'U'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'User-defined data type'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'V'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'View'</span>
            <span style="color: #993333; font-weight: bold;">WHEN</span> T<span style="color: #66cc66;">.</span>TableKind <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'X'</span> <span style="color: #993333; font-weight: bold;">THEN</span> <span style="color: #ff0000;">'Authorization'</span>
            <span style="color: #993333; font-weight: bold;">ELSE</span> <span style="color: #993333; font-weight: bold;">NULL</span>
       <span style="color: #993333; font-weight: bold;">END</span> <span style="color: #993333; font-weight: bold;">AS</span> TableKindDescription
<span style="color: #993333; font-weight: bold;">FROM</span> DBC<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">TABLES</span> T
 <span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> DatabaseName
          <span style="color: #66cc66;">,</span> TableName
          <span style="color: #66cc66;">,</span> NumRows
     <span style="color: #993333; font-weight: bold;">FROM</span> SysDBA<span style="color: #66cc66;">.</span>Stats_Details
     QUALIFY CollectTimeStamp
           <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">MAX</span><span style="color: #66cc66;">&#40;</span>CollectTimestamp<span style="color: #66cc66;">&#41;</span>
             <span style="color: #993333; font-weight: bold;">OVER</span><span style="color: #66cc66;">&#40;</span>PARTITION <span style="color: #993333; font-weight: bold;">BY</span> DatabaseName<span style="color: #66cc66;">,</span> TableName<span style="color: #66cc66;">&#41;</span>
         <span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #993333; font-weight: bold;">ROW_NUMBER</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
             <span style="color: #993333; font-weight: bold;">OVER</span><span style="color: #66cc66;">&#40;</span>PARTITION <span style="color: #993333; font-weight: bold;">BY</span> DatabaseName<span style="color: #66cc66;">,</span> TableName
                  <span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> CollectTimestamp <span style="color: #993333; font-weight: bold;">DESC</span><span style="color: #66cc66;">&#41;</span>
           <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>
    <span style="color: #66cc66;">&#41;</span>     DT2
        <span style="color: #993333; font-weight: bold;">ON</span> T<span style="color: #66cc66;">.</span>DatabaseName <span style="color: #66cc66;">=</span> DT2<span style="color: #66cc66;">.</span>DatabaseName
       <span style="color: #993333; font-weight: bold;">AND</span> T<span style="color: #66cc66;">.</span>TableName    <span style="color: #66cc66;">=</span> DT2<span style="color: #66cc66;">.</span>TableName
<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> DatabaseName
          <span style="color: #66cc66;">,</span> TableName
          <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">SUM</span><span style="color: #66cc66;">&#40;</span>CurrentPerm<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> TableSize
     <span style="color: #993333; font-weight: bold;">FROM</span> DBC<span style="color: #66cc66;">.</span>TableSize
     <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span>
    <span style="color: #66cc66;">&#41;</span> DT3
       <span style="color: #993333; font-weight: bold;">ON</span> T<span style="color: #66cc66;">.</span>DatabaseName <span style="color: #66cc66;">=</span> DT3<span style="color: #66cc66;">.</span>DatabaseName
      <span style="color: #993333; font-weight: bold;">AND</span> T<span style="color: #66cc66;">.</span>TableName    <span style="color: #66cc66;">=</span> DT3<span style="color: #66cc66;">.</span>TableName
<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> D<span style="color: #66cc66;">.</span>DATABASENAME
          <span style="color: #66cc66;">,</span> T<span style="color: #66cc66;">.</span>TVMNAME        <span style="color: #993333; font-weight: bold;">AS</span> TableName
          <span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">COUNT</span><span style="color: #66cc66;">&#40;</span>C<span style="color: #66cc66;">.</span>FieldId<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> ColumnCount
     <span style="color: #993333; font-weight: bold;">FROM</span> DBC<span style="color: #66cc66;">.</span>TVM T
        <span style="color: #66cc66;">,</span> DBC<span style="color: #66cc66;">.</span>TVFields C
        <span style="color: #66cc66;">,</span> DBC<span style="color: #66cc66;">.</span>Dbase D
     <span style="color: #993333; font-weight: bold;">WHERE</span> T<span style="color: #66cc66;">.</span>TVMId <span style="color: #66cc66;">=</span> C<span style="color: #66cc66;">.</span>TableId
       <span style="color: #993333; font-weight: bold;">AND</span> T<span style="color: #66cc66;">.</span>DatabaseId <span style="color: #66cc66;">=</span> D<span style="color: #66cc66;">.</span>DatabaseId
     <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span>
    <span style="color: #66cc66;">&#41;</span> DT4
      <span style="color: #993333; font-weight: bold;">ON</span> T<span style="color: #66cc66;">.</span>DatabaseName <span style="color: #66cc66;">=</span> DT4<span style="color: #66cc66;">.</span>DatabaseName
     <span style="color: #993333; font-weight: bold;">AND</span> T<span style="color: #66cc66;">.</span>TableName    <span style="color: #66cc66;">=</span> DT4<span style="color: #66cc66;">.</span>TableName
;</pre></div></div>


]]></content:encoded>
			<wfw:commentRss>http://robpaller.com/archive/2009/12/building-a-teradata-object-catalog/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>

<!-- Served from: robpaller.com @ 2012-02-05 22:26:07 by W3 Total Cache -->
