<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-283645383163336716</id><updated>2012-02-16T02:13:21.442-08:00</updated><category term='Dimension'/><category term='9.5'/><category term='Access'/><category term='SQL'/><category term='Backup'/><category term='MS SQL Server'/><category term='DB2'/><category term='Constraints'/><category term='Internationalization'/><category term='Memory'/><category term='Oracle'/><category term='Information'/><category term='DB2 9.5 Memory'/><category term='Federation'/><title type='text'>ROLAP Musings</title><subtitle type='html'>Fighting with Analytical &amp;amp; Transformational SQL in the BI Wildlife</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-2334749761564031375</id><published>2010-04-30T02:03:00.000-07:00</published><updated>2010-04-30T02:03:19.128-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Backup'/><title type='text'>SQL Server Backup Compression</title><content type='html'>In &lt;a href="http://dwbi1.wordpress.com/2010/03/31/sql-server-2008-backup-compression/"&gt;Vincent Rainardis Blog&lt;/a&gt; you find a good explanation of Backup Compression for SQL Server 2008.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-2334749761564031375?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/2334749761564031375/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2010/04/sql-server-backup-compression.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/2334749761564031375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/2334749761564031375'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2010/04/sql-server-backup-compression.html' title='SQL Server Backup Compression'/><author><name>Martin Preiss</name><uri>http://www.blogger.com/profile/06388592214305009761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/-LEox1RIpC6A/TiB1cr8YlkI/AAAAAAAAAWE/8Jl0Hrspfyk/s220/MP3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-8241006971939755932</id><published>2010-03-15T09:04:00.000-07:00</published><updated>2010-03-15T09:04:48.121-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL Server'/><title type='text'>Change Data Capture</title><content type='html'>&lt;a href="http://dwbi1.wordpress.com/2010/03/11/change-data-capture/"&gt;Vincent Rainardi&lt;/a&gt; explains in his Blog the &lt;i&gt;Change Data Capture (CDC)&lt;/i&gt; mechanism of MS SQL Server and includes a short code example.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-8241006971939755932?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/8241006971939755932/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2010/03/change-data-capture.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/8241006971939755932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/8241006971939755932'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2010/03/change-data-capture.html' title='Change Data Capture'/><author><name>Martin Preiss</name><uri>http://www.blogger.com/profile/06388592214305009761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/-LEox1RIpC6A/TiB1cr8YlkI/AAAAAAAAAWE/8Jl0Hrspfyk/s220/MP3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-3211290150020534704</id><published>2010-01-27T08:23:00.000-08:00</published><updated>2010-01-27T08:23:14.728-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Internationalization'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Using Runtime-Collations To Mimique Different Target Orders</title><content type='html'>&lt;a href="http://www.datenbank-sql.de/nls.htm"&gt;Here&lt;/a&gt; is a nice conclusion of oracles language &amp; collation settings/capabilities.&lt;br /&gt;&lt;br /&gt;Especially the usage of the &lt;blockquote&gt;NLSSORT&lt;/blockquote&gt;function in conjunction with an &lt;blockquote&gt;order by&lt;/blockquote&gt;statement can help you to present result sets in exactly that order that, e.g., a target system with a specific internationalization setting will interpret or need the data:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;select * from source order by NLSSORT(sort_column,'NLS_FORMAT=xxx')&lt;/blockquote&gt;&lt;br /&gt;Useful format parameters are, e.g., binary or ascii7.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-3211290150020534704?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/3211290150020534704/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2010/01/using-runtime-collations-to-mimique.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/3211290150020534704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/3211290150020534704'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2010/01/using-runtime-collations-to-mimique.html' title='Using Runtime-Collations To Mimique Different Target Orders'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-965593151145099998</id><published>2010-01-06T04:35:00.000-08:00</published><updated>2010-01-06T04:35:37.372-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dimension'/><category scheme='http://www.blogger.com/atom/ns#' term='Constraints'/><title type='text'>Debugging Attribute Constraints in Dimension Tables</title><content type='html'>A solution that is especially useful wrt. SSAS postprocessing can be found &lt;a href="http://ssas-musings.blogspot.com/2010/01/debugging-attribute-relationships-in.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-965593151145099998?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/965593151145099998/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2010/01/debugging-attribute-constraints-in.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/965593151145099998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/965593151145099998'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2010/01/debugging-attribute-constraints-in.html' title='Debugging Attribute Constraints in Dimension Tables'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-8866420289577719344</id><published>2009-12-09T08:44:00.000-08:00</published><updated>2009-12-11T10:22:38.521-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dimension'/><category scheme='http://www.blogger.com/atom/ns#' term='Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Information'/><title type='text'>Maintaining Analyto-Operative Data using MS Access</title><content type='html'>Actually, this idea should rather have startet another "BI Musings" blog. But for the sake of simplicitely ...&lt;br /&gt;&lt;br /&gt;Any advanced data warehouse/BI landscape will necessarily develop a bunch of (mostly: dimensional) data residing in the twilight zone between operational input and analytical output. &lt;br /&gt;Examples are - from our experiences -  localization resources, seasonal and other analytical taggings, organisational mappings, plausibility rules, technical annotations such as versions, modes, runs, etc., etc., etc. ... See, the hunger comes with the meal.&lt;br /&gt;&lt;br /&gt;Most often, it is too expensive and/or inconvenient to put these data and the associated maintenance processes into the (legacy) operational systems where they should have been modelled in the first place. &lt;br /&gt;&lt;br /&gt;On the other hand, the relational techie in charge of the DWH platform is seldom willing to care about the business meaning of those things, too. &lt;br /&gt;&lt;br /&gt;We have tried various mechanisms to construct and maintain these beasts which range from "Direct-Editing Relational Tables", "Pre-Privoting in Excel and Mounting the Sheet as an External Table" into "Replaying SQL Scripts". Neither of those solutions have been very satisfying so far.   &lt;br /&gt;&lt;br /&gt;Our customer indeed gave us a hint to look at a tool that we have abandoned long before but that is still installed at most BI users computing devices along with Excel: MS Access!&lt;br /&gt;&lt;br /&gt;Using Access to build up and maintain a normalized part of the dimensional model (e.g., we use individual tables for each hierarchy/attribute hosting technical and business keys, labels, descriptions, ranges, localizations, ....) eventually using forms make it a pleasure for business users. &lt;br /&gt;&lt;br /&gt;By (graphically!) defining views in Access, it is quite easy to construct, pre-pivot, debug and even pre-chart the flattened dimensional outcome of the partial model. Outer joins (caution, mostly RIGHT JOINs in a typical star-like structure) help you to initially identify integrity problems when doing batch-input. After that, using referential integrity constraints, Access will help you and your users to derive at consistent intermediate versions of the data.&lt;br /&gt;&lt;br /&gt;Finally,  you can use the more-or-less two-button ODBC export facility to dump the complete result view into the datawarehouse stage/information schema of your choice. Depending on the sophistication of your driver (believe me, SQL-Server is well-supported ;-), type conversion could sometimes aberrate, but SSAS will remap whatever junk there comes into reasonable target types most of the time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-8866420289577719344?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/8866420289577719344/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/maintaining-analyto-operative-data.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/8866420289577719344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/8866420289577719344'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/maintaining-analyto-operative-data.html' title='Maintaining Analyto-Operative Data using MS Access'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-3500508678385121875</id><published>2009-12-09T04:37:00.000-08:00</published><updated>2010-01-20T04:48:43.191-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Transformation of parent-child-hierarchies into a multi-column representation</title><content type='html'>it's not rocket science but here is a query to transform a balanced parent-child-hierarchy into a multi-column hierarchy for a dimension table:&lt;br /&gt;&lt;pre&gt;-- subquery factoring for the relevant part of the source table&lt;br /&gt;with&lt;br /&gt;groups as&lt;br /&gt;(select groupid &lt;br /&gt;      , groupname&lt;br /&gt;      , parentid&lt;br /&gt;   from ext_groups)&lt;br /&gt;-- definition of the levels of the hierarchy&lt;br /&gt;select ig0.groupid groupid_level0&lt;br /&gt;     , ig0.groupname groupname_level0&lt;br /&gt;     , ig1.groupid groupid_level1&lt;br /&gt;     , ig1.groupname groupname_level1&lt;br /&gt;     , ig2.groupid groupid_level2&lt;br /&gt;     , ig2.groupname groupname_level2&lt;br /&gt;     , ig3.groupid groupid_level3&lt;br /&gt;     , ig3.groupname groupname_level3&lt;br /&gt;     , ig4.groupid groupid_level4&lt;br /&gt;     , ig4.groupname groupname_level4&lt;br /&gt;  from &lt;br /&gt;       -- root-level with the restriction to nodes without a parent&lt;br /&gt;       -- (in this case: partenid = 0)&lt;br /&gt;       (select *&lt;br /&gt;          from groups&lt;br /&gt;         where parentid = 0&lt;br /&gt;        ) ig0&lt;br /&gt;       -- level 1&lt;br /&gt;     , (select *&lt;br /&gt;          from groups&lt;br /&gt;        ) ig1&lt;br /&gt;       -- level 2&lt;br /&gt;     , (select *&lt;br /&gt;          from groups&lt;br /&gt;        ) ig2&lt;br /&gt;       -- level 3&lt;br /&gt;     , (select *&lt;br /&gt;          from groups&lt;br /&gt;        ) ig3&lt;br /&gt;       -- level 4 (= branch-level)&lt;br /&gt;     , (select *&lt;br /&gt;          from groups&lt;br /&gt;        ) ig4&lt;br /&gt; where ig1.parentid = ig0.groupid&lt;br /&gt;   and ig2.parentid = ig1.groupid&lt;br /&gt;   and ig3.parentid = ig2.groupid&lt;br /&gt;   and ig4.parentid = ig3.groupid&lt;br /&gt; order by ig0.groupid&lt;br /&gt;        , ig1.groupid&lt;br /&gt;        , ig2.groupid&lt;br /&gt;        , ig3.groupid&lt;br /&gt;        , ig4.groupid;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The first subquery &lt;i&gt;ig0&lt;/i&gt; gets all the nodes from the root level, then these rows are joined to &lt;i&gt;ig1&lt;/i&gt; via &lt;i&gt;ig1.parentid = ig0.groupid&lt;/i&gt; and every following level is connected in the same way. Of course you have to know the depth of the hierarchy to choose the fitting number of subqueries.&lt;br /&gt;&lt;br /&gt;The approach should also work for unbalanced (=ragged) hierarchies, but then you have to use outer joins (and maybe to replace NULL-values by a known parent-entry).&lt;br /&gt;&lt;br /&gt;Somewhat related is the information that Oracle 11 Release 2 has introduced &lt;i&gt;recursive subquery factoring&lt;/i&gt;, so you can avoid the ''connect by'' syntax if you like. Rob van Wijk explains some pros and cons of both options in his &lt;a href="http://rwijk.blogspot.com/2009/11/recursive-subquery-factoring.html"&gt;Blog&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-3500508678385121875?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/3500508678385121875/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/transformation-of-parent-child.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/3500508678385121875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/3500508678385121875'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/transformation-of-parent-child.html' title='Transformation of parent-child-hierarchies into a multi-column representation'/><author><name>Martin Preiss</name><uri>http://www.blogger.com/profile/06388592214305009761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/-LEox1RIpC6A/TiB1cr8YlkI/AAAAAAAAAWE/8Jl0Hrspfyk/s220/MP3.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-386131153500811026</id><published>2009-12-02T10:20:00.000-08:00</published><updated>2009-12-02T10:21:58.762-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB2'/><category scheme='http://www.blogger.com/atom/ns#' term='9.5'/><title type='text'>Never Ever!</title><content type='html'>Never ever forget to add the &lt;bf&gt;nonrecoverable&lt;/bf&gt; keyword when doing a &lt;bf&gt;load&lt;/bf&gt; into a tablespace/database without active backup/recovery!&lt;br /&gt;&lt;br /&gt;Especially when talking about information schema tablespaces, this could result in a lot of developers waiting for a several-hours backup job to finish hopefully &lt;br /&gt;before the nightly ETL´s creating views, dropping old tables, running statistics etc ...&lt;br /&gt;&lt;br /&gt;No more happy. Lasted for just half an hour. Think I need a beer or two.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-386131153500811026?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/386131153500811026/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/never-ever.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/386131153500811026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/386131153500811026'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/never-ever.html' title='Never Ever!'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-7490799995330839033</id><published>2009-12-02T08:43:00.000-08:00</published><updated>2009-12-02T10:21:23.341-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB2'/><category scheme='http://www.blogger.com/atom/ns#' term='9.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Federation'/><title type='text'>Staging Pain Minimized: DB2 Create Tabe Like</title><content type='html'>A quite usual task when building a staging area is to more or less "stupidly" replicating federated source data into the target data warehouse. &lt;br /&gt;&lt;br /&gt;This is to minimize the influence of ongoing transactions within the operational systems on your following ETL processes. This is also to allow for "batch performance" treatments on the source data that you normally would not apply to your source systems. And finally, having the data locally gives you more expressivity when combining the data even with other data from the same source.&lt;br /&gt;&lt;br /&gt;In an ongoing customer´s project, we were faced with exactly that situation and came to build a lot scripts of the form:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;drop table stage.replicated_table;&lt;br /&gt;&lt;br /&gt;create table stage.replicated_table(replicated_column1 replicated_data_type1 replicated_constraint1, replicated_column2 ...);&lt;br /&gt;&lt;br /&gt;declare load_cursor load for select column1, column2,... from source_link_schema.source_table for read only with ur;&lt;br /&gt;&lt;br /&gt;load from "load_cursor" method p(1,2,...) insert into stage.replicated_table(replicated_column1, replicated_column2, ...) nonrecoverable;&lt;br /&gt;&lt;br /&gt;runstats on table stage.replicated_table ...;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;each taking about 20 minutes in order to describe the original table and reformat the output into the create table syntax. Pffff.&lt;br /&gt;&lt;br /&gt;For gods sake, some people at IBM do not look only good in their blue suits (still too few, I think I have to blog next my hate away about the ugly and time-consuming create view restriction when selecting non-unique column names) and invented the create table like syntax&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;drop table stage.replicated_table;&lt;br /&gt;&lt;br /&gt;create table stage.replicated_table like sources_link_schema.source_table;&lt;br /&gt;&lt;br /&gt;declare load_cursor load for select * from source_link_schema.source_table for read only with ur;&lt;br /&gt;&lt;br /&gt;load from "load_cursor" method p(1,2,...) insert into stage.replicated_table nonrecoverable;&lt;br /&gt;&lt;br /&gt;runstats on table stage.replicated_table ...;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;1 minute. Runs fine. I´m happy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-7490799995330839033?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/7490799995330839033/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/staging-pain-minimized-db2-create-tabe.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/7490799995330839033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/7490799995330839033'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/staging-pain-minimized-db2-create-tabe.html' title='Staging Pain Minimized: DB2 Create Tabe Like'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-3121016533683539844</id><published>2009-12-01T02:31:00.000-08:00</published><updated>2009-12-01T02:31:26.722-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB2 9.5 Memory'/><title type='text'>DB2 Database/Tablespace Size Debugging</title><content type='html'>It is one of the most fundamental laws in nature that, no matter what you computed with whatever nifty usage statistics in your upset mind at the beginning of a project, database space will become sparse.&lt;br /&gt;&lt;br /&gt;In order to find out what the actual settings of the relevant tablespaces are, you can issue a&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;list tablespaces show detail&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;command once you have the sufficient privileges. Note that, even if your tablespace was created using "autosize", there may be a maxsize limit which you better turn off with&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;alter tablespace blablabla maxsize none&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;once again under the precondition that you have the sufficient privileges.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-3121016533683539844?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/3121016533683539844/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/db2-databasetablespace-size-debugging.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/3121016533683539844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/3121016533683539844'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2009/12/db2-databasetablespace-size-debugging.html' title='DB2 Database/Tablespace Size Debugging'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-8522967278612604729</id><published>2009-11-25T01:07:00.000-08:00</published><updated>2009-11-25T03:59:47.661-08:00</updated><title type='text'>DB2 Tablespace State "Backup Pending. Load in Progress."</title><content type='html'>The load utility of DB2 is a strange thing as it does certain things much faster than using the command line processor but on the other hand goes different transactional ways to complete its work.&lt;br /&gt;&lt;br /&gt;One outcome of a load process gone wild (or rather: being interrupted before completing its work) could be that it leaves the tablespace in the state "Backup Pending. Load in Progress" (0x0820) with which DB2 notifies that it still needs a backup, recovery or rollforward usually done by load.&lt;br /&gt;&lt;br /&gt;You still can access the tablespace, but any structural/transactional change will be denied due to the status (note that the status of all the associated tables could be "normal") of the tablespace.&lt;br /&gt;&lt;br /&gt;For a concise overview of the backup/recovery levels and strategies of DB2 you could have a look &lt;a href="http://herber-consulting.de/html/db2/Logging-Backup.html"&gt;at this page&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-8522967278612604729?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/8522967278612604729/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2009/11/db2-tablespace-state-backup-pending.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/8522967278612604729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/8522967278612604729'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2009/11/db2-tablespace-state-backup-pending.html' title='DB2 Tablespace State &quot;Backup Pending. Load in Progress.&quot;'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-1878386387365006501</id><published>2009-11-25T00:59:00.000-08:00</published><updated>2009-11-25T00:59:41.187-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB2'/><category scheme='http://www.blogger.com/atom/ns#' term='9.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><title type='text'>DB2 buffer pool "4096" has no more pages</title><content type='html'>Yesterday, we found a customer´s database in a strange state. Whenever doing some of the more bandwith-demanding ETL operations, we were presented with the annoying error message:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Operation could not be performed, because buffer pool &lt;a-number-greater-than-4096/&gt; has no more pages left.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;After some internet search, we found out that these ids belong to buffer pools (so called hidden, for most serious cases under-dimensioned buffer pools - kind of replacement tires) that are not officially assigned to the relevant tablespaces, but that get used once the memory manager cannot start the actually assigned pools, e.g., due to memory shortage. &lt;br /&gt;&lt;br /&gt;The database finally had to be restarted (online activation of the buffer pools did not work) in order to get the state back to normal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-1878386387365006501?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/1878386387365006501/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2009/11/db2-buffer-pool-4096-has-no-more-pages.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/1878386387365006501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/1878386387365006501'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2009/11/db2-buffer-pool-4096-has-no-more-pages.html' title='DB2 buffer pool &quot;4096&quot; has no more pages'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-283645383163336716.post-4983682292184298832</id><published>2009-11-25T00:41:00.000-08:00</published><updated>2009-11-25T00:50:28.209-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB2'/><category scheme='http://www.blogger.com/atom/ns#' term='9.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Federation'/><title type='text'>Date Type Conversion When Federating Oracle into DB/2</title><content type='html'>Federation (or DB-Link depending on the target DWH platform) is a most convenient way to connect your staging area to your data sources.&lt;br /&gt;&lt;br /&gt;There is the golden rule not to stretch the tempting, modern capabilities of that feature to much, hence to first replicate, then transform the data.&lt;br /&gt;&lt;br /&gt;There are nevertheless a few issues left that may still hurt you mostly around the builtin data type conversions, especially when formulating the mostly temporally constrained replication conditions.&lt;br /&gt;&lt;br /&gt;So, DB2 9.5 represents oracle´s DATE as a TIMESTAMP - hence be sure to use CURRENT_TIMESTAMP instead of CURRENT_DATE!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/283645383163336716-4983682292184298832?l=rolap-musings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rolap-musings.blogspot.com/feeds/4983682292184298832/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://rolap-musings.blogspot.com/2009/11/date-type-conversion-when-federating.html#comment-form' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/4983682292184298832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/283645383163336716/posts/default/4983682292184298832'/><link rel='alternate' type='text/html' href='http://rolap-musings.blogspot.com/2009/11/date-type-conversion-when-federating.html' title='Date Type Conversion When Federating Oracle into DB/2'/><author><name>Doc Schorsch</name><uri>http://www.blogger.com/profile/07956181040487046784</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_0yj5v1IOuP8/SwO0yBV7vzI/AAAAAAAAAJI/PM0uF_YWIWM/S220/cgj.jpg'/></author><thr:total>0</thr:total></entry></feed>
