how to copy several tables from one server to another including PK, Indexes etc

Nishan Ratna 150 Reputation points

Hi All, Is there a way to copy several tables from one server to another server including primary key, indexes etc. I can use transfer sql server objects task in SSIS. However I am not able to automate the process. I want to automate it. Can someone help me please? Thanks

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,469 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    Comments have been turned off. Learn more

  2. ZoeHui-MSFT 33,781 Reputation points

    Hi @Nishan Ratna ,

    You may use Transfer SQL Server Objects Task in SSIS. The Transfer SQL Server Objects task transfers one or more types of objects in a SQL Server database between instances of SQL Server. For example, the task can copy tables and stored procedures.

    When copying tables, you can indicate the types of table-related items to include in the copy process. The following types of items can be copied together with the related table: User's image

    A tutorial here, you may take a reference to.


    Zoe Hui

    If the answer is helpful, please click "Accept Answer" and upvote it.