Host OS command line call from dbs procedure

Hi
I am using Win2000 server and 8i, I want to execute a host os command in the middle of a database procedure but do not know how.
I did a search here and did not find anything.
Any help greatfully received.
cheers
Tony

You just did search hard enough :)
Host commands

Similar Messages

  • ORA-06502 when calling from a procedure

    HI,
    I have a procedure(p1) inside a package that queries a table and send out the result based on the input paramater value. OUT variable is of same type as the table column(using %type), column size is varchar2(4000). This procedure is called from another procedure(p2) and sends out the result to Java Page to display the results at front-end.
    Problem is when application runs and p1 is called I get the following error message,
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Length/size of the character string queried from table is _1747_ that is within the limit of 4000 chars. If I limit the output to just 500 using substr, I don't get any error but adding a single character startes throwing error. OUT variable in both p1 and p2 are declared as table.column%type and error comes from p1 only as confirmed by the error log.
    When I call p1 or p2 from a declare block, I don't get any error.
    This has really confused me and I am not able to find any reason for this difference in behaviour.
    Request to help me in understanding what could be the issue here.
    Oracle version used is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    -Thanks in Advance.

    CREATE or replace PROCEDURE p1
    ( l_id IN VARCHAR2
    , l_str OUT VARCHAR2
    ) IS
      l_temp VARCHAR2(4000);
    BEGIN
      SELECT Response_Message INTO l_temp FROM t1 WHERE Response_ID = l_id;
      l_str := l_temp||'10 symbols';
    END;
    CREATE or replace PROCEDURE p2
    ( l_id IN VARCHAR2
    , l_str OUT VARCHAR2
    ) IS
    BEGIN
      p1(l_id, l_str);
    END;
    /no errors in procedures, but
    DECLARE
    resultstr VARCHAR2(1000);
    BEGIN
      p2(58, resultstr);
      DBMS_OUTPUT.PUT_LINE(resultstr);
    END;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "P1", line 8
    ORA-06512: at "P2", line 6
    ORA-06512: at line 4Procedure is called with small variable.
    Try check all calls and all procedures for size and check if there are string concatenations.

  • Command line calling

    Hello everyone,
    I am a PhD student in Stockholm, studying VoIP technology. I am in the middle of writing my dissertation, about command line calling.
    As I'm doing my researches, I've already found some very interesting research material, such as this page:
    XxXwww.voip-sip-sdk.com/p_251-how-to-use-the-command-line-caller-example-with-ozeki-voip-sip-sdk-voipXxX (cancel the X-s)
    It would be great to find someone to discuss this program, or maybe a whole group, because it would really help me with moving on.
    Any advice is welcome!
    Thx
    gemma

    >> The problem is the how to call this loader command remotely from our file adapter OS command line.
    The below link might be helpful ...
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature

  • Hide oracle password on Unix command line call?

    Does anyone know whether you can hide the password for a command line call to rwrun60 under Unix? For other Oracle products like sqlplus you can hide the password by supplying it using the redirection operator. i.e. sqlplus userid @script <<EOD and then put the password or password@sid on the next line and then EOD on the 3rd line to end the redirection. This virtually hides the password from anyone able to look at processes on the system. Can this also be done for rwrun60? If you just put the userid after userid= will reports prompt you for a password?

    Take a look at http://java.sun.com/features/2002/09/pword_mask.html.
    Hope this helps,

  • How to run a command line window from code?

    In an application I need to run a dll file with a few arguements. These arguements can be given in the command line window. The execution of the dll file will return a string that i need to get (for the parsing etc).
    1. How can I open a command line window from the Java code?
    2. How to run commands on it?
    3. How to get the results of the commands from the command line into my program?

    In an application I need to run a dll file with a few
    arguements. These arguements can be given in the
    command line window. The execution of the dll file
    will return a string that i need to get (for the
    parsing etc).
    A dll is used by other programs. It is not possible to run it from the command line.

  • How to hide the command line arguments from solaris process

    Hi All,
    When I execute a JAR application from a java file using the Runtime.getRuntime, the command line arguments (user ID and Password details) which I passed for executing the application displayed on Solaris process (ps -ef).
    Could anybody please help me, how can I hide either the process or the command line arguments from the Solaris process?
    I cannot pass any asterix or any special character in place of password, because the executing application doesn't have any functionality to retreive the password which send as asterix characters.
    Please help me
    SumodeV

    Thanks for all the response.
    I have created a design and implement the functionality which executes the JAR application in Solaris environment without showing any details in the process details.
    I have used the Java Reflection method, which invokes the JAR application. I am sharing the details here for all those who looking for it.
    1, Inside the Customer application [Jar File is running for it], collect the necessary session details [Using System.get property method]
    2, Create an independent Java file, which should be used to invoke the JAR application
    3, Create the ProcessBuilder object and use a command - execute the Java file [a wrapper code] using normal Java command
    4, Pass the necessary session details to the ProcessBuilder using the environment() function.
    5. Collect the environment values in the independent Java file (Which was invoked by ProcessBuilder) and set details for its environment using System.setProperty.
    6, Use reflection technique to invoke the JAR plugin [which you want to run]. You can use the standard Java functionality to read the MANIFEST file of JAR and load the main class using URLClassLoader.
    7, Invoke the main method of the JAR file, which run the JAR application in Solaris window
    This solution will make sure that the process cannot display any session details in the Solaris Environment.
    Note: Use String[] array while create the command. Otherwise the JAR application cannot pop-up.
    Regards
    Sumode

  • Sql*loader called from stored procedure

    Does anyone know how to invoke sql*loader
    (or any other command line type utility) from within a stored procedure?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by CHARLES SAUER ([email protected]):
    Does anyone know how to invoke sql*loader
    (or any other command line type utility) from within a stored procedure? <HR></BLOCKQUOTE>
    Hi,
    I did something like that on 8i with java.
    Wrote a simple java proc that runs unix commands, which gets called by a plsql proc.
    If you want details, please post back.
    Cheers,
    Paulo
    null

  • File adapter OS command line - Calling a command remotely ??

    Hi,
    We have a scenario where in which receiver file adapter after putting a file on the FTP  , a subsequent XML loader needs to be called which would load data into the client legacy ERP system.
    There seems to be some idea about doing it through file adapter OS command line.
    The problem is the how to call this loader command remotely from our file adapter OS command line.
    Any help would be appreciated ???

    >> The problem is the how to call this loader command remotely from our file adapter OS command line.
    The below link might be helpful ...
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature

  • Command line args from java to C++

    Hi
    I want to pass command line arguemnts argc and argv from java to C++. I have browsed the net and most of them suggested that I declare the jni statement with jObjectarray.
    I saw an example at http://www.csc.calpoly.edu/~fouzi/crossroads/Arguments.c
    It said
    #include "/home/java/linux/jdk118/include/jni.h"
    #include "Arguments.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL
    Java_Arguments_setArgs (JNIEnv *jenv, jobject job, jobjectArray oarr)
    /* obtain the size the the array with a call to the JNI function
    GetArrayLength()                              */
    jsize argc = (*jenv)->GetArrayLength(jenv, oarr);
    /* Declare a char array for argv */
    char const* argv[128];
    int i;
    for (i = 1; i < argc + 1; i++) {
    /* obtain the current object from the object array */
    jobject myObject = (*jenv)->GetObjectArrayElement(jenv, oarr, i-1);
    /* Convert the object just obtained into a String */
    const char str = (jenv)->GetStringUTFChars(jenv,myObject,0);
    /* Build the argv array */
    argv[i] = str;
    /* print the argv array to the screen */
    printf ("argv[%i] = %s\n",i,argv);
    /* Free up memory to prevent memory leaks */
    (*jenv)->ReleaseStringUTFChars(jenv, myObject, str);
    // Increment argc to ajust the difference between Java and C arguments
    argc++;
    // Call a pipeline simulator function which uses command line arguments
    start(argc,argv);
    return;
    That is what I have where the start method is declared like this:
    void start(int argc, /* Argument count */ char argv[] / Argument strings */) {
    But I get a warning when I build the C routine. The warning arises when I am calling the start method.
    The warning says:
    f:\jni\dsaccess.c(711) : warning C4090: 'function' : different 'const' qualifiers
    f:\jni\dsaccess.c(711) : warning C4024: 'start' : different types for formal and actual parameter 2
    Can you help?
    Thanks
    Lakshmi

    1. Your array building looks bogus: Are you missing an index?
    2. You claim to be calling a "method". Are you? Or is it a subroutine?

  • Protecting command-line arguments from glob expansion

    Hi. I am writing a java program and I want to pass it a regular expression as a command-line argument. However, when I use certain regular expressions (e.g. [a-z]*), the java command-line interpreter recognizes this a glob expression and replaces it with names of files from the current directory.
    I am running the java interpreter from a Linux bash command line and I am enclosing the regular expression in single quotes (e.g. '[a-z]*') to protect it from the bash interpreter but the java interpreter is still getting to it. I have read other posts which stated that the java interpreter doesn't do this and that it must be the operating system's command-line interpreter that is doing it but I am sure this not the case.
    Can anyone help? Thank you. Eli

    I am running the java interpreter from a Linux bash
    command line and I am enclosing the regular
    expression in single quotes (e.g. '[a-z]*') to
    protect it from the bash interpreter but the java
    interpreter is still getting to it. I have read other
    posts which stated that the java interpreter doesn't
    do this and that it must be the operating system's
    command-line interpreter that is doing it but I am
    sure this not the case.It most certainly is the case that it's the shell, not Java. If the VM receives the String [a-z]* then that will be one the args.
    What may be happening is that java is actually a shell script, not an executable, and that shell script is expanding stuff.
    Do this: $ type java You'll get something like java is /usr/local/bin/java Then do $ file /usr/local/bin/java or whatever comes back. (Or just try to view the file with a text editor.)
    That file might be a shell script that sets some env vars and than calls the real java executable, passing it "$*" or "$@".
    If that's the case, you can try just invoking the executable directly, or modifying that shell script so that it won't do the expansion.
    If that's not the case, then post the exact command you're running and show your main method (includig code in the main that prints out each element of the args parameter).

  • Mail bounces when sent from command-line, works from PHPMailer, Mail.app

    Recently, any mail send from the command-line (manually, or via automated scripts) is getting rejected. However, messages composed with, say, PHPMailer are getting through. One thing I notice about the bounced messages is that there's no user/sender recorded. Here's a snippet of the log:
    Sep 28 16:45:32 ns postfix/pickup[3275]: 64F57343FF2: uid=501 from=<admin>
    Sep 28 16:45:32 ns postfix/cleanup[6126]: 64F57343FF2: message-id=<[email protected]>
    Sep 28 16:45:32 ns postfix/qmgr[3276]: 64F57343FF2: from=<[email protected]>, size=627, nrcpt=1 (queue active)
    Sep 28 16:45:35 ns postfix/smtp[6130]: 64F57343FF2: to=<[email protected]>, relay=mx.metropolis.ca[65.254.254.57], delay=3, status=sent (250 2.0.0 tylR1X05q2fRSSh0000000 mail accepted for delivery)
    Sep 28 16:45:35 ns postfix/qmgr[3276]: 64F57343FF2: removed
    Sep 28 16:45:54 ns postfix/pickup[3275]: 0A7BB343FFF: uid=501 from=<admin>
    Sep 28 16:45:54 ns postfix/cleanup[6126]: 0A7BB343FFF: message-id=<20070928224554.0A7BB343FFF@mail>
    Sep 28 16:45:54 ns postfix/qmgr[3276]: 0A7BB343FFF: from=<[email protected]>, size=423, nrcpt=1 (queue active)
    Sep 28 16:45:54 ns postfix/smtp[6130]: 0A7BB343FFF: to=<[email protected]>, relay=none, delay=0, status=bounced (mail for gpspolice.net loops back to myself)
    The failure reason given "mail for ... loops back to myself" doesn't seem right, since I haven't changed the DNS settings on this machine.
    You'll notice, the message that is sent has the from= address specified, whereas the other two failed examples don't... I'm not really sure why this is failing all of a sudden. Telus, one of our ISPs, is infamous for quietly making major network policy changes (e.g., blocking port 25 for all outgoing business customers). Any suggestions, or a link to a good SMTP mail server (a la OS X server) tutorial would be appreciated. Thanks.
    ...Rene

    David_x wrote:
    David_x wrote:
    Can you explain why you need any zones in your DNS apart from your own?
    OK, I read a previous post from you which explains your internal setup (mini & xserve), so you are using internal domains for web stuff with your local DNS based on your xserve. I presume your mini is using the xserve for DNS? So although I am not entirely clear about everything that is going on, I'll presume you do need these domains in your xserve...
    Yes, that's all correct. The Xserve does runs DNS, Web and Mail Services, the Mini just runs a couple web sites (on port 8080, fwiw).
    If an external mail server is responsible for a domain which you have in your internal DNS then you have to mirror the public MX records in your local DNS. How MX records work...
    This is what I've done in the DNS Services, I believe...
    For the domain gpspolice.net, your mini will ask your xserve for the MX record. This will resolve to a host name - in the public DNS this is "mail.gpspolice.net". Your mini will then ask your xserve to resolve this host name - in the public DNS this is "209.200.253.29". So ideally, you should have these two records (MX record= mail.gpspolice.net, plus "A" record for mail.gpspolice.net = 209.200.253.29) in your xserve dns. You may get away with using a different MX host name as long as the final IP is the same but better if exactly mirrors public DNS records.
    -david
    I think I've done what you've said, and still certain messages don't get sent out. Basically, any message bound for a .baseloc.net domain doesn't get sent. Here's an example of one message that get's stuck in the queue, along with the console log:
    Message ID: 46A1435234C
    Date: Wed Oct 3 09:57:17
    Size: 11009
    Sender: [email protected]
    Recipient(s) & Status:
    [email protected]:
    temporary failure. Command output: couldn't connect to lmtpd: Connection refused_ 421 4.3.0 deliver: couldn't connect to lmtpd_
    Oct 3 21:00:07 ns postfix/pipe[21091]: 46A1435234C: to=<[email protected]>, relay=cyrus, delay=39770, status=deferred (temporary failure. Command output: couldn't connect to lmtpd: Connection refused_ 421 4.3.0 deliver: couldn't connect to lmtpd_ )
    I have to say, I really appreciate your help. It's helping me understand the proper approach. Anyway, if there's any other information I can provide to help you [help me], please let me know. Thanks again.
    ...Rene

  • MS SSIS command line call "Argument for option 'set' is not valid"

    Hi all,
    I'm tring to execute a SSIS package from command line. Here's the code:
    dtexec.exe /file "E:\TestIS\IntegrationServicesProject1\IntegrationServicesProject1\Package.dtsx" /set \Package.Variables[User::Name].Properties[Value];20150314
    and it return a error saying  "Argument for option 'set' is not valid". I've configure the package and generated a XML file. And do exactly as the official doc says. However, this line of code just doesn't work. If I delete the set option
    and run the package alone, it can be ran. So anyone can help me out? Thank you in advance.

    Hi NoahdeArk,
    In SQL Server Integration Services, string literals must be enclosed in quotation marks. The expression language provides a set of escape sequences for commonly escaped characters such as nonprinting characters and quotation marks. A string literal consists
    of zero or more characters surrounded by quotation marks. If a string contains quotation marks, these must be escaped in order for the expression to parse. For more details, please see:
    https://msdn.microsoft.com/en-us/library/ms141001.aspx
    So to troubleshoot this issue, please refer to the following command:
    dtexec.exe /file "E:\TestIS\IntegrationServicesProject1\IntegrationServicesProject1\Package.dtsx" /set \Package.Variables[User::Name].Properties[Value]; \"20150314\"
    Or
    dtexec.exe /file "E:\TestIS\IntegrationServicesProject1\IntegrationServicesProject1\Package.dtsx" /set \Package.Variables[User::Name].Properties[Value]; \""20150314"\"
    The following similar threads are for your references:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/af4f62e1-b600-49d7-98c2-4a35c9fef404/escape-character-for-set-option-of-dtexec
    http://stackoverflow.com/questions/9612471/dtexec-error-setting-multiple-variables
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Command line execution from a servlet

    Hi,
    I am writing a servlet which performs pgp encryption on the server and then forwards the pgp encrypted file over to an ftp server. My problem is that my servlet does not properly perform the command line command to encrypt the file.
    The command line command to do this would simply be:
    "pgp -e <name of file to encrypt> <name of pgp public key to use>"
    In my servlet I am trying to do it as follows:
    Runtime.getRuntime().exec("pgp -e " + getServletContext().getRealPath("/") + "/files/file.xml" + " webmaster@jmfamily");
    I have tried a similar approach to perform pgp encryption through a standalone application and that works....but this for some reason does not. The command should output a file to disk but this does not occur.
    Does anyone have any ideas? Is there another way to execute a dos command from my servlet? Any help would be well appreciated.
    thanks in advance.

    akulinsk's post helped me realize that my process is actually running...its actually the pgp commandline that's returning an error 21.
    akulinsk i'm gonna give you the dukes cuz it helped me figure out how to check if my process was running or not by the exit code...sorry sjasja, he kinda beat you to it.
    But in case any of you guys know a little about pgp maybe you can still help me with the next part.
    The problem is that my pgp application cannot find the public key which i wish to use to encrypt the file. Even thougth the public key is listed the following is the error I get:
    Cannot find the public key matching userid '[email protected]'
    This user will not be able to decrypt this message.
    Encryption error

  • Running a class with command line parameters from IDE

    Hi there,
    I want to run a class from with the developer IDE. But I also want to pass in some command line parameters. Is there any way to do this from within the IDE, without having to go out to a Dos Prompt or shell?
    Thanks in advance
    Johnny

    In JDeveloper 10.1.3, Project Properties->Run/Debug->Edit
    choose the program that should be be the default run target.
    Click "Tool Settings" in the left pane and then in the right pane under "Additional Runner Options" select "Allow program input".
    It works, but the input works better in the command prompt. The problem is that after entering one input the Input-line looses focus and one have to click it to re-focus. A bug?
    However, this lets me use the "Run" button. All in all, a more efficient way of developing programs.

  • Clear Command Line Console from Java

    Is there a way to clear the dos/shell console screen from a java program (the same way as cls would do in dos ir clear would do in unix) without making a Runtime.exec call??
    Thanks for your time
    wwe8

    What console window are you talking about?
    1- You might be starting a java application in a console window.
    2-Or it might be another console window.
    3-You might be starting a console window in java via Runtime.exec().
    For 1 and 2 you would need a JNI, platform specific solution. I believe the java testing tools do this, so if you got one of those it might provide an interface for this.
    If 3, then you would use the input stream to pass the command to the window.

Maybe you are looking for

  • Vendor master upload mapping issue in LSMW

    We need to upload Vendor Master Data and it contains 72 fields we identified 69 fields for mapping through standard program (RFBIKRK0) through Batch Input in LSMW. We are having issues to identify three fields which belongs to Address and these are n

  • Difference in Fiscal year start value under Asset history sheet

    Dear Experts, When I run the report S_ALR_87011990 for April and May the report should show the same FY start values. But you will notice that three classes of assets are showing different values. Z310, Z500 and Z510. What could be the reason for thi

  • How can i get iOS 5 in mi iPhone 3GS?

    I need to downlode iOS 5 but i don't now How 

  • SLD system has not been assigned ? :-(

    Hi Guys, This is an easy question for SRM gurus =) I need to send the PO in format XML to the vendors (using XI).    When I try to send a PO I can see this error message in "Issue Purchase Order" option menu. Information  Date: 13.06.2006 Time: 10:19

  • HH 1.5 having a nervous breakdown?

    Our HH 1.5 (black) has started to randomly reboot. It's been pretty reliable, and has required only an occasional power cycle when something gets stuck that prevents web sites connecting. Now it resets quite often, and usually at a lousy 2Mbps. We've