Tuesday, March 20, 2012

Automatic Update From Access?

Hey all,
This is one of my first forays into SQL server, so I don't know how dumb this question is. I've got a SQL server db that's going to be the underlying source for an ASP app. Two of the tables will need to be updated somewhat regularly, perhaps 5 or 6 times
a month. We actually get the info in the form of an Access database.
All I need is to take My_Table and My_Other_Table from the Access DB and use them to replace My_Table and My_Other_Table in the SQL Server DB - I'll keep the same table names, column names, and I don't need to play around w/ data types.
What's the best way to do this? BCP, DTS, etc? I'd appreciate some guidance. Thanks.
The simplest way (IMO) is to use a transform data task in DTS.
First you could create the tables on sql server with the datatypes you
require - before creating the package.
Next you create a package with a transform data task for each table's
import. Before the transform data task runs, you have an Execute SQL task
which truncates the tables.
After that you can schedule the task. BTW, I prefer to use DTSRUNUI to
generate the readable command-line string and use that, just so I can see
which version and package is really running in a job.
HTH,
Paul Ibison

No comments:

Post a Comment