How to call pakage using Unix script

Hi,
I have created one package in Oracle(contains2 funcation and 4 procedure) which is in in xxx14database.
Now i can execute the package and its working fine at database level.
As per requirement ,i need to create on Unix script to trigger the package.
I have no idea how to create the Unix script to execute the package.
The Unix script need to created in xxxx001 Server.
Can anyone please let me know the template or any link which I can refer to create the same.
Or anyway i can create a script/batch on window and test first in my laptop and use the same script for my project work with required modification
Secondly the application owner asked me to give them both database and Unix script to them so that their database team will test the Package which i developed.
Database script meand the Package body and spec i should save as file.pkb format and send them or i can save them in .sql file and send them
Thanking you all in advance please help its urgent.

Now that you know how to do it ... reconsider whether doing so is a good idea.
There is almost nothing you can do calling from a shell script that can't be done more easily from DBMS_SCHEDULER other than compromise security. Shell scripts connecting to the database are, as shown in the demo code, inherently insecure and, if you get enough of them, make it difficult to cycle passwords on a regular basis.

Similar Messages

  • How can I exit my UNIX script when my PLSQL script in it calls an error?

    hello.
    I hope someone can help with my error handling and exiting-in-the-right-place problem.
    I have several PLSQL scripts that are called from a UNIX script to insert/update employee records in ORACLE Financials.
    At the end of the UNIX script, depending on whether an entry has been created in the errors table should depend on whether the UNIX script stops or not. Trouble is, its stopping too early everytime even though the the record has been inserted correctly. Please can someone either advise on what I'm doing wrong or suggest an alternative..
    This the end of the PLSQL script that inserts the entry into errors table if theres an error..
    WHEN OTHERS    THEN       ROLLBACK;
          err_msg := SUBSTR (SQLERRM, 1, 350);
          insert into kpmg_error_check (concurrent_id,module,narrative,status,creation_date,created_by)
                                values(0,'TEMPLOYEE_DTLS.sql',err_msg,'ERROR',SYSDATE,'Feldman');
         commit; This is the end of the UNIX script that looks at the table..
    echo " "
    echo "**** `date +%H:%M:%S` - Checking if TEMPLOYEE_DTLS.sql ran OK"
    error_check=`sqlplus -s $user_id @$SU_TOP/sql/SUTEMPCHK.sql 1`
    if `echo $error_check` -ge 1
    then
    # Load failed
    echo " "
    echo "**** `date +%H:%M:%S` - TEMPLOYEE_DTLS has failed - check table KPMG_ERROR_CHECK for details.."
    exit 1
    else
    # Load finished OK, if input data file exists, move and rename it
    echo " "
    echo "**** `date +%H:%M:%S` - TEMPLOYEE_DTLS has finished OK.."
    fiThis is the entire SUTEMPCHK.sql script that the UNIX script uses..
    -- Check if any errors have occurred
    SELECT count(1) FROM kpmg_error_check WHERE concurrent_id = &1
    EXITIs it that the above is always returning '1' and so always thinks theres an entry in the errors table?
    Is there an easier way?
    many thanks,
    Steven

    Hi,
    You have to iterate through all pages.marginPreferences:
    var
      myDocument = app.activeDocument,
      allPagesMaPref = myDocument.pages.everyItem().marginPreferences,
      curPageMaPref;
    while ( curPageMaPref = allPagesMaPref.pop() )
      with (curPageMaPref) {
      columnCount = 1;
      //columnGutter can be a number or a measurement string.
      columnGutter = "0";
      bottom = "0"
      //When document.documentPreferences.facingPages == true,
      //"left" means inside; "right" means outside.
      left = "40"
      right = "0"
      top = "0"
      inside = "0"
    Jarek

  • Call a Java API using Unix Script

    Hi SDNers,
    I want to call a Java API using Unix Script. Please suggest what will be the commands in Unix.
    Please help!!
    Thanks,
    Priti
    Edited by: Priti Rani Patnaik on Jul 7, 2010 4:17 PM

    Hi
    Try this
    String[] cmd = {"/bin/sh", "-c", "ls > hello"};
      Runtime.getRuntime().exec(cmd);
    [Other Help|/thread/5425832 [original link is broken];
    BR
    Satish Kumar

  • How to load abap ztable using unix script

    Hi Experts,
    I want to upload the data from excel sheet into abap ztable using unix script. If possible give me a sample coding for this..
    Regards,
    vijay

    hi vijay see the  code below
    REPORT YFTP1 .
    FTP by abap.
    This program passses host, user, source/target
    directory and file parameters to a UNIX script which
    in turn gets the required file from the host by ftp.
    The unix script should look like this:
    #! /bin/sh
    ftp -n $1 << !!
    user $2 $3
    cd ..                      <-- only for mainframe ftp
    get $4 $5
    quit
    placed in the adm path, preferably under
    /sapmnt//exe. In order to make this program
    work please create sapcpic/manager cpic user and
    apply note no. 41770.
    PARAMETERS: HOST(10) OBLIGATORY LOWER CASE,
    USER(8) OBLIGATORY LOWER CASE,
    PASSWORD(8) OBLIGATORY LOWER CASE,
    SRC_FILE(45) OBLIGATORY LOWER CASE,
    TRG_FILE(45) DEFAULT '/usr/sap/trans/data/??????' OBLIGATORY LOWER CASE,
    BIN AS CHECKBOX.
    DATA: JC(8), FLG(1), B(128), PRNAME(128), LOGFILE(30), AAA(40).
    DATA: BEGIN OF A,
    1(12), 2(10), 3(10), 4(47), 5(47),
    END OF A.
    IF HOST = 'zxaq'.
      IF BIN = 'X'.
        PRNAME = 'ftp_bin_vms'.
      ELSE.
        PRNAME = 'ftp_asc_vms'.
      ENDIF.
    ELSE.
      IF BIN = 'X'.
        PRNAME = '/usr/sap/trans/bin/ftp_bin_unix'.
      ELSE.
        PRNAME = '/usr/sap/trans/bin/ftp_asc_unix'.
      ENDIF.
    ENDIF.
    A-1 = HOST.
    A-2 = USER.
    A-3 = PASSWORD.
    A-4 = SRC_FILE.
    A-5 = TRG_FILE.
    CONDENSE A.
    B = A.
    CALL FUNCTION 'JOB_OPEN'
         EXPORTING
              JOBNAME  = 'FTP'
         IMPORTING
              JOBCOUNT = JC.
    CALL FUNCTION 'JOB_SUBMIT'
         EXPORTING
              AUTHCKNAM     = SY-UNAME
              EXTPGM_NAME   = PRNAME
              EXTPGM_PARAM  = B
              EXTPGM_SYSTEM = 'jupiter'
              JOBCOUNT      = JC
              JOBNAME       = 'FTP'.
    CALL FUNCTION 'JOB_CLOSE'
         EXPORTING
              JOBCOUNT         = JC
              JOBNAME          = 'FTP'
              STRTIMMED        = 'X'
              TARGETSYSTEM     = 'jupiter'
         IMPORTING
              JOB_WAS_RELEASED = FLG.
    LOGFILE = '/tmp/ftp.log'.
    DO.
      OPEN DATASET LOGFILE FOR INPUT IN TEXT MODE.
      IF SY-SUBRC = 0. EXIT. ENDIF.
    ENDDO.
    DO.
      READ DATASET LOGFILE INTO AAA.
      IF SY-SUBRC = 0. WRITE / AAA. ENDIF.
      IF AAA = 'FTP completed'. EXIT. ENDIF.
    ENDDO.
    CLOSE DATASET LOGFILE.
    delete dataset logfile.
    now the file is in the application server which you can upload in your internal table and update the database table....
    thnkx
    bhanu

  • How to call serlvet using ftp protocal

    Hai,
    How to call servlet using ftp protocal . if any one having please send that program . because generic servlet will receive any protocal request .

    The basics are to have your Server listen to port 21.
    You would then have to parse the request information to determine what is being asked for and generate an appropriate response.

  • File port query  File transfer from SAP R/3 to Webmethods using Unix Script

    SAP drops the files in the /sapio/ directory and triggers an unix script using File port partner destination.
    Unix script will perform a secure copy of files to Webmethods server.
    If in unix script, error occurs then an RFC function will be called to send an error notification to a person.
    Queries
    1) How is the unix script triggered using the File port partner destination ?
    2) What is the unix command to invoke a report which sends the error notification mail ?
    3) Does SCP command to copy files to webmethods work , if the unix script is placed in /sapio/ directory ? Or whether
    any connection need to be established between SAP and Webmethods server ?

    Hello,
    Since you want to transfer Article Master, it should be a Retail System. So you should use Message Type ARTMAS. For fullbuild, you can use transaction WDBM and for changes, you can use WDBU.  For changes, you can enable change pointers for required fields using BD64.
    Thanks,
    Venu

  • Trigger ABAP program using UNIX script

    Hi All,
    I want to trigger an Abap program whenever a unix file comes to SAP.
    Can any1 please tellme how to write a unix script to trigger the ABAP program.
    Thanks in advance.

    you will need to create a batch job in SM37 for the ABAP program, and use an event for the start criteria.
    The event can be created in SM62
    Then in unix, you will need to call an executable SAPEVT.
    This will be in the directory /usr/sap/<SAPSID>/SYS/exe/run
    you will need to use the appropriate profile for the SAP system to run the sapevt utility.
    example :-
    sapevt abap_event -t pf=/usr/sap/<SID>/SYS/profile/<SID>_DVEBMGS00_<SYSNAME> nr=00

  • [Win Ill 10] How to Call Javscript using Plugin code?

    Hi All,
    IDE:Microsoft VC++ 6.0
    Illustrator :Version 10
    I want to call a javascript from Vc++ code using SDK .I found a sample code to do this in "ASScripting.h" header.
    Here is the code:
    How to use the Scripting suite:
    /*To execute a JavaScript script inside a host application, you must acquire
    and use a JavaScript engine instance.
    A typical use of the engine:*/
    ASJavaScriptEngineRef jsEngineRef = NULL;
    ASAPI err = kSpNoError;
    err = sScriptingSuite->CreateJavaScriptEngine( &jsEngineRef );
    if ( err == kSPNoError )
    const char scriptText[] = "documents.add();" // Script to create a new document
    const char * result = NULL;
    err = sScriptingSuite->ExecuteJavaScript( jsEngineRef, scriptText, &result );
    if ( err == kASScriptExecutionError )
    // If error during execution, display a dialog containing returned error information string.
    ErrorAlert( result );
    err = sScriptingSuite->DeleteJavaScriptEngine( jsEngineRef );
    jsEngineRef = NULL;
    But this does not work!I think the "CreateJavascriptEngine" method fails to work.Pls advice on this.Any help is highly appreciated.
    Regards
    myRiaz

    Ah, Illustrator 10? I'm afraid I can't help you then, there isn't an ASScripting.h header anymore, at least not in the CS3 SDK (nor in the CS2 SDK I believe).
    If you're trying to use it in AI10 or CS it should still work I think. Beyond that, I have no idea. I'm not sure what the replacement is supposed to be.

  • Changing the filenames using unix script

    Hi,
    I have a scenario where I have to change the file names on the Receiver CC using a unix script and add date and timestamp to the file name
    this is what I'll be writing to filename_01.xml I need to change that to newfilename_01_MMDDYYYY_HHMISS.xml
    the 01 in the file name is the counter, so I might having more than one file where 01,02, etc will represent the counter on the filename.
    Any help is really appreciated.
    Thanks,
    Joe.P

    you can try this
    create the field called filename in target
    use a costant and concat it with the out out of UDF( or some functon avaleiable counter) which will genereate numbers like 1,2,3,4,5,6 and send this filename_01 to the output field and use this in the variable substution to genreate the filename by the CC
    if you dnt want to send this fieldin output file then specify that fieldname in CC length as 0

  • Calling maxl from unix script

    Hi guys..I want to call a maxl script from a unix script. i am using ksh shell in unix..
    Can anyone give me the syntax from this..I am not very familiar with this.

    Actually I found there was an Esscmd.sh file too.that's why wanted to be sure about the option of esscmd.
    And would these scripts accept parameters like this:
    <path>Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin/startMaxl.sh /maxl-Path/script.mxl 1 2
    and if we place & after the script name would it be a nohup process and run the next ones parallely??:
    <path>Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin/startMaxl.sh /maxl-Path/script1.mxl &
    <path>Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin/startMaxl.sh /maxl-Path/script2.mxl &
    Sorry if my questions seem stupid.
    I know very little about this tech and just want to clear any confusion and know as much as i can.

  • Advantage's using Unix Script

    I'm creating ACH file using program RFPNFC00 which goes and stores in the application server. I need to ping this file from application server to FTP for which i wanna know which one is the best way to do is that with FM  CALL FUNCTION 'FTP_CONNECT' or shall i ask the Unix guy to write a small script to ping the file from app server to FTP.
    Basically can anyone lemme know the advantages and disadvantages of Unix script and ABAP code to ping the file to FTP.
    Regards
    VENk@

    Venkat,
    it depends on the security-configuration in your company.
    If you're authorized use SAP-FTP -> look sample program RSFTP004
    hope that helps
    Andreas

  • How to call webservice using jdev9i

    Hi gurus and experts,
    i need to consume a webservice using oaf. with great effort finally i created stub using axis s/w.
    now i dont know how to use the stub in jdev.where to write the code and what to write.iam strucked :-( .
    since there were no sample tutorial about how to call webservice from jdev9i, iam struggling to make.iam jus a starter.
    and while googling i came to know that stubs can be created using jdev9i .but when i see new-->webservices--web service stub it is greyed out.
    i have 2 questions now:
    1)if stub created using axis can it be used in jdev9i? if yes ,please tell me how? any tutorial links also helps me.
    2)if the stubs should be created only by jdev9i so that webservices can be called using jdev,then please guide me how to make it.
    i need some helping hands from u guys.
    Thanks a lot
    Edited by: 881533 on Oct 25, 2011 2:34 AM
    Edited by: 881533 on Oct 25, 2011 2:37 AM

    Hello sir,
    i got following reply:
    <returnRecordResponse  xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <returnResult>Error_request</returnResult>
    </returnRecordResponse>
    but correct response is
    <returnRecordResponse  xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <returnResult>Success</returnResult>
    </returnRecordResponse>
    can you tell me correction in the code which i have put on the forum?or tell me other way to call webservice?

  • How to call webservice using flex?

    Hello,
    i want to call webservice in flex.i tryied following code.but it is not giving correct response.what is wrong with this code?
    can anybody tell me ,how to call webservice in flex?
    Code:
    <mx:Script>
            <![CDATA[
    public function button1_clickHandler(event):void
         ws.returnRecord(para1,para2);//i am sending two parameter to returnRecord service here
    public function remotingCFCHandler(event:ResultEvent):void
    trace(event.result);
    ]]>
    </mx:Script>
    <mx:WebService
         id="ws"
         wsdl="http://localhost:8500/flexapp/returnusers.cfc?wsdl">
        <mx:operation name="returnRecords" resultFormat="object"
         fault="mx.controls.Alert.show(event.fault.faultString)"
         result="remotingCFCHandler(event)"/>
    <mx:Button label="Go" fontWeight="bold" click="button1_clickHandler(event)"/>

    Hello sir,
    i got following reply:
    <returnRecordResponse  xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <returnResult>Error_request</returnResult>
    </returnRecordResponse>
    but correct response is
    <returnRecordResponse  xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <returnResult>Success</returnResult>
    </returnRecordResponse>
    can you tell me correction in the code which i have put on the forum?or tell me other way to call webservice?

  • How to Call Webservicer using Visuval composure Ce 7.1 server

    Hi ,
    We are created in ABAP , they r exposed in WSDL , if i have to call That web services using visuval composure please ASAP can u send , how to call WSDL In CE 7.1 Serve
    Thnks & Regards,
    Suresh

    Hi
    you can try this links:
    http://help.sap.com/saphelp_nwce10/helpdata/en/9f/9985f72084483cb316a3c2322fb090/content.htm
    (here look for the therm Creating Web Service Physical Destinations that points to :
    http://help.sap.com/saphelp_nwce10/helpdata/en/45/635dd614d73bdbe10000000a1553f7/content.htm
    best regards,
    v s
    Edited by: v s on Dec 4, 2008 12:22 PM

  • How to set volume using Powershell script?

    I would like to know on how to set volume under Window 7 Home 64 bits system using Powershell script.
    Such as 8000 levels as default
    Does anyone have any suggestions?
    Thanks in advance for any suggestions
    Thanks in advance for any suggestions

    Try this.
    Function Set-SpeakerVolume{
    Param (
    [switch]$min,
    [switch]$max,
    [int]$Percent
    $wshShell = new-object -com wscript.shell
    If ($min){
    1..50 | % {$wshShell.SendKeys([char]174)}
    ElseIf ($max){
    1..50 | % {$wshShell.SendKeys([char]175)}
    elseif($Percent){
    1..50 | % {$wshShell.SendKeys([char]174)}
    1..($Percent/2) |% {$wshShell.SendKeys([char]175)}
    Else{
    $wshShell.SendKeys([char]173)
    This works in Windows 8.1.
    Stolen / Modified from
    http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/28/weekend-scripter-cheesy-script-to-set-speaker-volume.aspx, which took me 20 seconds of (apparently) lucky searching.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

Maybe you are looking for

  • Key triggers in forms

    How at add key triggers in Forms.For example : When users click function key "F2" then it should save the record. Thanks Saritha

  • Why am I seeing a "Download Error" message in CC Desktop? Do I have to re-download my apps?

    You may have lost your Internet connection and CC Desktop needs to be online to display status and notifications. You do not need to re-download your apps. Once connectivity is restored, your apps and activity will be displayed.

  • UOM error

    while doing the gr with refe. to PO in migo i am getting error specify at least 1 unit sloc is wm managed and base unit of measurement mentioned in materila master is KG and it is also maintained in the tc CUNI please reply ASAP

  • Setup of axis in 3D graph

    Hi, I just have a (simple) question, I need to set up the right graph (the black one) as the right one (the white one). I want it to show three independent axis (x,y,z), going out from the center (0,0,0), just like in the white graph, but I really ca

  • Help with Weblogic 6 sp1 Custom Realm !!!!

    We are trying to run Weblogic 6.0 sp1 with our current environment (ejb 1.1, custom security realm) We can compile and deploy our ejb 1.1 beans. We wish to start with ejb1.1 and move to ejb2.0 once we can get our custom security working. The JDBC con