Solved

Dynamic Output in SSIS

Posted on 2008-06-18
4
535 Views
Last Modified: 2013-11-30
In SQL 2000 DTS I am able to build a database from a series of flat files and name the database based on some dynamic/global variables through DTS (see snippet below) how can i accomplish this same task in SSIS and SQL 2005?

 SET @cmd='master..xp_cmdshell ''DTSRun /S "' + @Server + '" /U "user" /P
"password" /N "hk_import_tempBook_' + @Person + '" /A "gv_destDB:8=HTML_' +
@CompanyID + '_' + @BookCode + '" /A "gv_destDBtable:8=[HK_' + @CompanyID
+ '_' + @BookCode + '].[dbo].[temp_Book]"'', no_output'
  EXEC (@cmd)

or can i just run these all under the legacy area of SQL 2005?
0
Comment
Question by:ChrisMoreland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Expert Comment

by:sbagireddi
ID: 21817176
You can use the DTS Migration Wizard if you do not want to create the package using SSIS.
But some components may not work.
But you can try and see if it works.
0
 

Author Comment

by:ChrisMoreland
ID: 21817365
The problem is the The SQL Server 2005 Integration Services (SSIS) Package Migration Wizard does not migrate Dynamic Properties tasks in SQL Server 2000 Data Transformation Services (DTS) packages. and this keeps me from createing the global variable gv_destDB.
0
 
LVL 8

Expert Comment

by:sbagireddi
ID: 21817569
There is no dynamic property task in Sql server 2005.

Instead look at SSIS expressions and Configurations.

this may helps as well:

www.sqlis.com
0
 
LVL 15

Accepted Solution

by:
rob_farley earned 500 total points
ID: 21818529
Use Expressions on your Connection Manager. So... I assume you're doing something like a ForEach Enumerator, populating a variable with the name of the file... So in your Flat File Source ConnectionManager, set the ConnectionString to be based on an expression that uses the variable, and in your OLEDB Destination ConnectionManagaer, set the ConnectionString to use the appropriate database.

Or if it's just the table you're needing to tweak, then you can set it to a variable in the OLEDB Destination component. You may need to put a script component in the ControlFlow (in the ForEach Component) to set the variable appropriately before calling the Data Flow.

But... the design of the table must be the same as all the rest. The flow through a table has to be identical. If you're needing to pull a bunch of different files through, then do a Bulk Insert task which uses Expressions instead.

Rob
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question