tag:blogger.com,1999:blog-72853710211902018472024-03-13T13:53:36.300-07:00Stragittus BlogEric Mertens (Stragittus SPRL)http://www.blogger.com/profile/04388596316763681813noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-7285371021190201847.post-58376586445448420862012-07-09T06:48:00.001-07:002012-07-09T07:01:35.421-07:00ODI 11.1.1.6 Working with Groovy editor | Michael Verzijl BlogA nice post about using Groovy to automate ODI tasks:<br />
<br />
<ul>
<li><a href="http://mverzijl.wordpress.com/2012/02/27/odi-11-1-1-6-working-with-groovy-editor/">ODI 11.1.1.6 Working with Groovy editor | Michael Verzijl Blog</a></li>
</ul>
<div>
<br /></div>Eric Mertens (Stragittus SPRL)http://www.blogger.com/profile/04388596316763681813noreply@blogger.com3tag:blogger.com,1999:blog-7285371021190201847.post-55968853232248862762012-04-27T04:48:00.001-07:002012-04-27T04:48:37.761-07:00Locks & Latches: Quipu connectionsUsefull for connecting to SQL Server Express using Quipu<br />
<br />
<ul><li><a href="http://locksnlatches.blogspot.com/2011/10/quipu-connections.html">Locks & Latches: Quipu connections</a></li>
</ul>Eric Mertens (Stragittus SPRL)http://www.blogger.com/profile/04388596316763681813noreply@blogger.com12tag:blogger.com,1999:blog-7285371021190201847.post-28639201235935410672012-04-21T06:36:00.000-07:002012-04-21T06:39:24.604-07:00I create a project on Google Code to gather all scripts, tables, utilities, documents, ... that I used and could be useful to other BI & DWH people.<br />
<br />
You can download the very first release here:<br />
<br />
<ul>
<li><a href="http://stragittus-business-intelligence-workbench.googlecode.com/files/Stragittus_BI_Workbench_v0.1.zip">Stragittus_BI_Workbench_v0.1.zip</a></li>
</ul>
<br />
It contains the SQL DDL scripts as well as the data in CSV format to create 4 dimensions for a Data Warehouse or Data Mart:<br />
<br />
<ul>
<li>D_Country</li>
<li>D_Currency</li>
<li>D_Language</li>
<li>D_MinuteInDay</li>
</ul>
<br />
It's a simple zip file with 4 folders, one for each table. Just go to the desired subfolder and use the .sql and/or the .txt file<br />
<br />
<br />
Enjoy, and comments are welcome !<br />
<br />
EricEric Mertens (Stragittus SPRL)http://www.blogger.com/profile/04388596316763681813noreply@blogger.com0tag:blogger.com,1999:blog-7285371021190201847.post-40579811336859216292012-03-18T06:17:00.002-07:002012-03-18T06:18:59.629-07:00Free Dimension Table: D_MinuteInDayIf you need a dimension table for the Minute in a Day for your Data Warehouse or Data Mart, you can download the following zip file. It contains the DDL for SQL Server 2008 as well as the data in a txt file.<br />
The data file is a semi-colon delimited file, with double-quotes as text-qualifier.<br />
<br />
<br />
<ul>
<li><a href="https://sites.google.com/a/stragittus.com/stragittus-website/free-stuffs/D_MinuteInDay.zip?attredirects=0&d=1" target="_blank">D_MinuteInDay.zip</a></li>
</ul>
<div>
<br /></div>
<div>
Feel free to use...</div>
<div>
<br /></div>
<div>
Eric</div>Eric Mertens (Stragittus SPRL)http://www.blogger.com/profile/04388596316763681813noreply@blogger.com0tag:blogger.com,1999:blog-7285371021190201847.post-7095247137550389042012-03-18T04:02:00.003-07:002012-03-18T04:04:09.183-07:00sp_DropView: A simple T-SQL stored proc to drop a view in any database<br />
A simple T-SQL procedure to drop a view in any database of the current server. The goal is to have the view removed, was it there or not. Feel free to use...<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">CREATE PROCEDURE [dbo].[sp_DropView]</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>@Database nvarchar(255),</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>@Owner nvarchar(255),</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>@View nvarchar(255)</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">AS</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">BEGIN</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>DECLARE @SQLStmt varchar(8000);</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small; white-space: pre;"> </span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">SET NOCOUNT ON;</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small; white-space: pre;"> </span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">SET @SQLStmt = '</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>IF EXISTS (</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>SELECT * FROM ' + @Database + '.sys.views</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>WHERE</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>object_id = OBJECT_ID(N''' + @Database + '.' + @Owner + '.' + @View + ''')</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>)</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>EXEC ' + @Database + '..sp_executesql N''DROP VIEW ' + @Owner + '.' + @View + '''</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>';</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><span style="white-space: pre;"> </span>EXEC (@SQLStmt);</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">END</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">GO</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br /></span><br />
<br />
EricEric Mertens (Stragittus SPRL)http://www.blogger.com/profile/04388596316763681813noreply@blogger.com0tag:blogger.com,1999:blog-7285371021190201847.post-32892780282332452732012-03-18T03:57:00.003-07:002012-03-18T03:57:41.099-07:00sp_DropTable: A simple T-SQL stored proc to drop a table in any databaseA simple T-SQL procedure to drop a table in any database of the current server. The goal is to have the table removed, was it there or not. Feel free to use...<br />
<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">CREATE PROCEDURE [dbo].[sp_DropTable]</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> @Database nvarchar(255),</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> @Owner nvarchar(255),</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> @Table nvarchar(255)</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">AS</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">BEGIN</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> DECLARE @SQLStmt varchar(8000);</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> SET NOCOUNT ON; SET @SQLStmt = '</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> IF EXISTS (</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> SELECT * FROM ' + @Database + '.sys.objects</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> WHERE</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> object_id = OBJECT_ID(N''' + @Database + '.' + @Owner + '.' + @Table + ''')</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> AND type in (N''U'')</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> )</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> DROP TABLE ' + @Database + '.' + @Owner + '.' + @Table;</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> EXEC (@SQLStmt);</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">END</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">GO</span><br />
<br />
<br />
EricEric Mertens (Stragittus SPRL)http://www.blogger.com/profile/04388596316763681813noreply@blogger.com0