Kayıtlar

Kasım, 2012 tarihine ait yayınlar gösteriliyor

Farklı Databaselerdeki Indexleri Oluşturma

declare CURSOR c1 IS   SELECT p.index_owner,p.table_owner,p.table_name,p.index_name, wm_concat(p.column_name) kolonlar    FROM   DBA_IND_COLUMNS p    WHERE table_name =:TABLE_NAME    AND NOT EXISTS           (SELECT 1 FROM dba_ind_columns@diger_db r            WHERE p.index_name=r.index_name            AND p.index_owner=r.index_owner )    GROUP BY p.index_owner,p.table_owner,p.table_name,p.index_name; BEGIN FOR r1 IN c1 loop   dbms_output.put_line('CREATE INDEX '||r1.index_owner||'.'||r1.index_name||' ON '||r1.table_owner||'.'||r1.table_name||' ('||r1.kolonlar||');' ); end loop; end;