How to copy the indexes and constraints from the source database?

Rahul 251 Reputation points
2023-08-14T14:54:33.4533333+00:00

Hi,

I am migrating the data from oracle to the azure sql database.

  • From ADF functionality -Auto create , I am able to create the table successfully.

How to create/copy the indexes and constraints from the oracle source to the azure sql database through ADF tool ?

I understand above can also be achieved through sql scripts as one of the options.

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,646 questions
SQL Server | Other
{count} vote

Accepted answer
  1. Nandan Hegde 36,151 Reputation points MVP Volunteer Moderator
    2023-08-14T16:23:58.2433333+00:00

    Hey, In case of auto create only the schema gets created and not the constraints or indexes as you rightfully identified. You would have to use script activity initially on the source database to check whether there are any indexes or constraints on the table and get their definitions. Post that you need to use script activity on sink database to execute those definitions covered / identified in prev step on source database.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.