Solved

Import tables from multiple mdb into SQL using SSIS 2005

Posted on 2011-02-26
6
767 Views
Last Modified: 2013-11-10
What is the best way to import tables (Total 7) from Access databases into one SQL table.  I am using SSIS and created a connection to each of the databases. Not all of the tables have the same columns.  Each import has its own container - with sql tasks and aggregations.  Problems with the data types converting - so instead importing into temp table with char datatypes - then inserting the data into the sql table. Is there a  better way to do this in SSIS? Also, need help with counting the records imported and date of import in ssis and exporting to Excel. thx bb
0
Comment
Question by:bar0822
6 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 34987206
>> Problems with the data types converting - so instead importing into temp table with char datatypes - then inserting the data into the sql table. Is there a  better way to do this in SSIS?

Best way is to populate records into temp table and then insert it into actual table..
0
 
LVL 30

Expert Comment

by:Reza Rad
ID: 34988128
If you looks for an automated way for all tables with different structures, you can't use SSIS Data Flow task, because it doesn't support dynamic meta data.
Is is "one time import" ?
I mean do you want to do this process just one time? or you need it later?
if this is one time job, you can use Import/Export wizard to import these data into sql server staging tables, and then you can query on these data and get result as you want .

But If you want to write a package to use it on timely basis, you need to create 7 source/transformation/destination. (because of different data structures)
0
 
LVL 7

Expert Comment

by:rmm2001
ID: 34989514
When you say " Problems with the data types converting - so instead importing into temp table with char datatypes - then inserting the data into the sql table" - are you putting a data conversion transformation from your access connection/transformations to your sql table? If not you should try putting a data conversion transformation before you draw the arrow to the sql connection to change the columns out of unicode. And then map the new converted columns into your table. control flow data conversion transformation
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:bar0822
ID: 35003381
This is not a one time import - scheduled to run monthly.  I tried the data transformation task and changed the type to DT_STR with the same length as the sql table and kept getting the same error message:  cannot change unicode to non unicode.  I was pulling my hair so I just gave up and went with the put data in temp table with char datatype fields and then into the sql table - this worked with the first table.  I am starting on importing my second table that has some of the fields as the first import.  I am looking to use the same package with a second data task flow in a second container - after the first import/container has finished, then start the second but I must do this for 7 imports - would it be more efficient / faster if I created separate packages for each and called them all from a main package?
regards,
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 35239552
No,

Best way is to use for each loop and get each *.mdb and insert data to table using dataflow task.
0
 

Author Closing Comment

by:bar0822
ID: 35432951
this was my first solution as described in my question but was looking for another way to do it.  I tried the data conversion process but there were too many errors and could not spend too much time on this.  So I went with my solution which was the same as Genius.
I appreciate the responses from all and they were all good.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now