Wrap Utility doesn't work [message #628937] |
Mon, 01 December 2014 06:00 |
Andrey_R
Messages: 441 Registered: January 2012 Location: Israel
|
Senior Member |
|
|
Hi all,
I am trying to perform a simple wrapping of code, on the database server, however, it doesn't seem to wrap the code in the output file.
Does somebody have an idea what am I doing wrong here?
Thanks in advance.
[oracle@mydb db_1]$ cat wrap1.sql
PROCEDURE "LICENSE_LIMIT_PRC"
AS
CNT VARCHAR2(30);
BEGIN
SELECT COUNT(DISTINCT PROCESS) INTO CNT
FROM GV$SESSION B, GV$PROCESS A
WHERE B.PADDR = A.ADDR
AND TYPE='USER'
AND B.USERNAME = USER AND LOWER(B.MODULE) LIKE '%blablabla%';
IF CNT > 53 AND LOWER(SYS_CONTEXT('USERENV', 'MODULE')) LIKE '%blablabla%'
THEN RAISE_APPLICATION_ERROR (-20001, 'You have reached the limit of concurrent users allowed in xxx application (#60)'||CHR(10)||CHR(10));
END IF;
END "LICENSE_LIMIT_PRC";
/[oracle@mydb db_1]$wrap iname=wrap1.sql oname=wrap2.sql
PL/SQL Wrapper: Release 11.2.0.1.0- 64bit Production on Mon Dec 01 11:57:18 2014
Copyright (c) 1993, 2009, Oracle. All rights reserved.
Processing wrap1.sql to wrap2.sql
[oracle@mydb db_1]$ cat wrap2.sql
PROCEDURE "LICENSE_LIMIT_PRC"
AS
CNT VARCHAR2(30);
BEGIN
SELECT COUNT(DISTINCT PROCESS) INTO CNT
FROM GV$SESSION B, GV$PROCESS A
WHERE B.PADDR = A.ADDR
AND TYPE='USER'
AND B.USERNAME = USER AND LOWER(B.MODULE) LIKE '%blablabla%';
IF CNT > 53 AND LOWER(SYS_CONTEXT('USERENV', 'MODULE')) LIKE '%blablabla%'
THEN RAISE_APPLICATION_ERROR (-20001, 'You have reached the limit of concurrent users allowed in xxx application (#60)'||CHR(10)||CHR(10));
END IF;
END "LICENSE_LIMIT_PRC";
/[oracle@mydb db_1]$
Regards,
Andrey R.
[EDITED by LF: masked certain information, as requested by Andrey_R]
[Updated on: Mon, 01 December 2014 06:24] by Moderator Report message to a moderator
|
|
|
|
Re: Wrap Utility doesn't work [message #628944 is a reply to message #628941] |
Mon, 01 December 2014 06:37 |
Andrey_R
Messages: 441 Registered: January 2012 Location: Israel
|
Senior Member |
|
|
Michel Cadot wrote on Mon, 01 December 2014 14:08
CREATE is missing before PROCEDURE.
That's what happens when you use online unwrappers to decrypt the text ..... Lesson learned.
Thank you.
|
|
|