Running SQLPLUS script from command prompt on SUN

We are making a migration from VMS to SUN ( SunOS 5.10) and from 9i to 10g. We have encountered an unanticipated problem with running scripts from the command line in SUN(SQLPLUS execution from the command line). All of our packages have a naming convention such as "DM$LOAD.PKB". I know it is a strange naming convention.
The problem is that when the package creation script is run in SQLPLUS at the command prompt SQLPLUS can not open the file.
SQL> @dm$load.pb
SP2-0310: unable to open file "dm$load.pb"
SQL> host ls
dm$load.pkb
SQL>
Setting the escape character does not seem to help.
SQL> set escape '\'
SQL>
SQL> @dm\$load.pb
SP2-0310: unable to open file "dm$load.pb"
SQL>
Unfortunately, we can not rename the scripts. This can be done from a shell script, but our Tech Services refuse to run the SQL scripts from a shell script
Any ideas on how to get SQLPLUS to run the scripts from the SUN command line?

I did not notice that the cut and paste was poor. It should have read
SQL> @dm$load.pkb
SP2-0310: unable to open file "dm$load.pkb"
SQL> host ls
dm$load.pkb
Any ideas will be greatly appreciated.

Similar Messages

  • Running Oracle Scripts from Command Line

    Hi,
    How can i run Oracle scripts from command line.
    Actually i need to run these scripts from MSBuild before running Unit test projects

    C:\>sqlplus @myscript
    That would be the easiest variation
    C:\>sqlplus user/passwd@tns_alias @myscript
    would be an often used variation
    And then there is of course the version with parameter passing:
    C:\>sqlplus user/passwd@tns_alias @myscript param1 ... paramx
    Dunno about MSBuild

  • Running sqlplus scripts from Java code?

    hi
    I need to programmatically run sqlplus scripts from Java code on a machine that doesn't have sqlplus installed.
    Is there any Java class library available for doing this?

    The Ant approach could probably work for me, thanks for the tip.
    The setup seems rather complex however, given the simplicity of the task. I would prefer just running a Java based SQL*Plus from in a separate process or doing this via an API that would allow me to run SQL*Plus scripts (parse script, substitute variables, run statements).
    Oracle SQL Developer v1.1 appears to include an API that does exactly this.
    The ScriptParser, Substitution and SQLPLUS classes in the oracle.dbtools.raptor.scriptrunner package (oracle.sqldeveloper.jar) seem to do just what I need based on my tests.
    Can I use these classes for this purpose in my application? Is repackaging allowed?
    Does Oracle have any plans for releasing this sort of functionality separately e.g. as part of the Instant Client?

  • Need command to run sql script from sql prompt

    Hi,
    I am beginner in sql i need a command to run sql file from sql prompt.In notepad i have write 10 to 15 tables creation and saved as .sql i want to run this file from sql promp pls some one help.I am very great full to all users in this forum.

    You can also use the 'start' command.
    You may also want to look in the SQLPlus User Guide and Reference (for your release) at the set command for commands to set the number of lines per page, turn headings on or off, and so on:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/toc.htm
    HTH -- Mark D Powell --

  • Unable to run discoverer report from command prompt

    Hi,
    I'm trying to run the discoverer report from command prompt and i need to schedule the same.
    How could i pass multiple values for the parameters?
    If i don't pass the optional parameters, the parameter screen is getting pop-up? How to skip optional parameters?
    Also, how to pass the data ranges (format for date parameters) ?
    I'm using the below command in command prompt:
    cd/d E:\oracle\BIToolsHome_1\bin
    dis51usr /connect username/password@database /opendb "TIMS-PCJ status Report" /sheet "TIMS observation status report (based on performed date)" /parameter "Test Number" 40351 /parameter "From Date" "01-JAN-2007" /parameter "To Date" "28-FEB-2007" /parameter "Observation Status" C /parameter "Observation Name" "Abdominal Girth" /export HTML "C:\DISCOVERER_REPORT_SCHEDULING\DIS_OUTPUT\PCJStatusOutput11"
    Any one please reply me. Its very urgent.
    Regards,
    Sreedhar

    Hi,
    How could i pass multiple values for the parameters? You should be able to use a comma separated list e.g.
    /parameter "Observation Name" "'Abdominal Girth','Abdominal Girth2'"
    How to skip optional parameters?I don't think you can. You have to supply all parameters and then decode out the parameters you don't need in the workbook.
    how to pass the data ranges You cannot pass a date range. You can pass a start and end parameters. The default format for the date parameters is DD-MON-YYYY but this can change depending on the NLS settings and format of the data item.
    Rod West

  • Running my application from command prompt

    Hi im a student and kind of a rookie. My program runs fine from eclipse but when i run from command prompt it gives:
    Exception in thread "main" java.lang.MoClassDefFoundError: Mainclass
    This is what i am typing: java Mainclass. And i am sure i am in the right folder. I know it gives the same problem when you are not in the right folder. ALso my program uses jre5.0 and it runs fine on eclipse.
    Any help greatly appreciated

    From the directory containing Mainclass.class try java -cp . Mainclass The effect of "dash cee pea space dot space" is to
    set the classpath to the current directory.

  • Running Shell script from command line

    Hi,
    I am getting a Exception in thread "main" java.lang.NoClassDefFoundError: TestRuntime/java error when I run the following code on my linnux box...can anyone please help
    import java.io.*;
    public class TestRuntime {
            public static void main(String args[]) {
                    Runtime runtime = Runtime.getRuntime(); //get runtime information
            try {
                            Process Child = runtime.exec("/usr/bin/ksh"); // execute command
                            BufferedWriter outCommand = new BufferedWriter(new OutputStreamWriter(Child.getOutputStream()));
                            outCommand.write("/home/mypath/tesh.csh");
                            outCommand.flush();
                            try {
                                    Child.waitFor(); // wait for command to complete
                            } catch (InterruptedException e) { // handle waitFor failure
                                    System.out.println("ERROR: waitFor failure");
                                    System.exit(10); // exit application with exit code 10
                    } catch (IOException e) { // handle exec failure
                            System.out.println("ERROR: exec failure" + e);
                            System.exit(11); // exit application with exit code 11
    }

    If I'm reading your code correctly, you're starting a Korn shell session, then executing your C shell script as if you were at at the session window's prompt. If that is correct, you haven't caused your standard out (stdout) to hit ENTER yet. I'm not an expert, but I hope this works for you.
    Your code:
    Process Child = runtime.exec("/usr/bin/ksh"); // execute command
                            BufferedWriter outCommand = new BufferedWriter(new OutputStreamWriter(Child.getOutputStream()));
                            outCommand.write("/home/mypath/tesh.csh");
                            outCommand.flush();I think you need to enter one extra line before the flush():
    Process Child = runtime.exec("/usr/bin/ksh"); // execute command
                            BufferedWriter outCommand = new BufferedWriter(new OutputStreamWriter(Child.getOutputStream()));
                            outCommand.write("/home/mypath/tesh.csh");
                            outCommand.newLine();  // hit ENTER
                            outCommand.flush();P.S. If you're running this script and your Java program from the same UNIX machine, you could just execute the shell script inside the runtime.exec() call.

  • Run SQLPlus script from Forms 10g

    Hellou.
    In Forms 10g I am generating sql script which need to be run under sqlplus. It contains some selects and thay are spooled into file (It need to be like this) But generating this script is in the form and I need althoug call this script from form.
    So my question is> How can I call sqlplus commands uder forms 10g?? For exmaple like this:
    sqlplus: @ Report.sql or other??
    Thanks Zoffob

    Hello,
    If you know the syntax used on the DOS command line, put it "as is" in a Webutil Client_Host() built-in (see the documentation)
    Francois

  • Error when running a scenario from Command Prompt

    Hi I edited the parameter file and I am trying to run an interface that joins two tables from HR schema and loads into a table in different schema. I am able to run this in the Designer, but I receive an error message when I try to run it through command prompt.
    Here is the error message I get when I try to run it
    09/09/2009 11:58:42 AM(main): Creating session for scenario:DEMO_INTERFACE - 001
    09/09/2009 11:58:42 AM(main): Session : 88010 is running
    com.sunopsis.core.SnpsInexistantObjectException: There is no connection for this
    logical schema/context pair:HR / GLOBAL
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContex
    t(SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect(SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst(SnpSession.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getConLst(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenar
    io.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.e.y(e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)
    09/09/2009 11:58:43 AM(main): Session : 88010 finished with return code : -1
    com.sunopsis.core.SnpsInexistantObjectException: There is no connection for this
    logical schema/context pair:HR / GLOBAL
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContexur
    t(SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect(SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst(SnpSession.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getConLst(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenar
    io.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.e.y(e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)
    DwgJv.main: Exit. Return code:-1
    Thank you for your help.
    Kranthi

    Hello,
    Try to remove and recreate your package and scenario, I had the same issue and solved doing it.
    It seems for me that the package cannot update its contents, for example, if you change something in your interface, you must recreate your package and scenario to update the changes.
    What ODI version do you use? If you use an old version, try to update to ODI 10.1.3.5
    Regards,
    Wallace Galvão
    São Paulo - Brazil

  • Cant run a program from command prompt

    i am using eclipse 3.2 for java development.
    programs are running from editor window, but whenever i am trying to run it from command prmpt , i am getting folowing error...
    ..........NoClassDefinitionFound
    how to resolve it...??
    regards
    yogesh g k

    Since there have been a lot of posts from people who fail to compile and run their correct code, I would like to suggest to use ant for building and running! It hides the complexities of specifying the correct paths and a lot it's easier to type
    prompt>ant
    at the command line than
    prompt>javac -d . -cp .;longListOfJarsNeededToRun somePackage/*.java aLotOfOtherFilesToCompile.java
    prompt>java -cp .;longListOfJarsNeededToRun somePackage.someClass
    It takes some time to get familiar with the configuration, but once you get it right, you gain back a lot of your invested time!

  • Executing Tcl Script from Command Prompt

    Hello All
    Can someone please show me how to execute a tcl script from the command prompt on a cisco router?
    Cheers
    Carlton

    Hi,
    Assume that you have tcl script to ping 3 ip address as below.
    foreach address {
    1.1.1.1
    2.2.2.2
    3.3.3.3
    } {ping $address}
    Use "tclsh" command and copy the script. That should do the job. Please find below example.
    R1#tclsh
    R1(tcl)#foreach address {
    +>(tcl)#1.1.1.1
    +>(tcl)#2.2.2.2
    +>(tcl)#3.3.3.3
    +>(tcl)#} {ping $address}
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
    R1(tcl)#
    Hope this helps.
    Regards
    Najaf
    Please rate when applicable or helpful !!!

  • Running SQLPLUS Script From APEX

    Hello.
    I am running APEX 2.x and have a need to invoke a SQLPLUS script (it's a report)
    via an APEX page. I would like to create a button on a page that, when clicked,
    will somehow invoke a SQLPLUS script.
    The script may either be stored within a CLOB column in a table and then SELECTed (via the button press) or be in a .sql file on the UNIX server (presumably, then, I would need to invoke a UNIX shell script that, in turn, runs
    the .sql file).
    I would really appreciate any help on this.
    Thank you in advance.
    Elie

    I did not notice that the cut and paste was poor. It should have read
    SQL> @dm$load.pkb
    SP2-0310: unable to open file "dm$load.pkb"
    SQL> host ls
    dm$load.pkb
    Any ideas will be greatly appreciated.

  • How to run form from command prompt

    Hi,
    How to run a form from command prompt
    can anybody suggest me the way
    prasanth a.s.

    Well, if you are running windows, client server forms 6i, and your form is called 'myform', you could put this into a batch file :-
    start ifrun60 module=myform

  • Cant See RTF Files in JAR but can when running program from command prompt

    posted August 16, 2005 08:26 AM
    Hi ALL:
    I have a Java Swing APP. It has Menus which displays information through File I/O in a JEditorPane.
    When I run my program from Command Prompt using "java myApp" it shows these RTF Files as it is.
    However when I run them after converting Directory into a Executable JAR FILE, it fails. I get a blank JEditorPane. My RTF files are in the CORRECT PATH, just dont get displayed. Rest of the APP works fine.
    Chetan
    any suggetsions

    posted August 16, 2005 08:26 AM
    Hi ALL:
    I have a Java Swing APP. It has Menus which displays information through File I/O in a JEditorPane.
    When I run my program from Command Prompt using "java myApp" it shows these RTF Files as it is.
    However when I run them after converting Directory into a Executable JAR FILE, it fails. I get a blank JEditorPane. My RTF files are in the CORRECT PATH, just dont get displayed. Rest of the APP works fine.
    Chetan
    any suggetsions

  • Test Execution hangs while executing a test from Command prompt option

    I have done the following
    1) Created a script Test driver
    2) Added different scripts as Script->Properties->Assets to the driver script
    3) Call each of this asset script from TestDriver using command getScript("<<ScrptName>>".run(1, true, true, true);
    4) Now calling this TestDriver script from command prompt with command
    e:\\OracleATS\\agent
    runScript.bat E:\\INTEGRATION_SERVICES\\Identity_management\\Automation\\Scripts\\MasterScripts\\TestDriver
    TestDriver.jwg
    The script execution hangs at "Initializing VU 1 for Script TestDriver. After few mintues of seeing this message i get error "Execution Timed Out".
    Do I need to keep openscript UI open for script execution from command line ?
    Is there any way to increase this Execution Time out ? May be it is taking time to load the internal script assets. AS other scripts are running fine on the same machine from command prompt itself.
    Complete error is as follows
    C:\Documents and Settings\oracle>e:\\OracleATS\\agent\\runScript.bat E:\\INTEGRATION_SERVICES\\Identity_management\\Automation\\Scripts\\MasterScripts\\TestDriv
    er\\TestDriver.jwg
    Running "TestDriver" ...
    Agent started. Available commands:
    stop - Stop the virtual user after it finishes the current iteration.
    abort - Abort the virtual user cleanly, before it finishes the current itera
    tion.
    exit - Terminate the process immediately
    You may type the above commands at any time.
    12:17:53,418 INFO [1] Initialized script service "oracle.oats.scripting.modules.utilities.api.UtilitiesService"
    12:17:53,418 INFO [1] Initialized script service "oracle.oats.scripting.modules.browser.api.BrowserService"
    12:17:53,418 INFO [1] Initialized script service "oracle.oats.scripting.modules.functionalTest.api.FunctionalTestService"
    12:17:53,465 INFO [1] Initialized script service "oracle.oats.scripting.modules.webdom.api.WebDomService"
    12:17:53,856 INFO [1] Initialized script service "oracle.oats.scripting.modules.datatable.api.DataTableService"
    12:17:53,856 INFO [1] Initializing VU 1 for script TestDriver
    Execution Timed Out.

    Hi e_raja_sekar,
    You wrote:
    public static void main(String args){should be
    public static void main(String args[]){Granted, the below code was tested on Windows XP using J2SE SDK 1.4.1_02 (and not 1.2.2 like Sridhar is using), but when I compiled and executed this code:
    public class BadMain {
      public static void main(String args) {
        System.out.println("Hello World");
    }The output I got was:
    Exception in thread "main" java.lang.NoSuchMethodError: mainSo I don't think this is Sridhar's problem (but I could be wrong) since he says that he gets no error message.
    Cheers,
    Avi.

Maybe you are looking for

  • Maintenance view- package in another system

    Hello all! I'm trying to create a maintenance view for a Z table, but i can not do it because i get an error message that says: "The original of the table development class YMMI is in DEV". YMMI is the package, but DEV is not the development system o

  • Sending an edited copy via email without saving the original

    I have acrobat 5 and when HR gets a application they scan it in as a pdf then they block out the SSN and they said they use to be able to click the email button and email that changed document with out saving it so that the original file still has th

  • Traditional DAQ and SCXI 1530 model name

    Hi all, I am using Labview 6.1 and Traditional DAQ 7.1. I am working on one system with one DAQ card (PCI 6052E) and several SCXI cards(1520, 1530). All the SCXI cards are installed correctly because MAX can detect them all. I want to make a program

  • WBS Element Budget Exceeded.

    Hi All, During creation of Excise Invoice in T.Code J1IIN we get an error (MSG NO. BP603) WBS Element Budget Exceeded. Ideally the same should not as we are posting the income & not the cost. Please Guide. Regards,

  • Trying to print from a Windows XP laptop to a Mac Home Network

    Help! I have a home wireless network (netgear) using a DSL line. I have an iMac G4 and an iMac G5 cabled to my wireless router and I have an iBook G4 running wirelessly on the network. In addition, I have an Epson C84 cabled to my iMac G4's USB port.