Environment:

SCOTTbook> ver1

PORT_STRING VERSION BANNER


X86_64 /Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition 11.2.0.4.0-64bit Production

SCOTTbook> show parameter plsql

NAME TYPE VALUE


plsql_ccflags string

plsql_code_type string INTERPRETED

plsql_debug boolean FALSE

plsql_optimize_level integer 2

plsql_v2_compatibility boolean FALSE

plsql_warnings string DISABLE:ALL

SCOTTook> alter session set plsql_code_type=native ;

Session altered.

$ ls -l /dev/shm/

total 0

create or replace PROCEDURE testp2 (

P_ORG_NUM IN number,

p_result OUT varchar2,

p_seq OUT number

) AS

BEGIN

p_seq := P_ORG_NUM; p_result:=”;

END;

/

create or replace package testp1

as

procedure foo;

end;

/

create or replace package body testp1 as

procedure foo is begin null; end;

end;

/

$ ls -l /dev/shm/

total 8

-rwx—— 1 oracle oinstall 432 2021-06-22 09:18:48 PESLD_book_1c38004_00dcf27d00000000

-rwx—— 1 oracle oinstall 528 2021-06-22 09:17:33 PESLD_book_1c38004_d87eef7c00000000

–// What does PESLD stand for? PESLD — PLSQL code www.pizei.comExecution Shared Object Manager Native Code Loader –// This compile process and package produces the file pesLD_BOOK_1C38004_00DCF27D00000000 in /dev/shm, and pesLD_BOOK_1C38004_00DCF27D00000000.

–// Log out and login again. Execute: SCOTTbook> spid

   SID    SERIAL# PROCESS                  SERVER    SPID       PID  P_SERIAL# C50

   295       1571 23979                    DEDICATED 23980       21        192 alter system kill session '295,1571' immediate;

SCOTTbook> exec testp1.foo()

PL/SQL procedure successfully completed.

$ strace -f -e open -p 23980

Process 23980 attached – interrupt to quit

open(“/dev/shm/PESLD_book_1c38004_00dcf27d00000000”, O_RDONLY|O_NOFOLLOW) = 8

–// You can see that open /dev/shm/ pes_book_1c38004_00dcf27d00000000 is called –// Now delete the file.

$ rm /dev/shm/PESLD_book_1c38004_00dcf27d00000000

/bin/rm: remove regular file `/dev/shm/PESLD_book_1c38004_00dcf27d00000000′? y

Exec testp1. Foo () PL/SQL Procedure Successfully Completed. –//OK. No problem, because the time handle is OK, you can notice that the second execution does not have the page game call open. –// Open a new session execution:

SCOTTbook> spid

   SID    SERIAL# PROCESS                  SERVER    SPID       PID  P_SERIAL# C50

    30       3837 23998                    DEDICATED 23999       26        234 alter system kill session '30,3837' immediate;

SCOTTbook> exec testp1.foo()

BEGIN testp1.foo(); END;

*

ERROR at line 1:

ORA-00600: internal error code, arguments: [pesldl01_Get_Object: shm_open failed: errno 2 errmsg No such fil], [/PESLD_book_1c38004_00dcf27d00000000], [], [], [], [], [], [], [], [], [], []

–// Recompile. SCOTTbook> alter session set plsql_code_type=native ; Session altered.

SCOTTbook> ALTER PACKAGE SCOTT.TESTP1 COMPILE;

Package altered.

$ ls -l /dev/shm/

total 8

-rwx—— 1 oracle oinstall 432 2021-06-22 09:38:24 PESLD_book_1c38004_00dcf27d00000000

-rwx—— 1 oracle oinstall 528 2021-06-22 09:17:33 PESLD_book_1c38004_d87eef7c00000000

SCOTTbook> exec testp1.foo()

PL/SQL procedure successfully completed.

Variable v_result varchar2; variable v_result varchar2; variable v_seq number ;

SCOTTbook> exec testp2(1,:v_result,:v_seq);

PL/SQL procedure successfully completed.

PLSQL_CODE_TYPE = NATIVE — PLSQL_CODE_TYPE = NATIVE –// Open a new session and recompile. SCOTTbook> ALTER PACKAGE SCOTT.TESTP1 COMPILE; Package altered.

$ rm -rf /dev/shm/PESLD_book_1c38004_*

variable v_result varchar2;

variable v_seq number ;

SCOTTbook> exec testp2(1,:v_result,:v_seq);

BEGIN testp2(1,:v_result,:v_seq); END;

*

ERROR at line 1:

ORA-00600: internal error code, arguments: [pesldl01_Get_Object: shm_open failed: errno 2 errmsg No such fil], [/PESLD_book_1c38004_d87eef7c00000000], [], [], [], [], [], [], [], [], [], []

–// Re-create: create or replace PROCEDURE testp2 ( P_ORG_NUM IN number, p_result OUT varchar2, p_seq OUT number ) AS BEGIN p_seq := P_ORG_NUM; p_result:=”; END; /

SCOTTbook> exec testp2(1,:v_result,:v_seq);

PL/SQL procedure successfully completed.

4. If you install the package compiled above, and an abnormal shutdown occurs, continue testing? $ ls -l /dev/shm/ total 4 -rwx—— 1 oracle oinstall 432 2021-06-22 09:53:47 PESLD_book_1c58004_f8ae607c00000000

SYSbook> shutdown abort ;

ORACLE instance shut down.

$ ls -l /dev/shm/

total 4

-rwx—— 1 oracle oinstall 432 2021-06-22 09:53:47 PESLD_book_1c58004_f8ae607c00000000

–// The file is still there. SYSbook> startup ORACLE instance started.

Total System Global Area 643084288 bytes

Fixed Size 2255872 bytes

Variable Size 205521920 bytes

Database Buffers 427819008 bytes

Redo Buffers 7487488 bytes

Database mounted.

Database opened.

SCOTTbook> alter session set plsql_code_type=native ;

Session altered.

SCOTTbook> exec testp1.foo()

PL/SQL procedure successfully completed.

$ ls -l /dev/shm/

total 8

-rwx—— 1 oracle oinstall 432 2021-06-22 09:53:47 PESLD_book_1c58004_f8ae607c00000000

-rwx—— 1 oracle oinstall 432 2021-06-22 09:56:43 PESLD_book_1c78004_c841197c00000000

–// Create a new file.