-
Notifications
You must be signed in to change notification settings - Fork 64
/
cs_acs_enable.sql
executable file
·51 lines (51 loc) · 1.32 KB
/
cs_acs_enable.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_enable.sql
--
-- Purpose: Enable 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_enable.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 ENABLE 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" = TRUE';
EXECUTE IMMEDIATE 'ALTER SYSTEM SET "_optimizer_extended_cursor_sharing_rel" = "SIMPLE"';
EXECUTE IMMEDIATE 'ALTER SYSTEM SET "_optimizer_extended_cursor_sharing" = "UDO"';
DBMS_OUTPUT.put_line('Done');
ELSE
DBMS_OUTPUT.put_line('Null');
END IF;
END;
/
--
@@cs_internal/cs_undef.sql
@@cs_internal/cs_reset.sql
--