bitoolean
bitoolean

Reputation: 131

Automatically / programmatically copy tables (structure and data) between SQL Server DBs

...if you have a long list of names of tables to transfer, and you'd rather not having to mark their check-boxes in a wizard one by one?

Upvotes: 1

Views: 610

Answers (1)

LinkOps
LinkOps

Reputation: 341

Bitoolean,

Take a look at dbatools for powershell. Soulds like their toolset may be of use. I know they have a migration tool in there.

dbatools can be found here https://dbatools.io/

Also, You could look at https://sqljana.wordpress.com/2017/06/12/powershell-copy-sql-server-tables-structure-data-indexes-to-another-databaseinstance/ which seems to detail method in powershell to do what you wanted and have the $tables variable populated from a text file list or SQL Query.

Upvotes: 2

Related Questions