SSIS: Copy data for few tables from different 3 servers into one database

Hello Folks,

I have three servers with identical database. So, I need to copy few tables (common from all server's databases) and store in one database only.

So, I shall follow below steps:

1. CREATE SSIS Package
2. CREATE Four database connections (for different server)
3. Data Flow Task for each database connection
4. Mapping of tables in Data Flow Task.

Is the correct and best approach OR do you have other alternatives?

Best Regards,
Mohit Pandit
LVL 6
MohitPanditAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steven ReidHead of ITCommented:
Hi Mohit,

Some questions
- Are the tables on each source database called the same?
- Is the information in each source database to be added to the same table?
- Do you need to know which database it comes from?
- Will this overwrite the destination table?

Questions not withstanding, you could create a loop in SSIS to loop through the databases, but if there are only going to be the 3 source databases, it might be just as quick to do the way you mention.

and choose whether to do in parallel, or sequentially.

Thanks
Steve
LajuanTaylorCommented:
You can copy the tables using SQL Server Management Studio Tools. See attached .pdf instructions. Here's a link to instructions on how to install the tools and download them from Microsoft:
http://www.sqlshack.com/sql-server-management-studio-step-step-installation-guide/
CopyDataUsing-SQLServerManagementStudio.
MohitPanditAuthor Commented:
Hi Steve,

Please find below:

Some questions
 - Are the tables on each source database called the same?
[MP:] Yes
 - Is the information in each source database to be added to the same table?
[MP:] Yes
 - Do you need to know which database it comes from?
[MP:] Yes
 - Will this overwrite the destination table?
[MP:] No, it will append.

Do you have any reference link for looping?

Hi LajuanTaylor, I want to automate only with SSIS.

Thanks

Best Regards
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Vikas GargAssociate Principal EngineerCommented:
Hello,

You can do this using For Each Loop container and load the data from different servers to the single table as destination.

Hope this article will give you guidance for the same.

http://sql-bi-dev.blogspot.in/2010/07/dynamic-database-connection-using-ssis.html

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MohitPanditAuthor Commented:
Hi Vikas,

I've 10 tables. Do you thoughts for multiple tables?

Best Regards
Vikas GargAssociate Principal EngineerCommented:
Do those 10 table have same structure and you want all data to a single destination database table ?

If yes then you can do this using for each loop and dynamic connection string for sources
MohitPanditAuthor Commented:
Okay, let me try.

BTW, 10 tables have different columns

Best Regards
MohitPanditAuthor Commented:
Thanks. I used execute sql task, for each container and script task to achieve this.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.