Last active
September 7, 2023 12:37
-
-
Save Tracnac/da8d3ce398169db025c03861407304bd to your computer and use it in GitHub Desktop.
Revisions
-
Tracnac revised this gist
Sep 7, 2023 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ ```sql DECLARE CURSOR c1 IS @@ -28,3 +29,4 @@ BEGIN CLOSE c1; END; / ``` -
Tracnac revised this gist
Sep 7, 2023 . 1 changed file with 30 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1,30 @@ DECLARE CURSOR c1 IS SELECT 'alter user ' || username || ' LOCAL TEMPORARY TABLESPACE ' || TEMPORARY_TABLESPACE FROM dba_users WHERE username NOT IN ('XS$NULL') AND local_temp_tablespace = 'SYSTEM'; execme VARCHAR2(32767); BEGIN DBMS_OUTPUT.enable(32767); OPEN c1; LOOP FETCH c1 INTO execme; EXIT WHEN c1%NOTFOUND; BEGIN execute immediate execme; EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE ('Error code: ' || SQLCODE || ': ' || SUBSTR(SQLERRM, 1, 64)); DBMS_OUTPUT.put_line ('Error sql: ' || execme); END; END LOOP; CLOSE c1; END; / -
Tracnac created this gist
Sep 7, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@