import varying number of tables each time from one database to a different databasse

I am new to SSIS. I have been struggling with this for the past one week. I have a weird task. I need to import several tables from one database to a different server with a new database name. We need to do this at the end of every year. The main problem here is that the number of tables varies every year. You may not have all the tables as last year or may have more tables. So I need to create a dynamic task that takes care of this every year without changing the package.

I have performed the following tasks **

1. Create a new dynamic database. ( I have used Execute SQL Task to do this) 2. Copy all the table structures ( I have used Execute SQL Task to do this)

3. Import Data
This is the main problem. I was trying to create a dynamic connection string with variables as suggested in several forums but I finally came to know that this cannot be done if the table structures are different as the metadata cannot be refreshed at runtime.

4. The final step to create a process to validate the data (the count from each table for both source and destination. I think this can be done with Sql task.

Any suggestions what is the best method to do this? My DBA does not like Transfer SQL Objects Task or transfer Database Task. I would like to create this as a dynamic process.

Thanks in advance ylsv

September 9th, 2015 6:57pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics