Reputation: 155
I'm using Talend to migrate one table from one SQL Server (source) to other SQL Server (target).
The source table not have any index. And I want to add some index at target table.
In Talend studio, How I can add or create the index for target table?.
How I do it? Or what Talend's component should I use?.
I am using Talend Open Studio 8.0.1 and SQL Server 2019.
Thank you.
Upvotes: 0
Views: 337
Reputation: 765
You can use tDbRow component to execute the sql statement and don't forget a tDbCommit component to commit the database and close the connextion if needed
the query you need to execute is as such Create Nonclustered Indexes
create nonclustered index indexname on tablename(columnname)
Drop Index
Drop Index index name on tablename
See all Indexes in a database
select * from sys.indexes
Upvotes: 1