Rem
Rem $Header: rdbms/admin/bug24714096_apply.sql /st_rdbms_12.2.0.1.0dbbp/4 2017/07/06 11:27:46 pknaggs Exp $
Rem
Rem bug24714096_apply.sql
Rem
Rem Copyright (c) 2016, 2017, Oracle and/or its affiliates. 
Rem All rights reserved.
Rem
Rem    NAME
Rem      bug24714096_apply.sql - Bug 24714096: PE_NAME in RADM_PE$ -> 256.
Rem
Rem    DESCRIPTION
Rem      Blr# 25976885 for bug 24714096: change PE_NAME in RADM_PE$ to 256.
Rem
Rem    NOTES
Rem      Bug 24714096: change the PE_NAME column of the
Rem       sys.radm_pe$ table from 4000 to 256
Rem       (backport of txn pknaggs_bug-24714096 from MAIN).
Rem
Rem    BEGIN SQL_FILE_METADATA
Rem    SQL_SOURCE_FILE: rdbms/admin/bug24714096_apply.sql
Rem    SQL_SHIPPED_FILE: rdbms/admin/bug24714096_apply.sql
Rem    SQL_PHASE: PATCH
Rem    SQL_STARTUP_MODE: NORMAL
Rem    SQL_IGNORABLE_ERRORS: NONE
Rem    SQL_CALLING_FILE:
Rem    END SQL_FILE_METADATA
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    pknaggs     06/28/17 - Bug #26334597: recompile REDACTION_EXPRESSIONS.
Rem    pknaggs     05/18/17 - Blr #25976885: backport pknaggs_bug-24714096.
Rem    pknaggs     04/21/17 - Bug #24714096: shorten PE_NAME for ORA-01450.
Rem    pknaggs     06/10/17 - Created
Rem

SET ECHO ON
SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 80
SET TRIMSPOOL ON
SET TAB OFF
SET PAGESIZE 100

@@?/rdbms/admin/sqlsessstart.sql

Rem ====================================================================
Rem Begin Bug 24714096
Rem ====================================================================

Rem
Rem Bug #24714096: shorten pe_name to 256 to avoid ORA-01450 on 2K block size.
Rem An index needs to be created on the pe_name column, and 758 is the
Rem maximum key length that can be indexed on a 2K block size, and also
Rem the cost-based optimizer would tend to avoid using indexes on very
Rem wide columns, so limiting the Policy Expression name to 256 here.
Rem
ALTER TABLE sys.radm_pe$ MODIFY pe_name VARCHAR2(256);

Rem
Rem Bug #26334597: the REDACTION_EXPRESSIONS view and synonym become invalid
Rem after the PE_NAME column of the RADM_PE$ table was modified above, because
Rem the definition of REDACTION_EXPRESSIONS refers to PE_NAME. Although
Rem the view would be automatically recompiled when queried, there are
Rem some scripts in the automated testing that look for invalid views
Rem and prevent the patch from being released if any invalid view is
Rem found, so we need to recompile the REDACTION_EXPRESSIONS view here.
Rem
ALTER VIEW sys.redaction_expressions COMPILE;
ALTER PUBLIC SYNONYM redaction_expressions COMPILE;

Rem ====================================================================
Rem End Bug 24714096
Rem ====================================================================

@?/rdbms/admin/sqlsessend.sql
 
