Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Generic DTS package creation & maintenance
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Steve@CSC
Starting Member

6 Posts

Posted - 07/31/2002 :  16:08:45  Show Profile  Reply with Quote
OK guys, here's what I'm trying to accomplish for starters:

1) Create a DTS package to import 66 CSV files to a SQL 2000 database. Tedious, but not a problem.

2) Now, make that DTS package work for 20-odd clients, all of whom have different source file locations & destination database names.

3) Perform the above so that the addition of new tables & clients is easily implemented by people with even less SQL experience than I.

4) There are a few other gotchas, such as some clients requiring multiple source CSVs for a single table & handling journal updates, but I'm not worrying about that yet.

I'd tried to work this out using SQL 7.0, but neither global nor environment variables 'took' as far as the source or destination filenames went. I was told SQL 2000 would handle this, but I'm still coming up short of the goal.

Any suggestions for a SQL newbie?

robvolk
Most Valuable Yak

USA
15732 Posts

Posted - 07/31/2002 :  16:18:24  Show Profile  Visit robvolk's Homepage  Reply with Quote
There's some good info in Books Online on programming DTS, also take a look here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtsprog/dtspapps_21rn.asp

It's probably best to put together some VB or C code to construct the entire DTS job from user input (here's the file, here's the table I want to dump it into, or create a new table if it's not already there) You could even do it using ActiveX script code. The data transformation(s) will be the toughest part really, and I think it'll be easier to create them rather than modify existing transforms in a generic package.

Go to Top of Page

Page47
Flowing Fount of Yak Knowledge

USA
2878 Posts

Posted - 07/31/2002 :  16:19:02  Show Profile  Reply with Quote
I would lean towards building a dynamic 'bcp in' string and a proc that iterates through some table to import all the files. Dynamic DTS is doable...more so in 2k than 7.0...but a PITA...

Jay White
{0}
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000