Calling unix script using oracle forms

we have to call unix script using oracle forms , a trigger in form calls stored procedure on database
that stored procedure on database calls a oracle shared library
but since the only listener account for oracle on our unix server is oralist , whenever a call is made to the unix script from the oracle form , the unix script is executed by oralist user
but issue that we are having now is since oralist is specific for listening connections from orale we dont want to use this user to establish SFTP on it to avoid any issues with oralist
we want the sftp to be established on soem other useraccount , so is it possible to do something so that the script is executed by an account other that oralist.

I'm not a Linux/Unix specialist, but I think this may work: let your database call a shell script that does a su command before running the actual script:
su - other_account
your_script.sh

Similar Messages

  • Calling UNix Script from portal Form

    Has anyone conquered this issue through jav or plsql. I need to call a unix script from the portal form when I select the insert button.

    I have several very convoluted ways which all work, but I have always thought there should be more straightfwd ways. Fundamentally the easiest way to call something from the Insert button is to add some PL/SQL code before (or after) the "doInsert();" call in the Insert Button event handler.
    What seems to be lacking is the ability to get from pl/sql to the o/s. So until we know how to do that you have to call a method in Java to execute o/s commands - specifically you can use Runtime.getRuntime().exec(cmd); where Runtime is a class in java.lang, and cmd is the actual o/s command (script or whatever).
    How to call this Java is then where you have several options:
    1. Compile this piece of Java into the Oracle DB as a SP.
    2. Deploy this piece of Java within a Java servlet on a 9iAS instance. Then have another SP call this servlet using the utl_http package (begin_request and other sp's within package).
    Which options would depend on several factors including your preference but most importantly whether you have a DB or a 9iAS instance on the machine where you want to execute the script. If you have neither you have a problem. In such cases I have used a standalone OC4J container which has a very small footprint.
    As I said these methods are all quite convoluted and if anyone else has anything better I would like to know (but they work quite reliably).
    Cheers.
    Anton.

  • How to use Java Script in Oracle Forms 10g

    Hello,
    Appreciate if anyone could help me using Java Script in Oracle Forms 10g?
    Thanks
    GM

    Thank you for your reply. I was reading on the metalink that we could use the to call the java script from oracle Forms 10g (Doc ID 265863.1)
    Example:
    WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://www.oracle.com","","location=no,toolbar=no,menubar=no,status=no,"));self.close()','_blank');
    I tried it but it did not open the any window as it claims. Am I missing anything? Is there any IE related setting which I need to modify for the above to work?
    Regards
    GM

  • How we can call or execute a SHELL script through Oracle forms or Reports

    How we can call or execute a SHELL script through Oracle forms or Reports.Its urgent.......

    Use HOST command.

  • How to call .BAT file in Oracle Forms

    Hi All,
    I am using Oracle Forms 6i. We have a .Bat script which moves file from our local directory to the server.
    I want to invoke this .Bat script to be called when I click on a button in the form.
    Appreciate your help here.
    Thanks,
    Madhu K.

    Hi
    I use this in oracle forms 6i: first i assign this path to a variable:
    DECLARE
    v_path   VARCHAR2(1000);
    BEGIN
    v_path:= 'C:\file_name.bat'  then I use the host command:
    HOST( 'cmd /c start' || v_path , no_screen); 
    END;Hope this helps...
    Regards,
    Abdetu...

  • Calling Sql*Loader from oracle Form builder

    How do i call sql* loader from my forms to import the external data in different formats into my existing database?
    Specify the flexibility of sql* loader to import external data from .txt files or .xls files.
    Would be thankful if certain examples are given along with the answer.

    Hi,
    1. First you have to create seperate ctl (Control files) which maps to different file formats
    2. Using Oracle Forms,
    2a) You can use the 'HOST' command to execute the command line ie. In this case executing
    SQL*Loader script
    2b) You also have the feature in ORACLE forms to read text files and load the data into
    ORACLE db.
    This can be achieved by using TEXT_IO package which comes with ORACLE Forms.
    Hope this helps
    Ta
    Shailender

  • How to run a unix script from oracle warehouse Builder

    Hi,
    can any one share the information about, running the unix script or scripts using oracle warehouse builder.
    Regards,
    Ak

    One way is define a workflow. Inside the workflow you put
    1)an external process that "points to" the shell script and then
    2)put the mapping
    The external process must have the "COMMAND" parameter set to the name of the shell script. If the script has parameters you must put them in the "PARAMETERS LIST" separated by "?" (for example, ?par1?par2).
    The path where OWB executes the external process I think is the ORACLE_HOME of the OWB.
    f you don't use workflow, you can try with this more complex solution. I tried with 9i and OWB 9.2 and it's working well.
    You create an autonomous procedure (within a package or not) :
    CREATE PROCEDURE Extract_Email_List
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    And use the sys.shell script that you need your dba/unix admin to install first of all, with a call like that.
    sys.shell('sh ' || txt_dir_name || '/send_email_marketing.sh ' || txt_dir_name || ' ' || email_addr );
    Then you import your procedure into OWB and use it in your mapping with the "pre-mapping" icon (you can set parameters for your proc with constants if you want).
    To implement sys.shell, go to metalink and find "Note:168065.1" - "How to call a UNIX shell script from PL/SQL".
    Once it's done once, it's not so bad. But I would still recommend the workflow approach also..
    I hope this helps.

  • URGENT!!! calling crystal reports from oracle forms 10g

    Is it possible to call crystal reports from oracle forms 10g?
    Can someone help to answer how, if there is a solusion, to call crystal reports from oracle forms 10g.
    Please provide codes with details showing step by step.
    Thanks

    hi
    try something like this.
    DECLARE
    charWinHandle VARCHAR2(50);
    numWinHandle NUMBER;
    BEGIN Set_Application_Property(Cursor_Style,'BUSY');
    charWinHandle := Get_Item_Property('Control.Rep',Window_Handle);
    numWinHandle := To_Number(charWinHandle);
    :Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowParentHandle
    := numWinHandle;
    :Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowState := 2;
    :Item('CONTROL.CRYSTALREPORT1').OCX.Crystal.Crysta lReport.Connect
    := 'DSN=;UID=' || Get_Application_Property(UserName) ||
    ';pwd=' || Get_Application_Property(password) || ';dsq=;';
    Crystal_CrystalCtrl.ReportFileName( :Item('Control.CrystalReport1').interface,
    'C:\Sample_Rep.Rpt' );
    Set_Window_Property( Forms_Mdi_Window, Window_State,Maximize );
    Set_Window_Property( 'MAIN', Window_State, Maximize );
    :reptitle := 'Report Preview Window';
    numWinHandle := Crystal_CrystalCtrl.PrintReport( :Item('Control.CrystalReport1').interface );
    Set_Application_Property(Cursor_Style,'DEFAULT');
    END;NOTE: Change the report name and path according to your required file name and path in
    the "Crystal_CrystalCtrl.ReportFileName" method call. Also, the connection string shown
    assumes that you will use the current USER and PASSWORD for the Form.
    - To make the above Form generic so that you can run any Crystal report from it, then create
    a parameter for the report name and pass it to the Form using CALL_FORM from any other Form.
    Then just replace the file name with the passed parameter.
    -. Run the Form
    If its correct/helpful please mark it thanks.
    sarah
    Edited by: S@R@h on Nov 27, 2009 6:33 AM

  • Calling OAF Page from Oracle forms

    Hi All,
    Is it possible to call an Oracle Forms from OAF page?
    I need to call a OAF page EAM material cost screen from oracle form using personalization.
    Please any one put on some lights on this issue.
    Thanks in Advance,
    Ramesh reddy
    Edited by: user642447 on May 13, 2011 4:33 AM

    Ramesh,
    yes, its possible to call oaf page from oracle forms.
    This has been specified step by step in Developer Guide. Refer it for more.
    Regards,
    Gyan

  • How to call database procedure in oracle forms

    Hi,
    Can anyone describe me that how I'll call database procedure in oracle forms (6i,10g)?
    Thanks in Advance.
    Baloch

    Hi Francois,
    As I created a procedure in database as below
    create or replace procedure For_table (tbl_of in number,st_pnt in number,en_pnt in number) is
    begin
    for i in st_pnt..en_pnt loop
    dbms_output.put_line(tbl_of||'*'||i||'='||tbl_of*i);
    end loop;
    end For_table;
    The above procedure is working fine when I'm using PL/SQL. I call the above procedure as
    begin
    For_table(3,5,20);
    end;
    but nothing happen
    Thanks in Advance.
    Baloch

  • How to call unix script/command in ODI

    Hello Gurus,
    Please let me know how to call unix script/command in ODI?
    Thanks
    Shridhar

    you can call shell script using the OS command found in Package.
    Step 1. Drag the OS Command in the Packgae
    Step 2. In the Text mentiond call the script say for ex sh /opt/path/script.sh
    Step 3. Execute.
    Note : Make sure the User through which ODI is triggering does have the required permission to execute shellscript , also always provide the full path , since scripts are execute from the oracldi/bin folder so its necessary to provide the complete path of the script location.
    Hope this helps.

  • Send email to muliple clients using Oracle Forms 6i through MS Outlook 2003

    I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending to multiple clients at a time while using Oracle Forms 6i through Microsoft Outlook 2003?
    To do this I have written the following code.
    PROCEDURE send_mail IS
    OutlookApp OLE2.OBJ_TYPE;
    NameSpace OLE2.OBJ_TYPE;
    MailItem OLE2.OBJ_TYPE;
    OLEPARAM OLE2.LIST_TYPE;
    Send OLE2.OBJ_TYPE;
    Attachments OLE2.OBJ_TYPE;
    Attachment_dummy OLE2.OBJ_TYPE;
    var1 varchar2(1000);
    Begin
    var1 := :mapiole.message;
    OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,'MAPI');
    NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,0);
    MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLE2.SET_PROPERTY(MailItem,'To',:to);
    OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
    OLE2.SET_PROPERTY(MailItem,'Body', var1);
    --add an attachment
    if :mapiole.attach is not null then
    Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,:attach);
    Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    end if;
    Send := OLE2.INVOKE_OBJ(MailItem,'Send');
    --destroy objects
    OLE2.RELEASE_OBJ(MailItem);
    OLE2.RELEASE_OBJ(NameSpace);
    OLE2.RELEASE_OBJ(OutlookApp);
    END;
    Create a block called MAPIOLE with the following canvas layout:
    To:      ============================
    Subject: ============================
    Message: ============================
    ============================
    Attachment: ============================           SEND      
    When I press the SEND button then
    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    How can I do this?
    Please help me.
    Thanks.

    Do you have a requirement to use MS-Outlook from the Client or simple send email to a list of recipients? If the requirement is simply to send email to a list of recipients, I suggest you use UTL_SMTP from the database to send your email rather than OLE to Outlook on the Users computer. Search OTN or the forums for 'MAILDEMO' and you will find many examples on how to send email from the database.
    Hope this helps.
    Craig...

  • Send email using Oracle Forms 6i through Outlook Express

    I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending single client at a time while using Oracle Forms 6i through Outlook Express?
    To do this I have written the following code.
    PROCEDURE send_mail IS
    OutlookApp OLE2.OBJ_TYPE;
    NameSpace OLE2.OBJ_TYPE;
    MailItem OLE2.OBJ_TYPE;
    OLEPARAM OLE2.LIST_TYPE;
    Send OLE2.OBJ_TYPE;
    Attachments OLE2.OBJ_TYPE;
    Attachment_dummy OLE2.OBJ_TYPE;
    var1 varchar2(1000);
    Begin
    var1 := :mapiole.message;
    OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,'MAPI');
    NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,0);
    MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLE2.SET_PROPERTY(MailItem,'To',:to);
    OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
    OLE2.SET_PROPERTY(MailItem,'Body', var1);
    --add an attachment
    if :mapiole.attach is not null then
    Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,:attach);
    Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    end if;
    Send := OLE2.INVOKE_OBJ(MailItem,'Send');
    --destroy objects
    OLE2.RELEASE_OBJ(MailItem);
    OLE2.RELEASE_OBJ(NameSpace);
    OLE2.RELEASE_OBJ(OutlookApp);
    END;
    Create a block called MAPIOLE with the following canvas layout:
    To:      ============================
    Subject: ============================
    Message: ============================
    ============================
    Attachment: ============================           SEND      
    When I press the SEND button then
    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    How can I do this?
    When I use Microsoft Outlook 2003 It works fine.
    Please help me.
    Thanks.

    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    hi
    plz if there is any attach library recompile it or open the pll and compile it with ctrl+shift+k and ctrl+t.
    sarah

  • Send email using Oracle Forms 6i through MS Outlook 2003

    I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending to clients while using Oracle Forms 6i through Microsoft Outlook 2003?
    To do this I have written the following code.
    PROCEDURE send_mail IS
    OutlookApp OLE2.OBJ_TYPE;
    NameSpace OLE2.OBJ_TYPE;
    MailItem OLE2.OBJ_TYPE;
    OLEPARAM OLE2.LIST_TYPE;
    Send OLE2.OBJ_TYPE;
    Attachments OLE2.OBJ_TYPE;
    Attachment_dummy OLE2.OBJ_TYPE;
    var1 varchar2(1000);
    Begin
    var1 := :mapiole.message;
    OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,'MAPI');
    NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,0);
    MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLE2.SET_PROPERTY(MailItem,'To',:to);
    OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
    OLE2.SET_PROPERTY(MailItem,'Body', var1);
    --add an attachment
    if :mapiole.attach is not null then
              Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
              OLEPARAM := OLE2.CREATE_ARGLIST;
              OLE2.ADD_ARG(OLEPARAM,:attach);
              Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
              OLE2.DESTROY_ARGLIST(OLEPARAM);
    end if;
    Send := OLE2.INVOKE_OBJ(MailItem,'Send');
    --destroy objects
    OLE2.RELEASE_OBJ(MailItem);
    OLE2.RELEASE_OBJ(NameSpace);
    OLE2.RELEASE_OBJ(OutlookApp);
    END;
    Create a block called MAPIOLE with the following canvas layout:
    || To: |============================|
    |
    | Subject: |============================|
    |
    | Message: |============================ |
    |============================|
    | Attachment: |============================| |SEND | |
    When I press the SEND button then
    Microsoft Office Outlook window open containing the message below.
    A program is trying to automatically send e-mail on your behalf.
    Do you want to allow this?
    If this is unexpected,it may be a virus and you should choose "No".
    Yes No Help Button are there.
    If choose No then
    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    else Message send successfully.
    I want not to open Outlook Message window and message automatically send to given email id.
    How can I do this?
    Please help me.
    Thanks.

    Try disable warnings:
    Visual Basic 6 (VBA)
    OlSecurityManager.ConnectTo OutlookApp
    OlSecurityManager.DisableOOMWarnings = True
    On Error Goto Finally
    '... any action with protected objects ...
    Finally:
    OlSecurityManager.DisableOOMWarnings = False
    If you find correct syntax with OLE2 post your code ;)

  • How use oracle forms with oracle database  in a local computer network(client -server homogenious network)

    Hello experts,             
                         I am new in Oracle forms.I am using oracle forms 11g with weblogic server 10.3.5 and oracle database 11g at windows 7 platform.
    I want to call my oracle forms(main  login form) from different computers(windows7) connected in a local network.My oracle database is installed in a server computer.I am not talking about oracle forms hosting in internet.I want to deploy oracle forms in a local computer network connected via LAN cable or wi-fi.
    thank You.
    regards
    aaditya

    In most cases you can copy the same entry found in the tnsnames.ora file used by the database.  In the database home, the file can be found in \network\admin.  Open the file and you should find something like this:
    yourAlias =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
    So in the above, you would need to set the alias (this can be anything you like), the IP address or hostname of the machine where the database is running, the port number used by the db listener, and the service name used by the db.  Most of this will already be set for you if you are copying from the database tnsnames.ora.  So you should be able to just copy and paste.  More information about the tnsnames.ora file can be found in the db documentation:
    http://docs.oracle.com/cd/B28359_01/network.111/b28317/tnsnames.htm

Maybe you are looking for

  • Error messages

    i have just been given a new pc running windows XP and have just downloaded the newest version of itunes and as i try to sync my purchases from my ipod into itunes and error message comes up about three quarters of the way through saying... iTunes ha

  • Installs and lists my Officejet Pro 8500A910n as a "fax-printer" only.

    When installing as a wireless network printer, it only will list the printer as a "HP Fax-Officejet Pro 8500 A910 Network)" printer. Not able to print, only fax. I have selected the complete software download and keeps installing this same way as a f

  • ICR - Process 001 and Process 003 - Setting Ledgers

    Hello, I must create the ledgers (I1 and I3) for ICR Process 001 and 003, but I don't know as setting them. Can you help me? Thank you so much. Best regards Giampaolo

  • Fields not visible after replication ?(hide tick removed)

    Hi experts, I have added fields from LO communication structure to extract structure and i have removed the Hide option in maintain datasource.When i am  replicating in BI those fields are not visible.What is the reason? I am eagerly waiting for repl

  • Ipod locked, can't reset or enter code, Any ideas?

    I have an iPod touch, Gen3 I think. It was locked by entering the wrong pass code too many times. Now it says, "IPOD DISABLED connect to iTunes" I connect it to iTunes and I get an error, "iTunes could not connect to the iPod "name" because it is loc