Lee posted on July 10, 2011 08:19

In this post let’s load the export server and export dynamic parameter tables, along with the file delimiter mapping.  Attached are three files – change the parameters (server names, file export locations) for your particular environment, paying attention to spaces, backslashes, etc. so that the package will work properly.  Also included are the two following queries, the first for the server level parameters, and second for the dynamic file parameters.  These queries will be placed in two separate ExecuteSQL tasks that will feed the script component. Yours should also look similar to these as well after you have inserted your records. Also, if you do not have the AdventureWorksDW2008R2 database loaded, go ahead and download this if you want to follow along with me. This is what we’ll source our example data from.

Make sure that you’ve read parts 1 & 2 of this series so your down with these blogs. In the next posting, I’ll attach the package for you to wire up to.

Lee

 

---------------------

 


Queries for SSIS ExecuteSQLTasks – Server parameter, and then file “dynamic” parameters.

SELECT ISExportSourceDBname as SourceDBName
        ,ISExportServername as ServerName 
FROM tbl_ISExportServerParms S
 
SELECT 
     ISExportSourceTableName AS TSK_DWH_TABLE
    ,ISExportSourceOutfileName AS PKG_OUTFILE_NAME
    ,ISExportSourceOutfilePath AS PKG_OUTFILE_PATH
    ,ISExportSourceLogfileName AS PKG_LOGFILE_NAME
    ,ISExportSourceLogfilePath AS PKG_LOGFILE_PATH
    ,ISExportSourceExtractSELECT  + ' ' + ISExportSourceTableName AS TSK_DWH_SQL_SELECT
    ,ISExportDelimiter
FROM tbl_ISExportDynamicParms D
INNER JOIN dbo.tbl_ISExportServerParms S
    ON D.ISExportConfigurationID = S.ISExportConfigurationID
WHERE D.ISExportExtractFlag & S.ISExportExtractFlag =1

Result for SSIS ExecuteSQLTasks - yours need to look similar to these.


image

 

Files-insert data into Export tables

tbl_ISExportServerParms Server Parameters


tbl_ISExportDynamicParms Dynamic Parameters


tbl_ISFileDelimiterMap File delimiter table

 


Posted in: SSIS  Tags:
blog comments powered by Disqus

by Lee Everest, M.S.

Info

Poll

Do you use Azure or cloud in your organization?



Show Results

Ads

Search


Month List

Calendar

«  May 2012  »
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
View posts in large calendar

Tags

Disclaimer
The opinions, code, examples, et.al. expressed herein are my own personal opinions and do not represent my employer's view in any way, shape form, or fashion.  All code for demonstration purposes - no guarantees, either written or implied, are made.

© Copyright 2012 Lee Everest's SQL Server, etc. weblog