Skip to content

Instantly share code, notes, and snippets.

Marco Schreuder in2bi

Block or report user

Report or block in2bi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@in2bi
in2bi / SaveCompiledBiml
Created Jul 28, 2014
BIML Code to save the compiled BIML to file
View SaveCompiledBiml
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<#
string xBiml = RootNode.GetBiml();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xBiml);
string sFile = @"C:\temp\myBimlFile.xml";
xmlDoc.Save(sFile);
#>
</Biml>
@in2bi
in2bi / TruncateAllTables
Last active Aug 29, 2015
TSQL Script to truncate all tables in a database
View TruncateAllTables
/*
Truncate all tables in a database, by:
- dropping all foreign key constraints
- truncating all the tables
- recreating the dropped foreign key constraints
*/
DECLARE @DropConstraints nvarchar(max)
DECLARE @TruncateTables nvarchar(max)
DECLARE @RecreateConstraints nvarchar(max)
@in2bi
in2bi / CdcAndBimlPreparation
Created Dec 3, 2014
CDC and BIML Preparation of Database
View CdcAndBimlPreparation
--1. Create database
CREATE DATABASE CDCTest;
GO
--2. Create CDC table using AdventureWorksDW2012 database
USE CDCTest
GO
SELECT *
INTO DimDepartmentGroup_CDC
@in2bi
in2bi / CdcAndBimlInitialLoad
Last active Aug 29, 2015
Biml file to creat initial load of CDC enabled table
View CdcAndBimlInitialLoad
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Connections>
<AdoNetConnection Name="Source"
ConnectionString="Data Source=.;Initial Catalog=CDCTest;Integrated Security=True;"
Provider="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
CreateInProject="true" />
<AdoNetConnection Name="Destination"
ConnectionString="Data Source=.;Initial Catalog=CDCTest;Integrated Security=True;"
Provider="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
CreateInProject="true"/>
@in2bi
in2bi / CdcAndBimlIncrementalLoad
Last active Jul 4, 2016
Biml file toe create Incremental load
View CdcAndBimlIncrementalLoad
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Connections>
<AdoNetConnection Name="Source"
ConnectionString="Data Source=.;Initial Catalog=CDCTest;Integrated Security=True;"
Provider="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
CreateInProject="true"
/>
<AdoNetConnection Name="Destination"
ConnectionString="Data Source=.;Initial Catalog=CDCTest;Integrated Security=True;"
Provider="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
You can’t perform that action at this time.