How to run the command sqlplus in file beats?

Hello

I have a simple script file that looks like this:

"admin/admin sqlplus as sysdba.
stop immediately.

But... when I start this file.bat my system will connect but do not have any script. Sqlplus waiting to order and when I write "exit" I logout of sqlplus and system then executes the following command, which is "immediate stop", but beyond sqlplus (so my base still works). Is it possible to log and run commands file.bat or in some other way?

I am using oracle 11g, windows 7 x 64

Best regards and thx for help

Edited by: 879529 2011-11-27 04:52

Create a batch file say FILE.bat and a file1.sql to say sql file which contains the sql commands (in your case "stop immediately") and call inside this file sql batch file.

FILE.bat:
admin/admin sqlplus as sysdba @C:\file1.sql

File1. SQL:
immediate stop

Tags: Database

Similar Questions

  • How to run the command in Windows 7?

    Original title: HOW can I PUT to the TOP of THE COMMAND WINDOW TO INSTALL a PROGRAM IN WINDOWS 7 a LITTLE WI... UNDER XP, I WENT TO RUN AND OPEN NOCK THEN HE TYPED IN THE COMMAND

    INXP I COULD BRING UP THE LITTLE TH WINDOW TYPE IN THE INSTALLATION PROGRAM. EXE TO INSTALL THE PROGRAM I CAN T FIND THAT IN WINOWS 7

    As long as you are trying to run a 16-bit program on 64-bit Windows, then try either Windows key + R or click Start (or press the Windows key), and then simply type (or paste it into your order for the text box search programs and files ), then press on .

    If you think you really need to run window, you can add it by customizing the Start Menu. Right-click the Start button, and then select Properties. Click the Customize button at the top right.


    Figure 1.0 - Customize Start Menu dialog

    Scroll down about three quarters of the way down the list of options and place a check next to run the command. Click OK to save your changes and OK to save the Properties dialog box again.

    The familiar run command should be back on your Start menu in the menu on the right pane. The window run keep a history of previous orders drop.

    • "Have you tried it turned off then on again? '-'The IT Crowd' Roy (Emmy award-winning British comedy)
  • How to run the command sfc runs on Vista

    My dept here reimagee IT my computer today and I'm unable to access my WD external drive. WD has suggested to get help with the sfc command before possibly spoil my data. Anyone have any ideas?

    Thank you

    Hello

    Run the sfc/scannow command.

    http://support.Microsoft.com/kb/929833

    Use the (SFC.exe) System File Checker tool to determine which file is causing the problem and then replace the file. To do this, follow these steps:

    1. Open an elevated command prompt. To do this, click Start, click principally madeprograms,Accessories, right-clickguest, and then clickrun as administrator. If you are prompted for an administrator password or a confirmation, type the password, or clickallow.
    2. Type the following command and press ENTER:
      sfc/scannow

      The sfc/scannow command analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions

    you have a newly imaged drive today while there should be no problem with the operating system

    SFC is only to solve minor problems

    for the major problems you will need to do a repair installation

    but this does not apply to you in your case that your IT Dept use not reimage repair

    I suggest that you go and talk to your IT Department

    ask them about the last vista hardware drivers for your hardware of computers

    and your IT Department is responsible for your safe running of computers

  • How to run the command import and jpximport using PuTTY

    Hello

    I ' v no access to use prompt command for security in place of the customer.

    So I have to use Putty to run the import command to import my clumsy custom pages in the database.

    I tried XMLImporter using PuTTY, it says import is complete. But still my survey error page that

    Application: DNF, Message name: FND_NO_REGION_DATA. Chips: BOUNDING = / at/oracle/apps/per/coe/XXCOEPG

    oracle.adf.mds.MetadataDefException: unable to find the component with an absolute reference = / at/oracle/apps/per/coe/XXCOEPG, XML Path = null. Please check that the reference is valid and the definition of the component on the file system or in the MDS repository.


    Can someone please provide a solution for this.

    Thanks in advance,
    SAN

    Hi SAN,

    Try it by XML importer it I will work

    for ex:

    Java applications oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/xxtop/oracle/apps/per/jobevaluation/webui/XXTextPG.xml - username username-password apps - rootdir $ rootPackage JAVA_TOP/xxtop/oracle/apps/by/covering/webui - / xxtop/oracle/apps/per/jobevaluation/webui - dbconnection ' (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE = YES) (FAILOVER = YES) (ADDRESS = (PROTOCOL = tcp)(HOST=*xxHostName*) (PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = DEV))) ".

    After running successfully command below any DB tool

    Begin
    JDR.utils_printdocument ('pagepath' ex: ' / xxtop/oracle/apps/by/covering/webui/XXTextPG ');
    end

    Kind regards
    Srinivas

  • How to run the command-line IDC services

    Hey guys,.
    is it possible that we can run IDC Services from the command prompt.
    all your pointers will be greatly appreciated.

    Kind regards
    Sicard

    Published by: stephane on March 9, 2009 07:26

    Hey sapan,.

    You can use IdcCommand to perform the services from the command line. The procedure is the following:

    1 create a text file with service calls, you want to do, the definitions are had in format:

    LocalData @Properties
    IdcService = UPDATE_DOCINFO
    dID = 1
    dDocName = 000001
    dDocType = MyType
    dSecurityGroup = Public
    dRevLabel = 1
    dDocAuthor = sysadmin
    dDocTitle = my title
    @end
    >

    (Note: for multiple entries in the file > is very important)

    2. run IdcCommand from the directory "/ bin" of :

    IdcCommand f image_update.hda u-l c:\idccommand.log sysadmin

    Options:
    f = with service definitions
    u = user to run as
    -l (lowercase L) = location for execution log

    There is more detailed documentation in the presentation of the Idc (idc_command_reference_10en.pdf) commands.

    Hope that helps,

    Andy Weaver - Software Consultant
    Fishbowl Solutions< http://www.fishbowlsolutions.com?wt.mc_id="L_Oracle_Consulting_amw">

  • Run the command in Start menu show sites and other files that I opened.

    I was typing letters in the menu run from the start menu ("Start" > "run" > "a, b, c, d, e, f, g, etc...) and I noticed that the Web sites I visited were stored there. This information is accessible by hackers or other intruders unwanted? I was checking to see if I could find my e: drive using the command run from the start menu when I noticed similar entries in the recent documents folder from the start menu. I forgot this shortcut in the past and by chance came across it accidentally. How to delete these lists. I've seen websites that need my e-mail and password. even if she had a lot of jibberish, some words were read by me at a superficial glance. What is a security breach? example: if I type only (a), then all files and websites beginning with a are displayed

    Hi Marc,

    Welcome to the Microsoft Community Forums.

    According to the description, it seems that you are facing problems in removing the story from the beginning, run the command. I'll be happy to help you in this problem.

    -What operating system is installed on your computer?

    Windows saves a history of the names of files, programs, and locations that you type in the Run dialog box. You can delete this history, which you can do if you use a public or shared computer.

    I suggest you follow the steps in the link to clear the history run in the start menu and check if it helps.

    Clear history run on the start menu

    http://Windows.Microsoft.com/en-us/Windows7/clear-the-run-history-on-the-start-menu

    I hope it helps. If you have any questions about Windows in the future, please let us know. We will be happy to help you.

  • How to run the script to EEM/TCL file

    Hello world

    I need to run the EEM script found in this link

    https://supportforums.Cisco.com/document/75806/interface-input-queue-Mon...

    Can you please point me to a HOWTO to download the file and run it under an interface?

    Thank you

    Federico

    Here is the manual how to run scripts tcl file - http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/configuration/1...

    In short - you download the script to switch via tftp and the tcl implementation with command tclsh interpreter. Then run the command source source

  • How to run the Extendscript .bat file?

    I have a file with some instructions .bat and I want that it runs from Extendscript.

    How to run the Extendscript .bat file?

    I tried execute(); order and it seems that .bat ran but no result, but when I double click on the .bat file all worksout very well.

    How used runtime.exec () extend the script?

    Can I communicate with Java JDK thru ExtendScript and run commands such as runtime.exec ()?

    can someone please?

    You can do it like this:

    var batFile = new File("C:\\path\\to\\my\\batfile.bat");
    batFile.execute();
    

    Note that this will only work if your system is configured in such a way that by double-clicking the .bat file runs it in reality.

    You can also use

    system.callSystem()
    

    but note that this is only available in AE.

  • [CS4:JS] How to run the file ".sh" via Javascript

    Dear all,

    How to run the file ".sh" through Adobe InDesign Javascript, I used the code below:

    //================== Code =============================//

    var myFile = File("xxx/xxx/xxx/Test.sh");

    var Exec = "sh" + "" + "\""+myFile+"\;"

    Leader (exec). Execute();

    //================== End =========================//

    codes above does not work, I checked before without the "sh" in addition, it does not work.

    Please can someone give me the solutions and the suggestion, and I'd appreciate it.

    Thanks and greetings

    SudhaN T.R.Harihara.,.

    Have your IDMLExportparse.sh file runs permission set?

    If you open Terminal.app and type

    /Applications/MacXinPro/IDMLExportparse.sh

    It work? Or do you need to run "sh"? If so, either adjust the

    permissions with

    chmod a + x /Applications/MacXinPro/IDMLExportparse.sh

    or modify the JavaScript code for:

    shell("sh "+myFile);
    
  • Installed dictionary software (babylon 8), but I saw this message: "error 0 runs the command setup32.exe. How to solve this problem?

    Original title: error setup32.exe

    Hello. Thank you for your reading this question.

    I was installing a software dictionary (babylon 8), but I saw this message: "error 0 runs the command setup32.exe. Can you help me to solve this problem?

    Moved Windows 7 installation, set at level and activate Forum.

    Hello

    I changed the windows of my laptop and the problem has been resolved.

    Thank you very much.

  • How to disable the prompt 'more' when you run the command 'See logging' CLI

    Hello. I would like to know if there is a command that I can run to disable paging on my SF302 switch.

    Thus, for example, when I run the command 'See logging' on the CLI, I care about her return all results rather than ask me hit the SPACEBAR or enter.

    Is there a way to do this?

    Thanks in advance for your time and your consideration.

    J.L.

    command is

    terminal datadump

    -Tom
    Please evaluate the useful messages

  • How to display the result sqlplus in java?

    I want to call sqlplus to run some commands sql in java, but how can I print the result of sqlplus?

    In java code, I call sqlplus as:

    Process of p;
    Run the command
    p = Runtime.getRuntime () .exec (commandString);
    print the result of the command
    InputStream inputStream = p.getInputStream ();

    How to display the result of the execution?

    Published by: Yi on February 26, 2012 23:41

    You can use ProcessBuilder. Copy the following code starts sql * more and runs the script in the variable "filename". It displays the results in the console of NetBeans.

    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.File;
    import java.util.Map;
    
    public class test1 {
    
        public static void main (String args []) {
    
            test_script();
        }
    
        public static void test_script () {
    
            String fileName = "@test_table.sql";
            String sqlPath = "E:\\";
    
            String sqlCmd = "sqlplus";
    
            String arg1   = "user/password@sid"; -- plug in your user, password and db name
            String arg2   = fileName;
            try {
                String line;
                ProcessBuilder pb = new ProcessBuilder(sqlCmd, arg1, arg2);
                Map env = pb.environment();
                env.put("VAR1", arg1);
                env.put("VAR2", arg2);
                pb.directory(new File(sqlPath));
                pb.redirectErrorStream(true);
                Process p = pb.start();
              BufferedReader bri = new BufferedReader
                (new InputStreamReader(p.getInputStream()));
              BufferedReader bre = new BufferedReader
                (new InputStreamReader(p.getErrorStream()));
              while ((line = bri.readLine()) != null) {
                System.out.println(line);
              }
              bri.close();
              while ((line = bre.readLine()) != null) {
                System.out.println(line);
              }
              bre.close();
              System.out.println("Done.");
            }
            catch (Exception err) {
              err.printStackTrace();
            }
    
        }
    
    }
    

    Here is the content of the script at E:\\test_table.sql

    Prompt drop TABLE ANOTHER_TEST;
    DROP TABLE ANOTHER_TEST CASCADE CONSTRAINTS
    /
    
    Prompt Table ANOTHER_TEST;
    CREATE TABLE ANOTHER_TEST
    (
      BATCH_SEQ             NUMBER,
      BATCH_GROUP_ID        NUMBER,
      STATUS_FLAG           VARCHAR2(30 BYTE),
      OBJ_BEING_PROCESSED   VARCHAR2(80 BYTE),
      BATCH_RUN_START_DTTM  DATE,
      BATCH_RUN_END_DTTM    DATE,
      CREATE_DTTM           DATE,
      CREATE_USER           VARCHAR2(30 BYTE),
      UPDATE_DTTM           DATE,
      UPDATE_USER           VARCHAR2(30 BYTE)
    )
    LOGGING
    NOCOMPRESS
    NOCACHE
    PARALLEL ( DEGREE DEFAULT INSTANCES DEFAULT )
    MONITORING
    /
    
    COMMENT ON TABLE ANOTHER_TEST IS 'This is a test table.'
    /
    
    EXIT
    /
    
  • Is it possible to run the command script with user account administrator rights?

    Is it possible to run the command script with administrator user account rights means please tell me how to...

    I need to run it in windows 7 professional service pack 1.

    There are a few myths that won't go away, for example

    • You can perform administrative tasks when you are working from a command prompt.
    • A script (batch file, VBScript, PowerShell) gives you administrative rights.

    There is no substance to a myth. Your account has administrator privileges, or it does not. There is no backdoor.

  • Run the command of MaxL througth ODI and encrypt the password

    Hello

    I'm looking for a solution not using password plain text for my order Maxl in ODI.

    Someone knows how can I do?

    So far, I found nothing.

    Thank you

    Alain

    Hello

    Here is an example to encrypt the connection information in a scipt maxl.

    Something like this first run the command prompt
    essmsh - gk > c:\temp\encryptKeys.txt

    This will create a text file with the key public and private for example
    for example
    Public key for encryption: 5407,1453704157
    The private key for decryption: 406488703,1453704157

    Now that you have a maxl file called login.mxl as

    login password admin on localhost.
    disconnection;

    You can encrypt by calling
    essmsh EI c:\temp\login.mxl PUBLIC KEY

    So for this example, it would be
    essmsh EI c:\temp\login.mxl 5407,1453704157

    This will create a file called login.mxls with encrypted for example connection details

    Login $key 6343689380045143584028576355606972733930 1468602100275634090163724540502857635560 localhost $key;
    disconnection;

    Now, to run the file, you must use the command
    essmsh d c:\temp\login.mxls PRIVATE KEY

    Thus, in this example
    essmsh d c:\temp\login.mxls 406488703,1453704157

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to run the VI developed in labVIEW 2011 in its previous versions

    Hi all

    I am currently using LabVIEW 2011 in my PC at home.

    But, all my school's computers are installed with LabVIEW 2010 and 2010 SP1.

    How to run the VI developed in LabVIEW 2011 in its previous versions?

    Is there any conveter why?

    Concerning

    Prasanth T

    Open the VI in LabVIEW 2011 and use the file menu option, save for the previous Version.

Maybe you are looking for

  • The access key to set the text in the address line cursor (and other quick access keys)

    The access key which defines the text cursor to the line of the Web address (in some versions (3.0, 4.0) of MS Internet Explorer IE < Ctrl + F4 >)? Or how to assign a?And where is the list of all the hotkeys using FireFox? (Mozilla/5.0 (X 11; U; Linu

  • Pavilion dv4 helps PCI controller driver

    Paul, can you get me a link to the driver for below?  Please... PCI\VEN_8086 & DEV_1E3A & SUBSYS_1836103C & REV_04PCI\VEN_8086 & DEV_1E3A & SUBSYS_1836103CPCI\VEN_8086 & DEV_1E3A & CC_078000PCI\VEN_8086 & DEV_1E3A & CC_0780

  • I own a PC G62 and won't start

    I own a laptop G62 and today, I just modify my document and suddenly Word froze and then the PC just froze. I just let it about 10 minutes, I was wondering if it would be free, but I wouldn't, so I forced stop with the power button, and I restarted.

  • key Vista cd error! problem installing Vista sp 1.

    (1) I got an error message saying that my product purchase cd key is already in use. I have to buy another key, enter a new key, or use the automated phone system. Free number listed is not a free call and turned out to be too expensive. Howe else ca

  • Where is my IPv4 protocol?

    I recently updated my Vista Service Pack 2 and now I only have the IPv6 protocol.  SP2 removes the IPv4 protocol and how I get it back?  I can't connect to the internet from my pc to office without it.