Unzip the file sys of operation or execute an Oracle stored procedure shell script

Y at - it a package or something else I can use a procedure stored Oracle to decompress a file of the operating system or run a shell script? Have Oracle 11g 2, Linux Redhat. I am familiar with utl_file to look at properties, open, close, write files, etc., but am looking for a way to decompress a file or run a shell script.

Without papers, and likely or very likely not supported

http://technology.AMIS.nl/Blog/5307/Oracle-database-directory-listing-with-ls-function

There are JVM/Java alternatives to it. Search asktom.oracle.com

Published by: Marco Gralike on August 23, 2011 22:31

Tags: Database

Similar Questions

  • Mutex in the oracle stored procedure... How to get there?

    Hello

    I have the series of insert/update statements in an oracle stored procedure. The stored procedure is called composite Oracle SOA.

    The procedure works like this:

    a. download a request and checks to see if the file is already in the database. If she's here, we update, elsewhere insert.

    b. that I check for 10 tables and make the necessary inserts/updations.

    But sometimes, when I get the huge volume of transactions in the stored procedure, I see this violation of unique constraint violated due to lack of appropriate controls to ensure that no other parallel forum is trying to update the same record.

    How to do this so that no two execution of stored procedure doesn't work on the same record in the same table?

    Thank you!!

    Hello

    you might consider something like this

    create table t1(
      id number primary key,
      action varchar2(10),
      who varchar2(10)
    )
    ;
    
    declare
      p_id number           := 1;
      p_action varchar2(10) := 'Insert';
      p_who varchar2(9)     := 'Session 1';
      --
      procedure update_t1(p_id number, p_action varchar2, p_who varchar2) is
      begin
        update t1 set action = p_action, who = p_who where id = p_id;
      end;
    begin
      -- try to insert or update row for PK p_id
      merge into t1 d using (
        select
          p_id     id,
          p_action action,
          p_who    who
        from dual
      ) s on (d.id = s.id)
      when matched then
        update set d.action = 'Update', d.who = s.who
      when not matched then
        insert values (s.id, s.action, s.who)
      ;
    exception when dup_val_on_index then
      -- insert is no option, update when lock is released
      update_t1(p_id, 'Update', p_who);
    end;
    /
    
    drop table t1 purge
    ;
    

    Scenario (two sessions trying to insert/updated updated for id 1):

    session 1 inserts ("1" "insert" "Session 1") and the data is not visible to the session 2

    session 2 inserts same id but crashes because of the locking session 1

    validation of the session 1

    session 2 insert fails but who manages updating instead

    session 2 commits, values for the id 1 is now ('1' 'Update' "Session 2")

  • You are looking for an application unzip the files on iMac

    You are looking for an application unzip the files on iMac. I can find lots of 3rd party applications, but how do I know that they are safe? When I look in the app store, they say for iPhone or iPad can I use one of these?

    THX

    1. There is usually no additional software to do so; Simply double-click the zip in the Finder. If this method does not work for any reason, use The Unarchiver.

    2 No.

    (140768)

  • Can't unzip the files using the Windows Vista option extract all

    I tried to unzip the files, I have downloaded from the Web site by using the context menu "extract all... "on the file.  I have a Board error saying that the compressed (zipped) folder is empty.  If I try a double click on the file, I get the message that the zip file is not valid.  This has happened to every zip file I tried to unpack so far.  The only files I can unpack so far are those I zipped myself using the context menu "send to folder of Compssed of-->" of Windows Vista.  Any suggestions?

    Hi Eddie Hersh,.

    Thanks for choosing the Windows Vista Forum.

    1 how long have you had this problem?

    2. If it works well before?

    Make sure that the download of the file is not corrupted.

    You can perform the steps in the link below and check if it works.

    Restore and return the file Association in Windows Vista if Original

    1. click on start, and then type regedit in start search and press ENTER.

    2. navigate to the following registry branch:

    NtVersion ntVersion\Explorer\FileExts\ [ext]

    Replace the [exe] with the real extension of the file you want to restore the file type association to return to the default Windows Vista original. If you unsure, simply browse through all the Sub-touche under FileExts.

    3. delete the subkey named UserChoice.

    4. exit the registry editor.

    WARNING:

    Change the settings of the REGISTRY can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the REGISTRY settings configuration can be solved. Changes to these settings are at your own risk...

    Compress and uncompress files (zip files) - http://windowshelp.microsoft.com/Windows/en-US/Help/7050d809-c761-43d4-aae7-587550cd341a1033.mspx

    Kind regards

    Marnie.

  • Pass an array of bytes to the oracle stored procedure

    I have a problem with moving from byte array in Oracle stored procedure as an input parameter by using odp.net.

    Here is the signature of the stored procedure:

    SOMEPROCEDURE(session IN NUMBER, data IN RAW)

    Here is c# code, which calls the procedure:

    var cmd = new OracleCommand("SOME_PROCEDURE", _connection);

    cmd.CommandType = CommandType.StoredProcedure;

    var bt = new byte[]{1,68,0,83,128,1};

    OracleParameter sessionId = new OracleParameter("dbSessionId", OracleDbType.Decimal, new OracleDecimal(_dbSessionId), ParameterDirection.Input);

    OracleParameter data = new OracleParameter("statusData", OracleDbType.Raw, new OracleBinary(bt), ParameterDirection.Input);

    cmd.Parameters.Add(sessionId);

    cmd.Parameters.Add(data);

    cmd.ExecuteNonQuery();

    This code does not (stored procedure throws exception, which cannot receive), because in byte array hadou number 128!, if I display 128 on another number, minus 128, it works great!

    What should I do?

    After some tests I found the solution. Initially, you cannot switch to the array of bytes via the odp.net stored procedure, if the table contains 127 large values.

    Yes, solution: 1. create the wrapper procedure

    procedure SOME_PROCEDURE_WRAPPER (p_session_id in number, p_data  in varchar2)
     is v_data raw(1024);
     rawdata raw(1024); 
     rawlen number;
     hex varchar2(32760);
     i number;
     begin
      rawlen := length(p_data);
      i := 1;
      while i <= rawlen-1
      loop 
     hex := substrb(p_data,i,2); 
         rawdata := rawdata || HEXTORAW(hex); 
         i := i + 2; end loop; 
         SOME_PROCEDURE(p_session_id , rawdata); 
     end;
    

    2 then need to modify the code c# in this way:

     var cmd = new OracleCommand("SOME_PROCEDURE_WRAPPER", _connection);
     cmd.CommandType = CommandType.StoredProcedure;
     string @string = statusData.ToHexString();
     OracleParameter sessionId = new OracleParameter("dbSessionId", OracleDbType.Decimal, new OracleDecimal(_dbSessionId), ParameterDirection.Input);
     OracleParameter data = new OracleParameter("statusData", OracleDbType.Varchar2,@string.Length, new OracleString(@string), ParameterDirection.Input);
     cmd.Parameters.Add(sessionId);
     cmd.Parameters.Add(data);
     cmd.ExecuteNonQuery();
    

    where

    public static string ToHexString(this byte[] bytes)
     { 
         if(bytes == null || bytes.Length == null)
               return string.Empty;
          StringBuilder hexStringBuilder = new StringBuilder();
          foreach (byte @byte in bytes)
          { 
              hexStringBuilder.Append(@byte.ToString("X2")); 
          } 
          return hexStringBuilder.ToString();
     }
    
  • SSL mutual authentication using the Oracle stored procedure

    Hello

    DB version:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    Is possible to perform mutual authentication SSL uses the Oracle stored procedure?
    I read articles and forums saying that it is not a good approach to call the Web service using the Oracle procedure (and I don't know if it's even possible authentication using procs). But I would like to know if it's possible and how.

    In other is words there a way to incorporate the client certificate information into a procedure that calls a Web service.

    I read the articles to do it in JAVA or .net. But please advice how we can achieve using Oracle procedures.

    Thank you.

    934451 wrote:

    Is possible to perform mutual authentication SSL uses the Oracle stored procedure?

    To learn more. SSL what for?

    Oracle PL/SQL only supports client standard TCP sockets. However, interface for HTTP, Oracle PL/SQL also supports HTTPS - which requires the certificates of authentication of the server to be stored in a portfolio of Oracle web and used during the transmission via HTTPS. See the code example {message identifier: = 1925297} for more details.

    I read articles and forums saying that it is not a good approach to call the Web service using the Oracle procedure (and I don't know if it's even possible authentication using procs).

    Forums and articles written by idiots. For idiots.

    And no, I'm not to embellish my response to this pitch that you met. It is false. It is written by ignorant people who don't know ANYTHING about the use of Oracle and PL/SQL. And feel free to forward my response to these idiots. They find me here if they want to argue...

    As an example of how to call a web service, see {message identifier: = 10158148} and {message: id = 10448611}.

  • Oracle stored procedure in the reports

    Hello

    How can I call oracle stored procedure in Oracle reports. The procedure takes a variable of type object and as a parameter out.

    Thank you
    Groult

    Create a package in your report and set a variable of this type of object in the package body.
    Write a procedure in your package that checks if your variable is empty, and if this is the case, call your db-procedure to fill the variable.
    For each value that you want to display in your report, create a functioncolumn that calls the formlery procedure written in your package and then returns the requested of your object type value. In the available build ontop the columns function created fields.

  • Problems to unzip the file in Notepad

    I am trying to unzip a registered ebook which opens in Notepad, but the notebook is full of symbols and signs that make no sense? Can you advise?

    It is supposed to, probably not to open in Notepad. Right click on the file and choose "Properties", and under "file type" in the tab "general", you will see "Text Document (.txt)", "Document of PDF from Adobe (.pdf)", "EPUB (.epub) file" or something like that.
    If she says text (.txt) Document, the zip is probably corrupted, or does not decompress correctly. Download or unzip again to see if it works.
    If she says the Adobe PDF Document (.pdf), open it with adobe reader.
    If it says file EPUB (.epub), download the software Adobe Digital Editions http://www.adobe.com/products/digitaleditions/#fp and open with that.
    If she says something else, search on the web (for example. "epub file open"), or display the file type and extension here, and I'll find one for you.
    I hope this helps.

  • Is there an application that can automatically download and unzip the files in a folder?

    I need to download a zip file on the site of the ECB on a daily basis and extract the zip file in a folder.

    Y at - it no (cron or batch or) operation I could set up on my computer to automate this procedure on a daily basis (assuming that my pc is on)?

    Thank you!
    Andy
     
    Original title: download one file per day and unpack automatically
    http://www.ECB.int/stats/eurofxref/eurofxref-hist.zip?

    Hello

    Thanks for posting your query in the Microsoft Community.

    Want to know if there is an application that can decompress the files automatically after downloading.

    Microsoft has no such a request. You can use your favorite search engine to search for third-party software that could help you to extract the files automatically.

    NOTE: The use of third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Let us know if you have other questions about Windows in the future. We will be happy to help you. We at Microsoft, strive for excellence and provide our customers with the best support.

    Thank you.

  • Can I unzip the file ACL?

    Hello

    I took of an archival repository on my local system in the form of. File ACL.

    Now I want to see the content of the. File ACL. Also, I want to create the same structure all unzip.

    Can someone tell me how to unzip a file ACL >?

    Concerning

    Sunil Gupta

    An ACL file is just a zip file with a different name. You can open it with any zip utility.

    Paul

  • batch file to unzip the files in the 64 bit version of windows vista Home premium

    Hello

    I'm looking to write a batch file to decompress the files. I'm working on a windows vista Home premium 64-bit. any help will be really wonderful.thanx .pdp2907

    Please repost in the scripts Forum: http://social.technet.microsoft.com/Forums/en/ITCG/threads/ where script experts will be happy to help you.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How can I get the file name of a report, I have just stored in the cache

    I would like to be able to get the file name of the report that is stored in the cache directory.

    When a report is created from forms to help

    SET_REPORT_OBJECT_PROPERTY (v_report_id, report_desname, 'fubar.pdf');

    In the cache directory a file is created something like fubarABC123DE.pdf. I guess that part of ABC123DE is the cache key.

    I want to be able to read this file from another process. This process cannot use http, so I can't pass the URL. However, I would still be able to access by using the URL.

    Is all the same to get at the file name?

    The answer is, according to management, you can get the name of the file in the cache, so if you want to access the file you need to store somewhere else.

  • Use the utilities from the Oracle stored procedure

    Hi all

    I use Oracle Import to load the data from .dmp file to Oracle table.

    Test/test leader IMP = Data .dmp fromuser = user1 touser = test tables = emp

    But my requirement is to create a stored procedure that will import data into the table and identify the number of loaded records and how impossible to import.

    Can I keep inside the procedure import statement?

    Thank you.

    No, not possible.

    IMP is an exe like sql more who can evoke to the command prompt.

    If you need all the actions on the imported... table export for example/test table, and then go further.

  • Run the oracle stored procedure in CF8

    I'm running a procedure like this.

    < cfstoredproc procedure = "GetAction" datasource = "test_DSN" >
    < cfsqltype cfprocparam dbvarname "actionId" = "CF_SQL_INTEGER" = type = "en" value = "1" >
    < name cfprocresult = resultset 'actions' = '1' >
    < / cfstoredproc >

    and my stored procedure in oracle.

    create or replace function GetAction (actionId IN ACTION.ID%TYPE)

    OPERATION RETURN % ROWTYPE

    IS
    actions

    ACTION % ROWTYPE;

    Start

    Select *.

    IN actions

    Action WHERE ID = actionId.

    RETURN operations;

    GetAction end;

    then I get the error message like:
    ORA-01008: not all variables

    Please help me on this.

    Thanx

    If you want to return a result set (result of a query) of your PL/SQL, you will have to do what Daverms suggested and your function to convert a procedure and a cursor reference to return your result set. Your procedure should be contained in a package so that you can declare a ref cursor "globally" to make it accessible by CF.

    Oh, and don't forget to change your parameter for cfstoredproc procedure to add the name of the package for the proc name.

    Phil

  • UNZIP THE FILES FOR WINDOWS 7

    Good afternoon

    Is there a free program that unzip files for windows 7.  May have already installed?

    W7 has built in the UN-closing No. zipper, right-click on your ZIP file and "extract all" - http://windows.microsoft.com/en-us/windows/compress-uncompress-files-zip-files

    If you want a better (free) option that allows you, for example, to make the password protected ZIP files - http://www.7-zip.org/

Maybe you are looking for

  • Is it possible to fix long (45 to 90 seconds) delay in the copy of the messages in the sent mail folder?

    Thunderbird is synchronized with IMAP for GMail account. The only time delays occur is to copy messages to the sent mail folder. A question, is memory or storage in Thunderbird?

  • Error reading drive A: and Toshiba companion disk for 115CS

    Hi all I recently bought a second hand 115CS Satellite, and it has windows 95 installed. I soon discovered that my computer cannot read drive a: correctly. Whenever I try to copy/paste/etc, and on a diskette, the computer begins to read the disc, but

  • Problem with WiFi connectivity in windows 8.1

    Hello I have problems with my Wifi on my HP Pavilion 15 Notebook (product number: G2H02PA-#ACJ)I have Windows 8.1 as well as Ralink RT3290 802.11bgn Wi - Fi adapter.My Wifi connection says LIMITED connectivity. I've already complained about my proble

  • L300 Satellite A100 keyboard

    Hello.I want to buy the new keyboard of my Toshiba Satellite A100-529. I have a question: * can I use my Toshiba A100 Toshiba Satellite L300 keyboard? *I saw L300 keyboard and it is same as my (I have keyboard ALT - GR - same size and same location)

  • The ideapad 100 pixel line.

    Hello I just bought a Lenovo Ideapad 15 '' 100 in Lagos in Nigeria and a few days ago. He fell on the height of the size and developed a line of white pixels on the screen. Is it possible to fix or get a replacement screen and how much it costs?