Created
May 21, 2020 11:21
-
-
Save elcascarudo-dev/c0cce9d32e0adbf387e7e59542693625 to your computer and use it in GitHub Desktop.
ORA-01502 - PL SQL Para obtener todos los índices en estados UNUSABLE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
begin | |
for x in ( select owner, index_name from all_indexes where owner like '%{usuario o esquema}%' and status = 'UNUSABLE' ) | |
loop | |
DBMS_OUTPUT.PUT_LINE('alter index ' || x.owner || '.' || x.index_name || ' rebuild;'); | |
end loop; | |
end; | |
/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment