PL/SQL Wrap

Are you planning to add a feature to Wrap packages and compile them directly into the database from SQL Developer (Raptor)?
thanks
Al

We did not plan on it however I'm going to write up a short howto on adding custom context menu items to the right click. So with this you could have a right click on a procedure to wrap yoru code for you. I'll try and get this written up today and use the wrapping as the example.
-kris

Similar Messages

  • PL/SQL Wrap files

    Hi All,
    Just like to know What are PL/SQL wrap files and what is the use of these files ?
    Thanks

    We cannot read the source of wrapped PL/SQL files. This protects your code from prying eyes, something you might wish to do for either security or commercial reasons. The important thing about wrapping is that it is one way. There is no mechanism from reconstructing the source in plain text from a wrapped procedure.
    Cheers, APC

  • Problems with PL/SQL wrap

    mcode@austin $ wrap iname=email.plb oname=output PL/SQL Wrapper: Release 8.1.6.0.0 - Production on Wed Nov 29 15:58:22 2000 Copyright (c) Oracle Corporation 1993, 1994, 1995, 1996, 1997, 1998, 1999. All rights reserved Processing email.plb to output.plb PSU(103,1,1,22):Encountered the symbol "" when expecting one of the following: begin end function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> cursor form current PL/SQL Wrapper error: Compilation error(s) for: CREATE OR REPLACE PACKAGE BODY email Outputting source and continuing.
    There is nothing wrong with the code. I have created a package body and some procedures inside of it. Can anyone help?
    Thanks
    David

    I think the problem is that you are trying to compare a date value to a string in your PL/SQL, try something like this:
    if to_char(:P_Year,'YYYY') !='2004'

  • DBMS_JOB (proc_1/sec) versus pl/sql wrap that calls proc_1 in a loop

    Hello,
    What implementation will have a better performance, in terms of using oracle resources(connections)?
    I have Implementation # 1 deployed to an Oracle 10g database.
    The DBA has complained that Implementation # 1 consumes too many resources to get a connection and Implementation # 2 is better because there will be one connection every 5 minutes.
    Thanks.
    Implementation # 1
    DBMS_JOB.SUBMIT(
    job_no,
    'BEGIN proc_1; END;',
    SYSDATE,
    'SYSDATE + 1/86400', // every second
    TRUE );
    Implementation # 2
    DBMS_JOB.SUBMIT(
    job_no,
    'BEGIN PKG_JL.RUN(300,1,'proc_1'); END;',
    SYSDATE,
    'SYSDATE + 1/288', // every 5 min
    TRUE );
    where pkj_jl is:
    PACKAGE BODY PKG_JL
    IS
    PROCEDURE run ( an_loop_count IN NUMBER
              , an_sleep_seconds IN NUMBER default 1
              , av_sql IN varchar2)
    AS
         BEGIN
              for x in 1..an_loop_count
              loop
                   --<<sleep_loop>>
                   BEGIN
                   execute immediate 'BEGIN '||av_sql||' ; END;';
                   dbms_lock.sleep(an_sleep_seconds);
                   EXCEPTION
                        WHEN OTHERS THEN dbms_output.put_line( 'Exception caught, sleep '||an_sleep_seconds|| ' second(s), try again.'||substr(sqlerrm,1,250) );
                        dbms_lock.sleep(an_sleep_seconds);
                   END sleep_loop ;
              end loop ;
         EXCEPTION
              WHEN OTHERS THEN RAISE ;
         END run ;
    END pkg_jl ;

    ionelion wrote:
    The business behind this 1 second job is an external process (a box passing by a bar code reader generates an event that is inserted in an event table TMSEVENTS). So this process only inserts rows into a table? When and how does it commit that insert? Does it do any other database activity/transactions?
    The event generated by the external process will be processed by a PL/SQL procedure in my database and may take longer than one second.Why does this PL/SQL procedure only need to process a single row at a time? Why cannot it pick up a number of rows to process and process these in a fast and tight processing loop?
    What the DBA has complained is the number of connections/unit of time created by the oracle job. He suggested that instead of 300 connections in 5 minutes (generated by DBMS_JOB) to use a new dbms_job that will execute every 5 minutes and call the same SP in a loop for 300 times with a sleep period of 1 second.
    So my question is what implementation is better for oracle? 1 sec job or 5 min job?Neither. If I understand your process flow correctly, there is an external process throwing data into the database. This data needs to be processed as close to real-time as possible.
    I would use Advance Queue feature of Oracle. I would want background server processes that listen on a queue for data process requests, dequeue the request, and process the request. This then provides a pool of processes that can dequeue and process requests - in parallel.
    The external process now needs to enqueue processing requests - where that request will be dequeued and processed by this pool of processes.
    This provides a scalable architecture. More external processes can be used to submit (enqueue) data processing requests. More dequeue processes can be created to allow for more requests to be processed in parallel. This also supports RAC - allowing you to scale horizontally (more db servers) and not just vertically (increase the size/capacity of the single db server).
    You can roll this yourself, without using AQ. The issue is serialisation of the server worker processes looking at whatever object (e.g. table) for work to do (new rows inserted and not yet processed). You will need to find a way where there's minimal serialisation when multiple workers look for new rows to process, and process the oldest rows first. Not an impossible task, but a complex one - that using AQ eliminates as it handles that complexity for you.
    And if I'm not mistaken, AQ is also available on XE. Which means this type of processing architecture you can use on XE and scale all the way up to the Enterprise and RAC editions of Oracle.

  • PL/SQL Wrap utility

    Is there any information available on oracle's site about security with the wrap utility provided by oracle.
    Can it be un-wrapped, can I get some pointers to it withing the oracle site.

    Ten seconds work with "Search" on the 9i documentation pages gives this:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96624/c_wrap.htm#138
    You can't "unwrap" previously wrapped code, as that would defeat the point of wrapping it in the first place.

  • Encryption of pl/sql package/procedures/function code

    Is it possible to make the code inside a package/procedure/function un readable to other users.
    As is some of the api package body code in portal ?
    thanks in anticipation.
    SD,

    PL/SQL Wrap Utilityhttp://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/c_wrap.htm#LNPLS016
    Note, however that you cannot revert back to original un-wrapped code from a code that has been wrapped. You would need access to the original source files to get the original source code.

  • Not able to compile wrapped package bodies.

    Hi All
    Can anybody pls help me finding me the reason why I m not able to compile .plb (wrapped package body). There are no compilation errors. But when I run the .plb file (as @xyz.plb), sqlplus window hangs. No error shown. Everytime I had to close the window after waiting for 8-10 minutes.
    This is happening only with 11 files out of 200.Rest were compiled.
    Any ideas? Do we have any other way to wrap than using pl/sql wrap utility or pl/sql plug-in for wrapping(which is actually the same as former)??
    ThanksInAdvance!!
    Keep striking the iron until it's hot!

    yes, I did check for locks from pl/sql developer only. No Locks.
    I waited for 10 minutes for a 6 kb .plb file to get compiled. But had to close the session after that.
    I am using oracle 10g, pl/sql developer 7.1.0.1337
    sql*plus Release 10.2.0.2.0

  • Unwrap Pl/sql stored procedure

    Hi,
    I have a pl/sql wrapped stored procedure which needs to be unwrapped. I know its kind of difficult. Has anybody ever tried doing it or achieved some positive results. Please let me know. I dont have the source code with me and hence the situation. thanks...

    I dont have the source code with me and hence the situation...Unfortunately , your code cannot be modified.....You cannot unwrap your code.
    That's why Oracle insists on keeping a copy of the wrapped routine in a readable text format....
    Simon

  • Wrap utility security strength

    Hello,
    I am using the PL/SQL wrap utility to protect my source codes
    that contains an encryption key. But my client wants to know
    what is the security strength of the wrap utility. Anyone has
    that information?
    Thanks a lot,
    Zhen

    hi you can buy a security software that prevents any persons from accessing to your codes.
    Beau

  • How to make one map dependent on another ?

    Assume you have 2 maps - M1 and M2
    How to execute M2 automatically after successful run of M1 ?
    or if I have process flows PF2 start after success of PF1 without a manual intervention
    I looked at scheduling,.You can only set timing there but don't know how long your map runs.
    Thank You

    To make map dependant of another map you can use process flow. In process flow you can call M2 only if M1 is success. If M1 is failure you may exit the process flow.
    Am not sure how it will work for process flow. May be writing a 3rd process flow and call PF1 & PF2 within it based on success status? or write some PL-Sql wraper procedure for the same???!!! give it a try.

  • Calendar Display Column Content Ordering

    I would like to order the items returned to be displayed for a day by their values or a different column? The executing SQL wraps my source and adds an order by for the date. I don't see a way to modify that in 3.1.
    e.g.
    select date, name, name_sort from table order by date, name_sort
    becomes
    select * from (select date, name, name_sort from table order by date, name_sort) where <date range test> order by date
    I can have 0 to 88 different names for any given date. I want to display the name, but order the names by the name_sort column.
    Thanks,
    Ed

    Ed,
    Your query for the calendar could look like this
    SELECT ename, hiredate  +  rownum / 24 / 60
      FROM (SELECT   ename, hiredate
            FROM emp
           ORDER BY ename)which will sort the values in ascending order.
    SELECT ename, hiredate  + 1 / rownum / 24 / 60
      FROM (SELECT   ename, hiredate
            FROM emp
           ORDER BY ename)See this example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:124
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Uploading a csv file through XDB FTP

    Hello
    I'm developing a project where i need to upload a big amount of data, contained in a CSV file, on the file system of a database server and it would be great if the FTP service provided with XDB could be used to achieve such a job.
    Does somebody know if XDB-FTP is able to upload files outside the XML repository and to upload them directly ( without intermediate steps that may generate heavy redo-log generation ) into a file-system on the database server?
    I'd like to consider other good alternatives too, now I'm using a different FTP server but I would like to avoid this dependency.
    Thanks
    Bye Alessandro

    I finally solved the problem using a Java class that launches a daemon listening for an incoming connection, that stores the first stream on a text file and then terminates.
    Definition of the java class
    create or replace and compile java source named SimpleFileTransfer as
    import java.net.*;
    import java.io.*;
    class SimpleFileTransfer {
         private int port;
         private int timeout;
         private ServerSocket serverSocket;
         private int buffSize = 8192;
         private String savingFilePath;
         public SimpleFileTransfer( int port, int timeout, String fname) throws IOException,SocketException {
              this.port = port;
              this.timeout = timeout;
              this.savingFilePath = fname;
              serverSocket = new ServerSocket(port);
              serverSocket.setSoTimeout(timeout);
         public void prepareToReceive() {
              System.out.println("Preparing to receive "+savingFilePath+" on port "+port);
              (new FileWriter()).start();
              //System.out.println("Prepared to receive");
         class FileWriter extends Thread {
              Socket socket;
              BufferedReader in;
              PrintWriter out;
              public void run() {
                   //System.out.println("Server started");
                   try {
                        socket = serverSocket.accept();
                        //System.out.println("Ready to receive");
                        in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                        out = new PrintWriter(savingFilePath);
                        char arr[] = new char[buffSize];
                        int readBytes;
                        while ( (readBytes = in.read(arr,0,buffSize)) >= 0 ) {
                             //System.out.println("Receive data starting with "+arr[0]);
                             out.write(arr,0,readBytes);
                             out.flush();
                        in.close();
                        out.close();
                   catch (IOException e) {
                        e.printStackTrace();
                   //System.out.println("Terminated");
         public static void activateService(int port,int timeout,String savingFilePath) /*throws SocketException, IOException*/ {
              try {
                   SimpleFileTransfer ft = new SimpleFileTransfer(port,timeout,savingFilePath);
                   ft.prepareToReceive();     
              catch (IOException e) {
                   e.printStackTrace();
         public static void main(String args[]) throws IOException {
              int myPort = 21000;
              if (args[0].equals("server")) {
                   activateService(myPort,10000,"C:\\\\D.dat");
              else (args[0].equals("client")) {
                   Socket s = new Socket("database_host",myPort);
                   BufferedReader in = new BufferedReader(new FileReader("D:\\\\D.dat"));
                   PrintWriter out = new PrintWriter(s.getOutputStream());
                   int readBytes;
                   int buffSize = 8192;
                   char arr[] = new char[buffSize];
                   while ( (readBytes = in.read(arr,0,buffSize)) >= 0 ) {
                        //System.out.println("Send data starting with "+arr[0]);
                        out.write(arr,0,readBytes);
                        out.flush();
                   in.close();
                   out.close();
    }Definition of PL/SQL wrapping procedure to activate the daemon on the database
    create or replace
    procedure ENABLE_TRANSFER (
              port in number,
              millis_timeout in number,
              saving_incoming_path varchar2
         ) is
    language java
    name 'SimpleFileTransfer.activateService(int,int,java.lang.String)';Activation of the daemon
    begin
         enable_transfer(21000,10000,'C:\temp\incoming.txt');
    end;Sample call to the main method of the class to work as client for uploading.
    prompt> java SimpleFileTransfer clientBye Alessandro

  • Link to OPEN Window to C: FOLDER on MyComputer

    Hi,
    In an HTML region, how can I put a link to Open an EXPLORER WINDOW to a specific folder on the user computer ( exemple C:)?
    thanks,
    Roseline
    Edited by: Roseline on 26 nov. 2009 09:34

    Unless you want to install a java routine with a pl/sql wrapped around it, you can't run local applications likes windows explorer from a browser..
    Thank you,
    Tony Miller
    Webster, TX

  • Encryption in oracle

    i create a program in my database and
    i want that no one see it source code
    even DBA and my BOSS
    how i can do this
    kuljeet pal singh

    You can use the PL/SQL wrap utility to encrypt source code http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/c_wrap.htm#LNPLS016. Make sure that you keep the actual PL/SQL source in some sort of version control system if you do this-- otherwise no one (not even you) will be able to get the original source code back.
    I would be curious, though, why you would want to prevent people like your boss from seeing your source code. I can understand not wanting customers who are being shipped applications to see the source, but I'm hard pressed to come up with a situation where I would have an ethical reason to prevent my boss from seeing the source.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Java in oracle database

    Hi all..
    Database Version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    I have the following pl/sql wrapped java code in one my package.
    How can i see the "'actual java code"" that it is calling.
    I found this is the class name "com.test.qm.archive.exec" that it is calling, but i couldn't find where can i see the actual java code.
    Please help me with it.
    {code}
    FUNCTION archive_java(i_from IN VARCHAR2,
    i_to IN VARCHAR2,
    i_pipedir IN VARCHAR2,
    i_holdx IN DATE,
    i_keepx IN DATE,
    i_forcepurge IN NUMBER)
    RETURN string_array
    AS language java
    name 'com.test.qm.archive.exec(java.lang.String,
    java.lang.String,
    java.lang.String,
    java.sql.Date,
    java.sql.Date,
    boolean) return oracle.sql.ARRAY' ;
    {code}

    Assuming that PL/SQL Developer doesn't display Java stored procedures...
    The Java source is not stored in the file system. It is stored somewhere in the data dictionary. I couldn't tell you how to extract the source from the data dictionary, though. It's not as simple as grabbing the source from DBA_SOURCE. You might ask over in the Java Stored Procedure forum. The folks over there may be more familiar with the Java stored procedure data dictionary views.
    Personally, I'd tend to just grab SQL Developer and/or grab the source from your source control system.
    Justin
    Edited by: Justin Cave on Mar 12, 2013 3:21 PM

Maybe you are looking for

  • Issue

    while am saving excise invoice am getting an error "Tax code A0 in procedure ZTAXIN IS INVALID can anybody plz guide me on this

  • Pass parameter values for stored procedure in URL, possible?

    Hi, everyone, Our system is Apex4.0.2 in Linux CentOS 5 on Oracle 11GR2, here is the procedure: create or replace  procedure  test_public(Cust_id integer) is begin owa_util.mime_header( 'text/xml', FALSE ); owa_util.mime_header( 'application/octet',

  • [SOLVED]gnome 3.6 menu icons have disappeared!

    I have lost some of the icons in all the gnome applications after upgrade to gnome 3.6. take a look at nautilus. http://imageshack.us/photo/my-images/24 - 10291.png/ Any ideas how to correct it? Last edited by hadrons123 (2012-10-29 14:35:07)

  • Sync not work$

    Everytime i try to sync my phone with itunes it says the syncserver has stopped working can anyone tell me what that is?!?!? and how to fix it?!?

  • Partition tab missing in Disk Utility

    I have a 2011 iMac that came with Mtn Lion.  I have a WD 2 TB external HD that I reformatted, as it came with WinOS.  I formatted it with Disk Utility to MAC OS EXTENDED (JOURNALED).  I have Carbon Copy Cloner (v.3.5.3) and want to partition the exte