I have about 6 or 7 smaller sized tables (out of around 100 tables) located in a SQL Server 2008 R2 database (64 bit) that I need copied to a Staging database on a different server (also SQL 2008 R2 64 bit) that I have created. The approach I was taking was using a FOREACH loop container to get the names of the tables I need and to store them in a string User variable called TableName. That part I have working. Then I was thinking of using a Script Task to take that tablename and copy the table from one server to another. I am assuming that I will need to use SMO to some degree in the script but I am having trouble figuring out how to do that.
Some things to consider are that I will never know what the exact names of the tables will be - only that they start with a certain string such as "LOS_Release". The tables are not guarenteed to have the same columns.
If anyone has a sample or advice on how to do this seemingly simple task I would appreciate it
Scott