Need way to Wrap my PL/SQL code

Hi
How can I Wrap my PL/SQL code ?
The current Wrap.exe can be Hacked easily using this site http://hz.codecheck.ch/UnwrapIt/Unwrap.jsp.
what is the best way to hide Wrap my PL/SQL code in DB.
Thanx
Rafeek Abd Elmonsef

reemax wrote:
please where can I download "plsql developer 10g version 2000 release 10.2.0.2"There's no point downloading a GUI to do it for you, all that does is call the Oracle WRAP functionality.
There's only the one way to wrap PL/SQL code. Just because it can be unwrapped doesn't mean that everybody will have the ability to unwrap it. If you're really that concerned about people getting your source code then you shouldn't release it in any format. At the end of the day, if it's packages that are being supplied to a customer, wrap them and have appropriate copyright and reverse engineering agreements in place, then if your code gets stolen, you can take legal action.
You can get some tools (I've seen them but never used them) that help to anonymise your code, by renaming all the variables etc. to nonsensical ones such as a,b,c,d etc. (just like some people's coding I've seen LOL!), so if you were to do that and then wrap the code, if anyone does unwrap it, it will be harder for them to understand what the code actually does.

Similar Messages

  • Should we be 'Obfuscating'/wrapping our PL/SQL code?

    Versions:10gR2, 11G, 11GR2
    We are a software development firm in Retail Domain. We have around 35 packages, 80 procedures and functions. Currently none of our PL/SQL source codes are hiddent('obfuscated'). Is this a professional approach?
    If the client faces an issue with our code and when they send us the exp dump file to reproduce this issue. We wouldn't even be able see let alone debug the code. Right? Are there any other disadvantages with Obfuscation?

    Jiri in SF wrote:
    I would really appreciate of Oracle would provide code to their own packages. For example UTL_MAIL has issues for some SMTP servers, why I cannot take source code, improve it the way I want and then use it (of course I would not expect oracle to provide support for changed code).UTL_MAIL is perhaps a bad example. The code can be unwrapped - and the resulting source does not look good. The API itself is designed poorly IMO.
    Instead of rewriting UTL_MAIL, I would rather see it redesigned. For example, the existing API for example does not allow you to view the Mime payload to send via the DATA command at all. This is essential for debugging purposes.
    What about wanting to create a valid e-mail (Mime) that you want to deliver via another protocol (e.g. IMAP)? The API should enable you to create that and then select to use the payload without necessarily transmitting it via SMTP.
    Despite my dislike for Microsoft the company, I've always found their API sets logical, sensible and easy to use. Unfortunately the same can often not be said from the supplied PL/SQL package interfaces from Oracle. :-(

  • Wrapping the PL/SQL Code

    Can anybody pls advise on how to unwrap a wrapped SQL procedure?
    For example i wrap one procedure, and i get .plb object code for the SQL file. How can i revert back to the code, if i have only the .plb file?
    Thanking in Advance
    Rajeev

    Hi,
    Unwrapping cannot be done.
    Wrapping is like creating a exe file.
    Using the plb file u can not get the original procedure.
    There is no Unwrapping in Oracle.
    I think Oracle never provides Unwrapping procedure even in the future.
    Regards
    Kiran

  • Including an Expression in SQL Code with Columns from a Table

    The code under MY CODE will not work. Getting error saying 00922-from keyword not found where expected..
    In the examples I looked up, the months_between function was written as a select statement like:
    Select
    months_between (sysdate,me607.mbr_dob) / 12 as date
    from mbr_exp me607
    Can anyone help me with the syntax I need to include this with my SQL code as below?
    Thanks..
    MY CODE:
    Select
    me607.mbr_dob,
    months_between (sysdate,me607.mbr_dob) / 12 as date
    from mbr_exp me607

    -date- is an oracle keyword and cannot be used as a column name
    SQL> select sysdate as date from dual
    select sysdate as date from dual
    Error at line 1
    ORA-00923: FROM keyword not found where expectedeither do
    select sysdate as "date" from dualor use a diffent colum name.

  • How to 100% Protect PL/SQL Code By Wrapped in Oracle Database 10g R2

    Hello,
    Is Possible to 100% Protect PL/SQL Code By Wrapped in Oracle 10g R2 ?
    If it is not possible by wrap in oracle 10g R2,
    Please, let me suggest, how i will be able to 100% protect PL/SQL code in Oracle Database 10g R2.
    Because, I have lot of functions, procedures & package's in my project.
    Which is running in field filed.
    So, i have needed to protect 100%.
    Also, will i convert to al functions, procedures & package's to .pll file ?
    And .pll file to .plx file?
    Is it possible to convert .plx file to .pll file ?
    Please, let know any better solutions in this case....
    Regards
    Mehedi

    Hello,
    No, wrapping is not a 100% secure method. It could prevent your code from amateurs, but not from professional hackers. Look at the article http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/wrap.htm#BEHGBJAA
    It says: "•Wrapping is not a secure method for hiding passwords or table names.
    Wrapping a PL/SQL unit prevents most users from examining the source code, but might not stop all of them."
    Edited by: apiminov on 03.12.2012 3:23
    Edited by: apiminov on 03.12.2012 3:24

  • Need PL/SQL code for this

    Hi,
    I need a PL/SQL code for this one...
    Let me know if something is not clear...
    1) The table CLOB_CLOBJECT_CDA has the columns described below...
    Explaining only those fields which are important in this context
    -- CDA_STEP_ID : Basically a Sequence
    -- CLOBJECT_SOURCE1_ID : Every id has got a set of records
    -- CLOBJECT_SOURCE2_ID : Every id has got a set of records
    -- LVL : There are total 8 levels..
    This is the main aim :
    1) There are total 16 million rows..(limited to 10 rows here)
    2) We need to go through level by level (LVL column) & insert the intersection records (CLOBJECT_SOURCE1_ID intersect CLOBJECT_SOURCE2_ID)
    into another table...but this is how it goes..
    Level (LVL column) 3's basically have CLOBJECT_SOURCE1_ID as level (LVL column) 2 CDA_STEP_ID's..
    (consider the statement --** where CLOBJECT_SOURCE1_ID = 285 which is same as 1st insert statement step id)..
    The above process goes for next levels until 8..(so have to use loops)
    So for ex :
    We go through the first insert statement and insert the insertion records only when both CLOBJECT_SOURCE1_ID & CLOBJECT_SOURCE2_ID has got records ..
    If we don't find any records for both of them we should skip the corresponding step id when we go to the next levels...
    Let's go through the 1st insert statement...
    -- We have CDA_STEP_ID = 285 & two sources CLOBJECT_SOURCE1_ID as 19 & CLOBJECT_SOURCE2_ID as 74...
    -- We see the table CLOBJECT_COUNTS & check whether we have counts for both 19 & 74 ..(In fact we insert counts into this table only if they have records)
    -- If so, we insert the intersection records into CDA_MRN_RESULTS ( we do have counts for both of them..) with CDA_STEP_ID 285...
    -- Then we insert the step id which is 285 along with the count into CLOBJECT_COUNTS..
    Let's go through another insert statement...
    -- Consider CDA_STEP_ID = 288 which has two sources CLOBJECT_SOURCE1_ID as 19 & CLOBJECT_SOURCE2_ID as 92...
    -- We see the table CLOBJECT_COUNTS & check whether we have counts for both 19 & 92 ..(we have records for 19 but not for 92)
    -- So we should not proceed with this..& also skip all those records (future records with increasing levels..basically level 3's) which have got 288 as CLOBJECT_SOURCE1_ID..
    (As said earlier that the present CDA_STEP_ID will always be CLOBJECT_SOURCE1_ID in the next level)...
    I wrote the following code which is after the statement...
    Let me have the create & insert statements here..
    create table CLOB_CLOBJECT_CDA
        CDA_STEP_ID           NUMBER,
        CDA_ID                NUMBER,
        CDA_SEQ_NUMBER        NUMBER,
        CLOBJECT_SOURCE1_TYPE VARCHAR2(3000),
        CLOBJECT_SOURCE1_ID   NUMBER,
        CLOBJECT_OPERATOR     VARCHAR2(3000),
        CLOBJECT_SOURCE2_TYPE VARCHAR2(3000),
        CLOBJECT_SOURCE2_ID   NUMBER,
        LVL                   NUMBER
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (285, 285, 1, 'CLOBJECT', 19, 'INTERSECT', 'CLOBJECT', 74, 2);
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (286, 286, 1, 'CLOBJECT', 19, 'INTERSECT', 'CLOBJECT', 75, 2);
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (287, 287, 1, 'CLOBJECT', 19, 'INTERSECT', 'CLOBJECT', 91, 2);
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (288, 288, 1, 'CLOBJECT', 19, 'INTERSECT', 'CLOBJECT', 92, 2);
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (4869, 4869, 1, 'CDA_STEP', 285, 'INTERSECT', 'CLOBJECT', 91, 3);  -- **
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (4870, 4870, 1, 'CDA_STEP', 285, 'INTERSECT', 'CLOBJECT', 92, 3);
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (4871, 4871, 1, 'CDA_STEP', 285, 'INTERSECT', 'CLOBJECT', 93, 3);
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (4880, 4880, 1, 'CDA_STEP', 286, 'INTERSECT', 'CLOBJECT', 91, 3);
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (4881, 4881, 1, 'CDA_STEP', 286, 'INTERSECT', 'CLOBJECT', 92, 3);
    insert into clob_clobject_cda (CDA_STEP_ID, CDA_ID, CDA_SEQ_NUMBER, CLOBJECT_SOURCE1_TYPE, CLOBJECT_SOURCE1_ID, CLOBJECT_OPERATOR, CLOBJECT_SOURCE2_TYPE, CLOBJECT_SOURCE2_ID, LVL)
    values (4882, 4882, 1, 'CDA_STEP', 286, 'INTERSECT', 'CLOBJECT', 93, 3);
    create table CDA_MRN_RESULTS
       CDA_STEP_ID      NUMBER,
      MRN              NUMBER,
      INSERT_DATE_TIME DATE
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (19, 1, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (19,  2, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (19,  3, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (74,  1, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (74,  2, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (74,  4, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (75,  1, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (75,  2, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (75,  6, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (91,  2, to_date('19-10-2011', 'dd-mm-yyyy'));
    insert into cda_mrn_results (CDA_STEP_ID, MRN, INSERT_DATE_TIME)
    values (91,  3, to_date('19-10-2011', 'dd-mm-yyyy'));
    create table CLOBJECT_COUNTS
      CDA_STEP_ID    NUMBER,
      CLOBJECT_COUNT NUMBER,
      DATE_TIME      DATE
    Insert into CLOBJECT_COUNTS values (19,3, to_date('19-10-2011', 'dd-mm-yyyy'));
    Insert into CLOBJECT_COUNTS values (74,3, to_date('19-10-2011', 'dd-mm-yyyy'));
    Insert into CLOBJECT_COUNTS values (75,3, to_date('19-10-2011', 'dd-mm-yyyy'));
    Insert into CLOBJECT_COUNTS values (91,2, to_date('19-10-2011', 'dd-mm-yyyy'));The output goes into two tables...
    CDA_MRN_RESULTS : O/p of intersection records between source1 & source2 id
    CLOBJECT_COUNTS : Step id with counts ...(useful for skipping next level step id's if either of source id has "0" counts)
    Any help is appreciated..
    Thanks..

    I tried to code this..but looping takes a lot of time..I want to skip certain rows where source1_step_id & source_2_step_id are not in clobject_counts table as we proceed to the next levels..Not sure how to skip the rows..
    declare
    cursor c1 (p_level varchar2 ) is
      Select * from clob_clobject_cda
        where lvl = p_level    ;
       TYPE V_TT IS TABLE OF C1%ROWTYPE INDEX BY PLS_INTEGER;
        L_TT V_TT;
        v1 number;
        v2 number;
        v_step_id number;
        v_operator varchar2(100) := '';
    begin
    for i in 2..8 loop
      open c1(i);
      LOOP
           FETCH C1 BULK COLLECT INTO L_TT LIMIT 500;
            FOR indx IN 1 .. L_TT.COUNT
             LOOP
               v1 := L_TT(indx).clobject_source1_id;
               v2 := L_TT(indx).clobject_source2_id;
               v_step_id := L_TT(indx).cda_step_id;
               v_operator := L_TT(indx).clobject_operator;
      Execute Immediate ('Insert into cda_mrn_results Select --+ parallel (cm 128)
                                                      distinct ' || v_step_id || ', mrn, trunc(sysdate) dt from cda_mrn_results  cm
                        where cda_step_id = ' || v1 || '
                        and   cda_step_id in (Select cda_step_id from clobject_counts) ' ||
         v_operator ||
                    '  Select --+ parallel (cm 128)
                                                      distinct ' || v_step_id || ', mrn, trunc(sysdate) dt from cda_mrn_results  cm
                        where cda_step_id = ' || v2 || '
                        and   cda_step_id in (Select cda_step_id from clobject_counts)  ' );
    Insert --+ Append
           into clobject_counts Select cda_step_id, count(distinct mrn),
                       insert_date_time dt from cda_mrn_results  where cda_step_id =  v_step_id   group by cda_step_id,insert_date_time;
       COMMIT;                    
             END LOOP;
           EXIT WHEN L_TT.COUNT = 0;
         END LOOP;
      CLOSE C1;
    End Loop;    
    Commit;
    End;

  • Need to create 500 designs, all identical in every way except for a unique QR code

    Hi there. I am using Photoshop CS6.
    I have a design from which I want to create 500 versions of an image. All will be identical, except for the QR code which will be unique for every one.
    The placement of the QR code will be identical in all of them. It's just the actual QR code that changes.
    Any idea how I can achieve this in an automated way? I have the QR codes in a folder, already created, and I have the design already created. I just need to marry up the 2 now and end up with 500 design files to give to the printers for printing.
    Thanks for any direction on how to do this!

    I think you can do it with variables.   I haven't ever tried it, but someone posted up a link to it a few weeks back when a similar question came up.  I bookmarked it because it looked interesting:
    PS CS5 - Working with Variables | The Complete Picture with Julieanne Kost | Adobe TV
    And here's a walkthrough:
    Using Variables in Photoshop with External Data Source

  • Need a better way than killing connections in SQL Azure - Governor

    I've been pushing the boundaries of  SQL azure (S0 and S1) recently. 
    I'm at a point where normal T-SQL code needs to be optimized for SQL azure, I was surprised that all Microsoft have done was enhance the governor process and kill the connection  rather than slow down the connection, guess this was the easy path to
    use. 
    Simple T-SQL statements like MERGE need to be rewritten to support large data (1 million rows).  Given you need to batch core T-SQL commands you need to answer yourself is this the correct approach.  Also had the same issue using SQL Bulk Copy
    but tweaked a few settings to get around that issue. 
    S0 & S1 still haven't got the same IO as Web/Business edition hence Microsoft need to fix this ASAP.
    Is SQL Azure worth that extra hassle compared with other DB engines?
    Micatio Software Free IIS Azure Web Log App

    Hi Jan,
    Its not the command timeout (for example set as 0 in SQL management studio). 
    I've seen it many times where the last wait type is the LOG GOVERNOR. 
    A few minutes later the status is set as KILLED/ROLLBACK.  I can get around the issue by batching the MERGE statement  and it works fine.  
    I would understand if the MERGE was running for 1-2 hours and I've seen the same thing occur when using a bulk insert command in C# (resolved by limiting the batch size, streaming, etc.).
    The azure version is Microsoft SQL Azure (RTM) - 11.0.9230.176.
    The log governor does kill connections, this is documented on a few sites and MSDN.  LOG GOVERNOR was a SQL Enterprise feature in the standalone product except Microsoft in there wisdom ported it across into SQL Azure to resolve users running bad queries
    on the infrastructure.
    Micatio Software Free IIS Azure Web Log App

  • Need pl/sql code to Encrypted data to decryption formate

    Hi All,
    I have Encrypted data 64 bit formate like
    encrypt
    780D0287
    FA57C55510D258C73DE93059E3DC49EC
    need output as a Decryption data..kindly give me output

    This is your duplicate post...
    Re: Need pl/sql code to decryption
    *009*

  • How to insert sql code in module (not form) other than API?

    I generated module as web pl/sql in Oracle Design Editor 6i. I have different user types with different privileges. I want to do some permission checking before a user can reach the tables. All the help are related to API and Form. Is there a way to execute sql code with out using API?

    Yes, you can add in your own user defined PL/SQL (and JavaScript)at module component and item level. Select the module component in the Design Editor and expand the node until you see "Application Logic" -> Events. Now add your logic. For help on this use the context sensitive help and you should find the PL/SQL help. (or try the topic "About user-defined application logic and Web PL/SQL Generator"
    (Is this the piece you wanted to avoid?) You can also add user defined PL/SQL to the Table API generated code. For this you need to use the Server Model tab. Navigate to the Table and expand the node for the desired table and find the Table TAPI/trigger Logic section. Again, make use of the context sensitive help here.
    Regards
    Sue

  • Which way to go with PL/SQL and XML

    Hi fellows,
    I have a general question to XML on Oracle.
    I read already some parts of the three manuals coming with the online documentation of 9i
    - XML developer kit XDK
    - XML API - XDK and Oracle XML DB
    - XML database developer guide Oracle XML DB.
    Also I wrote already a PL/SQL package using DBMS_XMLGEN to generate XML data from relational Oracle tables.
    Actually I like the simplicity how I can create XML data with this DBMS package but I still missing the features like using a DTD/XML Schema to generate XML data.
    I still don't know what the best way would be to use these features of XML in Oracle.
    Hopefully someone can give me some advise and possibly can point to some code samples so that I can see the proper use of the package.
    How about DBMS_XMLQuery?
    To use this package, would that be the better solution for my problem?
    Any comment much appreciated.
    Thanks
    Fred

    Hi Fred,
    Having written a fair amount of PL/SQL code to generate and process XML in the past years, I can give you my opinion on the matter. If you look at the PL/SQL API's Oracle has been written to handle XML, you will find two types/categories of API's: PL/SQL code based on wrapping java (i.e. DBMS_XMLQUERY) and PL/SQL code based on C (i.e. DBMS_XMLGEN). The first category is usually slower, so I tend to use these only if there are no other options. You can measure execution times by executing the same query using both DBMS_XMLGEN. vs. DBMS_XMLQUERY.
    I usually tend to store xml into relational tables by extracting the xml document in PL/SQL using the functions XMLType data type offers (i.e. extract, existNode, getStringVal, etc) function rather than using DBMS_XMLSTORE for flexibility reason (more control over what's being stored).
    Besides the PL/SQL API's there are some rather neat SQL functions to handle XML (i.e. XMLElement, XMLForest, XMLAgg, XMLAttribute, etc) I like to use to build XML documents that are to complex for DBMS_XMLGEN. But, on the downside, I think these functions might cost considerable amounts of CPU, because behind the scene a DOM-tree is build in the SGA/UGA(?), especially on large XML structures or high concurrency systems. I have not measured this yet, so I say might.
    Further, what I think is lacking from the Oracle API's in general is handing of CDATA sections and the fact that some XML functions default generate "pretty-printing" XML, which can not be switched of as far as I know. In my opinion XML should never be "pretty printed", because XML basically is about data transportation, not about lay-out. CDATA sections are not handled, even worse "<![CDATA[ ]]>" is being escaped (to &lt and &gt) and not properly interpreted when processed back to text.

  • Multiple users need to see some documents in SQL table, PHP

    Is there a way to serve up data for a user based on their group assignment?  I have two SQL tables.  The first one has the user login information (username, password, groupID note: multiple users can belong to same GroupID).  The second table has the data that needs to be shown (file name, date, groupID note: multiple files can be assigned to same GroupID).  I need to be able to serve up the file name and date from the second group based on the groupID assigned in the first table.  I know this should be simple, but for some reason I just can't wrap my head around it.  My site is PHP.   Thank you in advance for any help,

    The GroupID you are using is typically used as an access level and used for access and restriction to pages, but the same principles apply here. I would suggest using three groups, with the third meaning both. This value can be stored in a session variable or used when a recordset from the user table is executed on the page. Use this value in your select statement to choose records marked with the same groupID.
      So you'll have three groups, 1, 2 and  3 with three indicating both. However, in the second table, the groupID in those records will still only be assigned to 1 or 2,  so you'll need an OR statement in the SQL to choose both when the access level is 3.

  • Output of PL/SQL code in Client Machine.

    I am writing the output of PL-SQL code to a file. Later on I will use that output in a UNIX shell script.
    For that I am creating directory object and using the UTL_FILE.fopen and UTL_FILE.put_line functions of UTL_FILE package in Oracle.
    E.G.
    1) CREATE OR REPLACE DIRECTORY MYDIR AS '…………………ANY VALID DIRECTORY PATH IN SERVER……………………………’;
    2)
    DECLARE
    config_file UTL_FILE.file_type;
    lv_i BINARY_INTEGER := 1;
    BEGIN
    lv_i := 2;
    config_file := UTL_FILE.fopen ('MYDIR', 'test.txt', 'W');
    UTL_FILE.put_line (config_file, 'This is test file' || 'lv_i= ' || lv_i);
    UTL_FILE.fclose (config_file);
    END;
    But UTL_FILE.fopen and UTL_FILE.put_line functions in oracle can write only to ORACLE SERVER side files.
    However, I want to write the output of the file to the UNIX box from where I am accessing database (using sqlplus DB_USER_NAME/DB_PASSWORD@DB_NAME).
    Is it possible in Oracle 10g (10.2.0.4.0) to write the output of PL/SQL code in client machine?

    Hi,
    Just an idea. I haven't tried it before in unix server since there's no chance to.
    In Windows you can actually map the specified folder where you want to write the file, so in this case, you just need to find a way on how you can map/mount the folder/directory where you want your file written. UTL_FILE can be used to write files(if the file does not exists) and write text in that file on a directory accross the network as I have done it before in Windows machine.
    Regards.

  • How can i identify the environment name or database name in the PL/SQL code

    Hi,
    I am using UTL_FILE to genearate the files.,
    My problem is, I have to design the common sql file , which can be executed in 2 diffrent environments ( Say QA & DEV ) , with no parameters. It has to identify the environment and based on the environment , it has to generate the concern files.,
    The only change needs to be incorporated is , file names , which will change based on the environment.,
    can nay one tell me , how can i identify the environment name or database name in the PL/SQL code ??
    Raja

    In this case, USEC_GI_DEV.NA.XXXNET.NET is a TNS alias. That alias exists only on the client machine. There is no way to access that information on the database server.
    You would have to find something in the v$database or v$instance table that uniquely identifies the database (and you may need some help from the DBAs to do this because you need to ensure that the data element you choose is compatible with whatever refresh process(es) are used in your environment).
    Now, if you are writing a stand-alone SQL*Plus script, SQL*Plus, as a client tool, does have access to the TNS alias in later versions. But that is a client-side determination, not a server-side determination.
    Justin

  • To run a piece of PL/SQL code,  in TT  is much slower than   in ORACLE.

    A piece of PL/SQL code , about 1500 lines, package is named rtmon_event, function in it is named rtmon_SHOLD_CUS_RPT;
    the PL/SQL code is run in ORACLE.
    Now I want to get fast speed, I think of TT.
    I rewrite the PL/SQL code by grammer in TT.
    But the speed in TT is much slower than the speed in ORACLE.
    In ORACLE, to run the PL/SQL code, it need 80 seconds; but In TT, to run the PL/SQL code, it need 183 seconds;
    How can I resolve the problem?
    Btw: there are some joins of 2 tables, or 3 tables in rtmon_event.rtmon_SHOLD_CUS_RPT, and some complex DML in it.
    The run method is :
    declare
    a number;
    begin
    a := rtmon_event.rtmon_SHOLD_CUS_RPT ;
    end;
    Thanks a lot.

    The easiest way to view a plan is to use ttIsql and issue the command:
    explain SQL-statement;
    For example:
    explain select a.ol1, b.col2 from taba a, tab b where a.key = b.key;
    See the documentation that 'hitgon' pointed you to to help you interpret the plans.
    Chris

Maybe you are looking for

  • Crazy purple pixels cant tell if hardware or software.

    just out of nowhere pixels on my screen turn purple. when im watching somthing with video you can really see how the pixels bounce around (lines, blurryness). i archived and installed, same issue. it just seems to turn whole shapes purple somtimes. L

  • ITunes won't open after I downloaded 11.2

    I've hemmed and hawed about updating my iTunes for a while, and the latest glitch made me wish I listened to my instincts. After upgrading from 10.7 to 11.2, iTunes keeps crashing within a few seconds of its opening. Here's the 11.2 Windows error mes

  • Change internal table values in background job

    Hello All, Currently we have a report which is  running in background job. Because of error in one PO (error in header status), the job is getting cancelled in production. Is there any way, we can exclude this PO in debugging from the internal table.

  • Error connecting to itunes

    My 2nd generation apple Tv for some reason no longer connects to itunes -- it on the network as Netflix, YouTube etc.. all work. I've logged out and back into iTunes multiple times... it says it's unable to connect to iTunes. What gives?

  • Sun Identity Server on Windows 2003?

    When will the Sun Java Systems Identity Server be available for Windows 2003? Thanks, Eoin