-
Notifications
You must be signed in to change notification settings - Fork 64
/
cs_acs_disable.sql
executable file
·51 lines (51 loc) · 1.32 KB
/
cs_acs_disable.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
----------------------------------------------------------------------------------------
--
-- File name: cs_acs_disable.sql
--
-- Purpose: Disable Adaptive Cursor Sharing (ACS)
--
-- Author: Carlos Sierra
--
-- Version: 2022/02/07
--
-- Usage: Connecting into PDB or CDB.
--
-- Confirm when requested.
--
-- Example: $ sqlplus / as sysdba
-- SQL> @cs_acs_disable.sql
--
-- Notes: Developed and tested on 19c.
--
---------------------------------------------------------------------------------------
--
@@cs_internal/cs_primary.sql
@@cs_internal/cs_cdb_warn.sql
@@cs_internal/cs_set.sql
@@cs_internal/cs_def.sql
--
PRO
PRO ***
PRO *** You are about to DISABLE Adaptive Cursor Sharing (ACS) for &&cs_con_name.
PRO ***
PRO
PRO 1. Enter "Yes" (case sensitive) to continue, else <ctrl>-C
DEF cs_confirm = '&1.';
UNDEF 1;
--
SET SERVEROUT ON;
BEGIN
IF '&&cs_confirm.' = 'Yes' THEN
EXECUTE IMMEDIATE 'ALTER SYSTEM SET "_optimizer_adaptive_cursor_sharing" = FALSE';
EXECUTE IMMEDIATE 'ALTER SYSTEM SET "_optimizer_extended_cursor_sharing_rel" = "NONE"';
EXECUTE IMMEDIATE 'ALTER SYSTEM SET "_optimizer_extended_cursor_sharing" = "NONE"';
DBMS_OUTPUT.put_line('Done');
ELSE
DBMS_OUTPUT.put_line('Null');
END IF;
END;
/
--
@@cs_internal/cs_undef.sql
@@cs_internal/cs_reset.sql
--