McUnwrap: unwrap your PL/SQL code [message #651866] |
Thu, 26 May 2016 11:00 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68675 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
You have no source version control system, you lost the source file, you wrapped the code in the database, McUnwrap is what you need.
McUnwrap is a Windows program which allows you to unwrap your 10g+ wrapped PL/SQL codes (function, procedure, package [body], type [body], library).
Its help is the following one:
C:\>.\McUnwrap -h
McUnwrap Utility by Michel Cadot: Version 2018.11.27 on 27-NOV.-2018 10:22:05
Copyright (c) Michel Cadot, 2016-2018. All rights reserved.
Usage: McUnwrap.exe { -h | [{ -c | -r }] [-o <outfile>] [<infile>] }
with
-c Compress mode: removes all blanks lines and all spaces at the end
of the lines
-o <outfile> Gives the name of the result file
-r Raw mode: returns the unwrapped text as it is without any cleaning
<infile> Gives the name of the file containing the wrappped code
If input file is not given, standard input is used.
If output file is not given, standard output is used.
By default (no "-c" or "-r" option), the program removes ending blank lines,
replaces consecutive blank lines by a single empty one; the reason is that before
wrapping the code Oracle replaces the comments by blank lines and the wrapping
process adds some junk characters at the end. In addition, the code is converted
in upper case but, of course, constant strings and quoted idenfitiers.
Note: the program skips all lines before the one containing the object type, its
name and the keyword "wrapped". It ends its analysis at the first subsequent
blank line.
The program is provided as it is without any guarantees or warranty. Although the
author has attempted to find and correct any bugs in this free program, the author
is not responsible for any damage or losses of any kind caused by the use or misuse
of the program. The author is under no obligation to provide support, service,
corrections, or upgrades to this program.
You can freely use, copy and distribute this program but you can't modify it without
the permission of the author you can contact on http://www.orafaq.com
You can post your comments, ask for improvements, report bugs... on the program at
http://www.orafaq.com/forum/t/201028/
I encourage you to subscribe to this topic (link at top of the page) if you want to
be informed when a new version is released.
The program ignores all lines of the file before the one ending by the keyword "wrappped". It stops to analyze the file at the first blank line. If you get the wrapped from a query on the database take care that some rows may start by an empty line. To avoid this problem you can use the following query:
set pagesize 0 feedback off linesize 120
select regexp_replace(text,'^'||chr(10),'') text
from all_source
where owner = '...'
and name = '...'
and type = '...'
order by line;
Latest version: 2021.12.03, download in Wrap wiki page.
MD5: 9a0e7cfc9e97eaad9982d491e3e6e4be
SHA-1: a63216f650d12a4723342a08b1c8acfecce606f6
[Updated on: Fri, 03 December 2021 03:15] Report message to a moderator
|
|
|
Re: McUnwrap: unwrap your PL/SQL code [message #652075 is a reply to message #651866] |
Wed, 01 June 2016 01:22 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68675 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Support of 12c (12.1).
Note: without any compression option ("-c" or "-c2") the result is a raw unwrapping which may lead to duplicate blank lines and junk characters at the end.
"-c" removes all these later ones and squeezes multiple blank lines.
"-c2" removes in addition all blank lines and trims spaces at the end of the other lines.
[Updated on: Wed, 01 June 2016 06:22] Report message to a moderator
|
|
|
|
|
|
|
|