How to run stored procedure in DOS command line????

Hi,
I want to run a stored procedure in DOS command line?
(My_Stored_Procedure is the stored procedure that I want to run )
This is what I did in DOS prompt
C:\>sqlplus scott/tiger exec lMy_Stored_Procedure <Return>
Obviously it is NOT working. Please send me the correct way to fix this.
Thanks so much in advance for helping.
Cuong

Billy  Verreynne  wrote:
BluShadow wrote:
True Billy, but even Windows hasn't completely got away from using the "DOS" word...Yeah - the command line/shell environment is based on that of the old DOS command interpreter. But Microsoft does not make the mistake of call it DOS.
In fact, with earlier versions of Windows NT, a 16bit DOS real-mode virtual machine was supported. This was very kewl.
Running a large BBS with multiple nodes back then required a DOS machine per node, an IPX network, and a Novell file server.Novell Netwars. ;)
Ahhhh! good old DOS... so many good programs written at that low level, outside the Windoze environment.Yeah.. cut my teeth on writing code for DOS. Still have all my old BIOS and assembler manuals for it. Wrote my own screen s/w (write to a buffer and then move it into the video buffer, instead of writing char wise to the video buffer via interrupts), mucking about with my own concurrent threading model (using very simplistic cooperative multitasking) and so on. Heck, wrote tons of s/w on DOS... :-)Yeah I've still got a copy of my old machine code programs for writing to buffers and screen memory switching for smooth animation. Run them nowadays and they run like sh!t off a shovel. And all my old coursework including writing an interpreted language and multi-window (dos based windows) editor, parser and the code to execute the language and display the output. Oooo, and so much other stuff.
Awesome back then as you got really intimate with the o/s and hardware. This is sorely lacking today in environments like Java. And I think the reason why so much code written today is less than optimal - to put it kindly.Exactly. Started for me on the Sinclair zx81 (writing Basic), then the Sinclair Spectrum (Basic and Assembly), then Sinclair QL (yes I really had one!) and then the BBC Master 128K (where I got to writing my own rom filing system and creating my own eproms, to integrate with the word processor for additional printing features etc. as well as storing games on rom for speedy loading - and I still have it and it still works!)
It's that level of working with the underlying memory and assembly language that gives you the understanding of how values are passed between code using the stack and registers, and how memory allocation and referencing is done etc. As you say... it's missed in a lot of todays teaching, which just seems too high level and misses the basic concepts of things such as datatypes and why they are different. I bet half the modern programmers wouldn't have a clue how to do multiplication or division of binary numbers using the carry flag.

Similar Messages

  • How to run a 10g report from command line ?

    Good Afternoon,
    Please advise if there is a way to run a 10g report from command line.
    We use 6i right now and our job scheduler runs reports using "D:\ORADEV6I\BIN\RWRUN60.EXE ..." executable in batch mode on a separate server. We plan to migrate to 10g Database, Forms, Reports. Is there a way to keep this functionality and create a "command" to address an report server and run a report?
    Thank you,
    Dmitri

    Steps to take.
    (1.) In command prompt type RWSERVER SERVER=repserver1 to star the rep server.
    (2.) If you get "Javaw.exe The procedure entry point psoasyn could not be located in the dynamic link library orapls10.dll." error do one of the following
            (a.) Type the full name for the server. D:\OracleDevR2\bin\rwserver SERVER=repserver1
                   or, if it does not work
            (b.) Add D:\OracleDevR2\bin to the system env. variable PATH
    (3.) Start OC4j
    (4.) Now you can access the jobs using URL like:
        http://192.161.11.143:8890/reports/rwservlet/showjobs?server=repserver1
          where 192.161.11.143 is your machine's IP address.

  • How to Run Stored Procedures from Teststand

    I am trying to get teststand to run an SQL stored procedure but I always get the following error
    Error executing substep 'Post'.
    The following SQL command failed: 'EXECUTE cdt_st_test...'
    Native error code -2147217900 0x80040e14
    Microsoft OLE DB Provider for SQL Server:
    Syntax error or access violation
    It is a test stored procedure that doesn't pass any parameters.
    Which steps must I use and how do I pass parameters.

    I have sussed it now. I was setting the "Command Type" to stored procedure instead of default. I changed it back and did "EXECUTE cdt_st_test" and it works. I have also added the parameters there as well.

  • How to run stored procedure IC Data / to define according script logic file

    We want to execute the stored procedure IC Data before the IC Booking. Could anybody tell me, how we have to define the script logic file in detail?
    We try it with this code (that runs without any error, but 0 rows are calculated, 0 rows are updated)
    *Run_stored_procedure=spicdata('%App%','%C_Category_Set%','%time_set%','','%entity_set%','','','Input','I','%logtable%','%scopetable%')
    *commit
    We also had tried with this code:
    *Run_stored_procedure=spicdata('%App%','%C_Category_Set%','%time_set%','','%entity_set%','','','','','%logtable%','%scopetable%')
    *commit

    step 1.
    Create a store procedure in back end.
    step2.
    Create a ssis package to execute the store procdure.
    step3.
    call this ssis pacakge in the data manager package and run the package.

  • How to run stored procedure in run-time not in design

    hello:
    I have download the ODT software
    and i installed VS 2003 environment
    amd i have oracle 9i on the server and oralce client on my computer
    and I know how to run the ODT inside the VS2003 and how to use it
    I built a package and inside it a procedure that does not take any parameter
    PROCEDURE "TEST1" IS
    BEGIN
    insert into emp (empno,ename)
    values (3003,'jon');
    END "TEST1";
    this procedure is valid and I can run it in ODT (by right click over the procedure name and select "Run")
    but when I drag it and drop this procedure on a form in application I have a dialog with errors that's not understandable
    for example:
    ORA-06550: line 1, column 27
    PLS-00315: PL/SQL TABLE Declarations must currently use binary_integer indexes
    and many other errors
    ok I want to know how I can call the procedure in the code and give to it the in parameters and then get the out parameters
    I hope to find replay
    thank you

    Hi,
    You have to take care of certain measures other thatn just drag and drop the Oracle procedure to the .NET form.
    Following is a simple code to call an Oracle procedure from the C#.Net form
    ============================================================
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace TEST1
         public class CallingProcs : System.Web.UI.Page
              protected System.Web.UI.WebControls.Button Button1;
              protected System.Web.UI.WebControls.TextBox txtYear;
              OracleConnection conn;
              private void Page_Load(object sender, System.EventArgs e)
                   // Put user code to initialize the page here
                   string oradb = "Data Source=ORA1;User Id=SCOTT;Password=TIGER;";
    conn = new OracleConnection(oradb);
                   conn.Open();
              #region Web Form Designer generated code
              override protected void OnInit(EventArgs e)
                   // CODEGEN: This call is required by the ASP.NET Web Form Designer.
                   InitializeComponent();
                   base.OnInit(e);
              /// <summary>
              /// Required method for Designer support - do not modify
              /// the contents of this method with the code editor.
              /// </summary>
              private void InitializeComponent()
                   this.Button1.Click += new System.EventHandler(this.Button1_Click);
                   this.Load += new System.EventHandler(this.Page_Load);
              #endregion
              private void Button1_Click(object sender, System.EventArgs e)
                   //OracleCommand dbcmd = new OracleCommand();
                   OracleCommand dbcmd = conn.CreateCommand ();
                   dbcmd.CommandType = CommandType.StoredProcedure;
                   dbcmd.CommandText = "TEST1";
                   try
                        dbcmd.ExecuteNonQuery ();
                        Response.Write("Excecuted succesfully");
                   catch(Exception ex)
                        Response.Write(ex.Message);
    ============================================================
    Most of the above code is generated automatically. I am using Visual Studio .NET 2003 , C# for it.
    The design view of the form contains a button named 'Button1' and the code is aimed to call the procedure 'TEST1' on clicking the button.
    Hope this will give you a start to using oracle from .NET

  • How to run executable Java app from command line: No Main( ) method

    This is the opposite question from what most users ask. I have the Java source code and a running Java executable version of the program in a windows environment. I don't want to run it in the normal way by double-clicking on it or using the executable. I need to be able to run the same application from the command line. If I can do this, I can then compile and run the code on my Mac, too, which is what I am ultimately trying to accomplish.
    Normally, this would be easy. I would look for a Main method, normally public static void main (String[] args ) or some variation. I cannot find a main() anything, anywhere when searching the files. There must be some windows executable that links to the Java classes. It's very clever, no doubt, but that's not helping me.
    I am trying to run what I can determine as the Main class, with a standard command line call, but that is not working either.
    It is a Java graphics program, so mostly Swing container stuff.
    I am not finding a manifest.txt file, telling me where a main method is, nor anything about the Main Class. There is no readme file for the program.
    Any insight that would point me in the right direction? What should I be looking for?
    Thanks in advance, Bloozman

    It's possible there's a clever Windows executable that runs the class. But if it's a plain old Java class then there's a good chance there's a constructor. Look for that; it's possible you may be able to start by writing another Java class that creates an instance of your mystery class.
    When you have that done, try running it. It's possible that just creating an instance might be sufficient to run it. Swing programs are sometimes written like that. If not, then start looking for methods with names like "run" or "go" or "start" that your little controller program can call.

  • How to run Report Builder Report from Command line

    Hello,
    Can Oracle Report Builder Report (run time report) run from Command line ( SQL prompt or Shell script).
    Quick response will be appreciated.
    Thanks,
    Atif

    Hi Atif,
    please see Note 74648.1 on Metalink.
    Monica

  • How run stored procedure in Crystal report?

    I have table from query in report, but first I need to run stored procedure in report.
    How I need to do it?

    previous post not correct
      this is correct
    When I need to run my report
    1) I need to run storeed procedure ( the stored procedure will update some tables)
    I just used Add Command and added stored procedure in Database Fields, but I think the procedure doesn't work in report. Maybe I need add new commant and write there:
    exec ProcedureName par1 par2
    or
    exec ProcedureName (par1={?parameter1} par2={?parameter2})
    It's doesn't work. What I need to do?
    2) I use some query in report
    ex.
    select t1.col1, t2.col2, t6.col3 t1.col7 t4.col1
    from t1, t2, t6, t4, r4, ju, hh
    where hh.col11={?parameter1}
    and ju.col3=6
    and r4.col3={?parameter2}
    group by .....
    order by ......
    How I need to create me report? What I need to do first?
    If parameter in stored procedure par1={?parameter1} in query
    and par2={?parameter2}

  • How to call stored procedures from java program?

    I have tried to run a program that calls a stored procedure on MySQL
    server version 5.0.17 by using connector/j 5.0, but it always fails on the
    statement: con.preparecall() ,
    have looked on the internet and found out that people can all mysql
    stored procedure all right in their programs, really dont know what's
    wrong with this small peiece of code:
    import java.sql.*;
    public class TestDB {
          // procedure being called is:
         CREATE PROCEDURE `dbsaystorm`.`getsite` ()
         BEGIN
            select  name  from tblsite;
         END
         public static void main(String[] args) {
              try  {
                  //Class.forName("org.gjt.mm.mysql.Driver");
                  Class.forName("com.mysql.jdbc.Driver");
                  Connection con = DriverManager.getConnection("jdbc:mysql://localhost/dbname",
                            "user", "pwd");
           * executing SQL statement here gives perfect correct results:
            // PreparedStatement ps = con.prepareStatement("select name from tblsite");      
            // ResultSet rs =ps.executeQuery();
                  // but in stored procedure way...
                  //it fails here on this prepare call statement:             
                  CallableStatement proc = con.prepareCall("call getsite()");
                  ResultSet rs =proc.executeQuery();                      
                  if (rs == null) return;                                      
                  while (rs.next()){                 
                      System.out.println("site name is: "+ rs.getString(1));                                
                  rs.close();
              } catch (SQLException e) {e.printStackTrace();}
               catch (Exception e) {e.printStackTrace();}         
    }it always gives this exception:
    java.lang.NullPointerException
         at com.mysql.jdbc.StringUtils.indexOfIgnoreCaseRespectQuotes(StringUtils.java:959)
         at com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes(DatabaseMetaData.java:1280)
         at com.mysql.jdbc.DatabaseMetaData.getProcedureColumns(DatabaseMetaData.java:3668)
         at com.mysql.jdbc.CallableStatement.determineParameterTypes(CallableStatement.java:638)
         at com.mysql.jdbc.CallableStatement.<init>(CallableStatement.java:453)
         at com.mysql.jdbc.Connection.parseCallableStatement(Connection.java:4365)
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:4439)
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:4413)
         at saystorm.server.data.database.TestDB.main(TestDB.java:29)
    where have I gone wrong?
    when I commented out the statement that makes the procedure call and call preparedstatement to execute SQL select statement, it gave perfectly correct result.
    it looks like there is no problem with java prog accessing MYSQL server database, but the it seems that it's just java can't call stored procedure stored on the mysql server version 5.
    can it or can't it? if it can, how is that accomplished?

    It is a bug in the driver because it shouldn't be
    returning that exception (null pointer) even if you
    are doing something wrong.
    Are you using the latest version of the driver?
    The stored procedure runs when you run it from the
    gui/command line using a MySQL tool - correct?
    As suggested you should be using the brackets. What
    is the data type of the 'name' field?
    You could try returning another value like one of the
    following
    select 1, name from tblsite;
    select name, 1 from tblsite;
    That might get around the bug
    Additionally try just the following...
    select 'test' from tblsite;yes, the driver used is in connector/j 5.0--the lastest one, and the
    procedure can run correctedly at either command line or GUI mode
    with no problem whatsoever, the returned data type is string type,
    I have not got the chance to test it again with those values you
    suggested, as I have abandoned the laptop I used to write that code
    initately. There have been some other really weird cases happened on
    that computer. I guess that must be something wrong with the JVM
    installed on it, it was upgraded from jre5.0.04 to 06, and to 09.
    something within hte JVM must have been messed up(the only reasonable
    explanation). Because the same code runs correctly on my new laptop,
    using the same environment: jvm 5.0_09, mysql 5.0.18, connector/J 5.0.
    that old laptop really was a nightmare.

  • Is it possible to trigger an error so that the running stored procedure is stopped?

    Hello all,
    I want to run an existing stored procedure and then I want to manually trigger an error/abort/interruption so see what happens and do some testing with that.
    Is it possible to manually trigger an error/abort/interruption on a running stored procedure so that it is stopped?
    If yes, how can I do that?
    I hope someone has an idea. For me it sounds not really difficult, but I just do not get the idea how to do it.
    Kind regards
    Peter

    Hello Visakh,
    I dont want to modify the existing procedure. I just want to run it and than stop it, but not with the button to stop it, but "kill" it somehow with an error (with not destroying the database).
    Nope you cant simulate an intermediate failure inside procedure code from outside. For that you have to modify the actual sp code itself
    Another way is by doing data manipulation in such a way which causes a error in procedure but for that you need to revisit the logic to ensure you do changes in such way as to cause an error
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Can't Run Stored Procedure in Package

    Hi,
    I am trying to run a stored procedure that has multiple in and out paramaters. The procedure can only be viewed in my Connections panel by navigating Oher Users | <user> | Packages | <package> | <procedure>
    If I right click <procedure>, the menu items are "Order Members By..." and "Create Unit Test" (greyed out). The ability to "Run" the procedure does not seem possible when it's accessed by user.
    I have been trying to find an example of how to create an anonymous block so that I can run the procedure as a SQL file, but haven't found anything that works.
    Does anyone know how I can execute this procedure from SQL Developer? I am using Version 2.1.1.64.
    Thanks in advance!

    Thanks for replying. I did understand the basics of an anonymous block, but what I didn't understand was how to set the out parameters. I should have been more detailed in my question. However, I did get the answer here:
    http://stackoverflow.com/questions/3991721/run-stored-procedure-in-sql-developer
    Thanks again for replying. I appreciate you taking the time.

  • Execute stored procedure from DOS or Unix Shell

    Hi, need ur help again,
    How to execute the stored procedure from DOS or Unix Shell?
    Thanks!

    sqlplus -s /NOLOG @your_sql_script.sql
    -- your_sql_script.sql :
    connect user/password@connect_string
    execute package.procedure (param1, param2, ...) -- for packages
    execute procedure (param1,...) -- for procedures
    exit ;this way you won't advertise your user/password on unix systems

  • Flags needs to set to run stored procedure fast

    Hi,
    I need to understand what all flags that we need to set run stored procedure fast.
    e.g. set no count on command is one option, please redirect me to other command so that I can use those for each stored procedure.

    That is the only general option, however, no relationship to performance.  Other options may be appropriate depending on the program statements.
    To achieve good performance, optimize the stored procedure:
    http://www.sqlusa.com/articles/query-optimization/
    The underlying principles of stored procedure optimization:
    1. Each statement must be optimized
    2. Avoid unnecessary statements & excessive looping
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Running stored procedures from HTML DB

    Hello.
    Is it possible to run stored procedures/functions from HTML DB? If yes, how to do it?
    Davide

    If the variable v_return_amount is a number, how can you assign a boolean to it? Are you sure your function is valid? I would write it slightly different:
    CREATE OR REPLACE FUNCTION verify_amount (
    v_invoices_pk IN NUMBER,
    v_new_amount IN NUMBER
    RETURN BOOLEAN
    IS
    CURSOR c_amount
    IS
    SELECT amount
    FROM invoices
    WHERE invoices.invoices_pk = v_invoices_pk;
    CURSOR c_dist_amount
    IS
    SELECT SUM (cost_distribution.amount)
    FROM cost_distribution
    WHERE cost_distribution.invoices_pk = v_invoices_pk;
    v_sum_amount NUMBER;
    v_invoices_amount NUMBER;
    BEGIN
    OPEN c_dist_amount;
    FETCH c_dist_amount
    INTO v_sum_amount;
    CLOSE c_dist_amount;
    OPEN c_amount;
    FETCH c_amount
    INTO v_invoices_amount;
    CLOSE c_amount;
    IF (v_invoices_amount <= v_sum_amount + v_new_amount)
    THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    RETURN v_return_amount;
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN FALSE;
    END;
    Other than that, I am not sure about your cursors but I can't judge from here. The other thing is how you use the function in the validation process. Can you try to correct and tell if it worked out?
    Denes Kubicek

  • How to use Stored Procedure Call in Sender JDBC adapter

    Hi All,
             Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
    Xier

    Hi Xler
    refer these links
    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Also, you can check Sriram's blog for executing Stored Procedures,
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    /people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
    This blog might be helpfull on stored procedures for JDBC
    JDBC Stored Procedures
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Please go through these threads and see if it helps...
    Re: How to execute Stored Procedure?
    Re: Problem with JDBC stored procedure
    Thnaks !!

Maybe you are looking for