<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Need to run MSSQL script through Talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Need-to-run-MSSQL-script-through-Talend/m-p/2286254#M59876</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I need to fetch the list of indexes for MS SQL Table and then compare the indexes with some values. If a tables has 5 indexes then I need to rebuild all non-cluster Indexes except 1 index.&lt;BR /&gt;1) I need to do this through TALEND. How can I achieve this?&lt;BR /&gt;&lt;BR /&gt;2) Also I have written a SQL script (.sql) for above index rebuild, now I need to execute this script through talend. How do i achieve?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance !&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 08:00:19 GMT</pubDate>
    <dc:creator>mks02</dc:creator>
    <dc:date>2017-06-20T08:00:19Z</dc:date>
    <item>
      <title>Need to run MSSQL script through Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-to-run-MSSQL-script-through-Talend/m-p/2286254#M59876</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I need to fetch the list of indexes for MS SQL Table and then compare the indexes with some values. If a tables has 5 indexes then I need to rebuild all non-cluster Indexes except 1 index.&lt;BR /&gt;1) I need to do this through TALEND. How can I achieve this?&lt;BR /&gt;&lt;BR /&gt;2) Also I have written a SQL script (.sql) for above index rebuild, now I need to execute this script through talend. How do i achieve?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance !&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 08:00:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-to-run-MSSQL-script-through-Talend/m-p/2286254#M59876</guid>
      <dc:creator>mks02</dc:creator>
      <dc:date>2017-06-20T08:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need to run MSSQL script through Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-to-run-MSSQL-script-through-Talend/m-p/2286255#M59877</link>
      <description>&lt;P&gt;Talend is not a tools for DBA, SQL Server Agent could do this better, but You can use&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tMSSQLInput component for list of indexes, like&lt;/P&gt; 
&lt;PRE&gt;SELECT 
     TableName = t.name,
     IndexName = ind.name,
     IndexId = ind.index_id,
     ColumnId = ic.index_column_id,
     ColumnName = col.name,
     ind.*,
     ic.*,
     col.* 
FROM 
     sys.indexes ind 
INNER JOIN 
     sys.index_columns ic ON  ind.object_id = ic.object_id and ind.index_id = ic.index_id 
INNER JOIN 
     sys.columns col ON ic.object_id = col.object_id and ic.column_id = col.column_id 
INNER JOIN 
     sys.tables t ON ind.object_id = t.object_id 
WHERE 
	 t.name = 'YOU_TABLE_NAME' 
	 AND ind.is_primary_key = 0 
     AND ind.is_unique = 0 
     AND ind.is_unique_constraint = 0 
     AND t.is_ms_shipped = 0 
ORDER BY 
     t.name, ind.name, ind.index_id, ic.index_column_id;&lt;/PRE&gt; 
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/765867/list-of-all-index-index-columns-in-sql-server-db" target="_self" rel="nofollow noopener noreferrer"&gt;source of code&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You can also use tMSSQLRow component&amp;nbsp;for any other commands like create index, update and etc&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 10:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-to-run-MSSQL-script-through-Talend/m-p/2286255#M59877</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2017-06-20T10:08:26Z</dc:date>
    </item>
  </channel>
</rss>

