batch file for statements to sqlplus

Jin
I want to run the batch file scripts, I use the following syntax


sqlplus user1/user1@instance C:\Batch File\Create.sql
output

and in

create table tab1 as .sql file (select * from emp)
commit;

When I double click on the file fighting his execution but the table is not created in the backend

Please help me

Thank you
Angelique
Usage: SQLPLUS [ [

From the help above must be a file @before address...

sqlplus user1/user1@instance C:\Batch File\Create.sql
becomes

sqlplus user1/user1@instance "@C:\Batch File\Create.sql"

check the qoutes, because they are needed for names with spaces in directories.

Ravi Kumar

Ravi Kumar

Tags: Database

Similar Questions

  • Batch file for migration and closing the virtual computer

    Hello, currently my company uses visualization of network monitoring software that allows us to react when certain thresholds are exceeded. We seek to define a threshold for when our UPS reaches a certain point (i.e. a point where the battery is discharged) and we would like to run a script or batch file that stops certain s VM, migrate some s VM for a single host and stop some ESX hosts. We want to create as much time as possible for our virtual machines essential.  I came across this tool and wonder if someone has done something similar? I'm not very familiar with batch files, and I'm fighting to run second and third commands. My current batch file looks like this: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe - PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" - NoExit-command ' Connect-VIServer VIServer-user 'exampleusername'-'examplepassword' password ' I can't run additional commands after connection. As I said I'm not very good with batch files and I am new with this program.   If someone could point me in the right direction of the execution of the additional commands from a batch file after you have connected the script above, I would appreciate it a lot.
    I also would be interested in other ideas, if others have done similar things for the same purpose.
    Thank you very much!

    Instead of real orders of PS during the invocation of PowerShell, you might call a. Ps1 script that contains all of the instructions of PS.

    To call the script from a command file, you can do something like this

    C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" c:\your_script.ps1
    
  • How to create the batch file for configuring windowos?

    Like how to add running exe/service turn on DEP Windows batch file (.bat).
    My computer > etiquette > advance setting > setting > prevention of execution of data (DEP) > add > ok.

    Hello

    The question you posted would be better suited to the MSDN Community. Please visit the link below to find a community that will support what ask you

    http://social.msdn.Microsoft.com/forums/en-us/categories

  • Batch File for 10g to take logical backup

    Dear all

    any body let me know how to handle this code because I easily take logical backup of 10g (os: Windows xp and Windows 2003 server), this code works but take the backup of oracle 9i logic

    code
    ---------
    OFF @ECHO

    Set Path = D:\backup
    DATEVAR = % SET THE DATE COURANTE%

    SET DATEVAR=%DATEVAR:/=%
    DATEVAR = % DATEVAR SET: = %

    MKDIR %PATH%\Dump-%DATEVAR%
    Set Path=%PATH%\Dump-%DATEVAR%

    The value of username = ACC1
    Set password = IELTS1


    D:\Oracle\bin\exp %UserName%/%Password% file=%Path%\%UserName%-%DATEVAR%.dmp FULL = N

    Thanks in advance

    Kind regards

    Technology says:
    Dear all

    any body let me know how to handle this code because I easily take logical backup of 10g (os: Windows xp and Windows 2003 server), this code works but take the backup of oracle 9i logic

    code
    ---------
    OFF @ECHO

    Set Path = D:\backup

    Check if your server has a D reader and do not use the default name for the path. Use your own. It could result in the conflict.

    DATEVAR = % SET THE DATE COURANTE%

    SET DATEVAR=%DATEVAR:/=%
    DATEVAR = % DATEVAR SET: = %

    MKDIR %PATH%\Dump-%DATEVAR%
    Set Path=%PATH%\Dump-%DATEVAR%

    The value of username = ACC1
    Set password = IELTS1

    D:\Oracle\bin\exp %UserName%/%Password% file=%Path%\%UserName%-%DATEVAR%.dmp FULL = N

    Check if your Oracle home is also correct here. You have the installation of Oracle on this way?

    I assume that the error is due to the use of the 'PATH' variable only, but it must be confirmed.

  • How to restart and stop the system by running a batch file?

    Can any body give the command batch file for restart and stop of the system.

    My requirement is to reboot or shut down the system at a specific time. So I think that by creating a batch file, that I can schedule the file to run at a specific time of the scheduled task...
    With regard to:
    Rahma.

    Hello

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited on MSDN. Please post your question in the MSDN forums. You can follow the link to your question:

  • How to have a batch file executed without the BACK popup on the screen?

    original title: running tape recorder in a minimized batch file or out of sight?

    Hi, I'm wanting to play a sound every 30 minutes.

    I wrote a batch file for use of Windows sound recorder to play the sound, and then close.  I will use the Task Scheduler to run and the calendar.  The sound seems to play fine, but every time it works I see a popup box BACK and then heard play recorder app.  These two things quickly disappear automatically, but ideally, I want the sound to play and can't see the window BACK or recorder popup of sounds on the screen.  Is there a way to minimize or hide these things automatically?  As it is run in the background, but still play the sound?  My batch file is below:

    Sndrec32.exe "C:\WINDOWS\Media\chimes.wav" /PLAY / CLOSE

    This could help you.
    http://zoombody.com/articles/run-a-batch-script-minimized

  • How to code a batch file to put in the form of z: drive?

    I would like to drive Z: quick format and xcopy in D: drive in the Z: drive for backup.

    I would like to pass on any message entry also.

    Anyone have any suggestions on how to code a batch file for this?

    Thanks for all the suggestions

    Hi oem7110,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is best suited for on TechNet. Please post your question in the TechNet forum. Link: http://social.technet.microsoft.com/Forums/en-US/ITCG/threads

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • In bulk to rename files in a folder by using the DOS command line or a batch file.

    Can someone help with this problem, please?  I remember seeing the DOS command line to do a mass renaming of files in a folder or a batch file. for example, vacation photos are all in the format DSC00001.jpg to DSC001234 and I want to change it to something like, say, Rome0001.jpg to Rome1234.jpg.

    How about this:
    Go to the folder of your files in that.  Create a text file, and open it (Windows should use Notepad, that very well).
    in the file type:
    Ren dsc*.jpg rome*.jpg
    Now, save the file as:
    renamethem.bat
    (Make sure you call it ".bat" and save it as a txt document, which will make a simpel file and not add a strange formatting)
    From there, just double-click this file and it renames all your pictures accordingly.
    :)

    Old timer

  • Batch files are running very slow

    Original title: batch files do not work!
    Recently, whenever I try to run a .bat (batch file) it will slow down my computer until she reached the point where I can ONLY move the cursor. If I'm lucky I can sometimes get it to open but it doesn't do anything and once again I have to force reboot to get my computer to respond. If I open CMD directly and type in that what it is supposed to do manually will work. I need to be able to run batch files for some programs I run. I can not even "start iexplore.exe" as a batchfile to run. If anyone can help that would be greatly appreciated. Now I need to run batch files on my old laptop that can barely run and they take FOREVER. Thanks for the help!

    Hello

    The issue you reported is Batch files and will be well suited in the TechNet community. Click on the link below.

    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • batch file window flashing?

    I created a batch file for Truecrypt that runs automatically at startup.
    My password start Truecrypt window opens on the desktop so that I can enter the password to decrypt a hidden partition.
    It works great except for one annoying habit.  When I boot Windows 7 (64 bit) of the password window Truecrypt opens and starts to blink (blinking).  There is no priority, so that I may be able to stop the blinking and enter the password in the password field, I first of all at the click of the mouse within the window to stop the blinking then click to highlight so that I can put the password in the password field.
    On my machine XP, when window open on the desktop batch file, she was ready for me to start to enter the password. I didn't take the steps above I did with Win 7.
    Any ideas how to stop flashing and the input field highlighted so that I can just begin typing the password?
    Is there a switch I should add in the batch file so that it can work properly?

    Hello

    The question you posted would be better suited in the Technet Forums. I would recommend posting your query in the Technet Forums.

    http://social.technet.Microsoft.com/forums/en-us/iTCG/threads 

    It will be useful.

  • sqlplus command inside batch files

    Hello

    Oracle9.2

    need commands from sqlplus, from the inside, the batch files without calling the file .sql separately. How can we do?

    Regarding

    Hello

    You can more orders in this code, but no select statements do not work here. Please provide your batch file as I'll be able to check the same.

    (
      echo alter database backup controlfile to trace;;
      echo shutdown immediate;
      echo exit
    )|sqlplus -s "sys/%password%@%tnsname% as sysdba" > Shutdown.log
    

    See you soon
    LIX.

    Published by: Kanchana dewaer on February 10, 2011 12:43

  • Use of PSEXEC for remote batch file processing

    We are moving a windows application for win 2008 r2. The application uses batch files. Calls from the source server to the Server 2008 r2 target do not run the command as expected file even if you use PSEXEC. The-d option works from the source in SQL2000 but not asynchronous and-i returns an error. Any info would be greatly appreciated. Thanks in advance

    Hi dave_900,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Windows Server forums.

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer

  • For Dell, HP, et al.: Batch file. Copy and paste in Notepad as netfix.bat

    Hello

    NETFIX.bat an 'L' of the command file

    Not important, but most of what follows is true. It's just a HOW2 simplified for initial review. It is not a definitive guide, don't forget...

    Never believe anything, everything you hear, and only about half of what you see; in particular within this document.

    DISCLAIMER: This is my own personal scribbles used to create a batch file to reduce the typing needed to use some of the commands in my network A2Z nonsense & applying a low degree of automation. Now, I'm not able to ensure the effectiveness of the controls on my system, because it isn't really broken. So use you it at your own risk, your levels of configuration & special access is certain to be different to mine.

    It was written using Notepad and is the plain text that can be scrutinized, edition, amended and implemented by almost everyone.

    @ECHO  THIS MIGHT HELP TO REPAIR/RECTIFY
    @ECHO  SOME SIMPLE NETWORK DIFFICULTIES.
    @ECHO         based on work by
    @ECHO  Kevin Arrows, Jim Eshelman et al.
    @ECHO ....................................
    @ECHO.
    @ECHO   THE RESULTS MAY VARY ACCORDING TO
    @ECHO   YOUR CONFIGURATION AND USER LEVEL
    @ECHO    A RESTART SHOULD BE MADE AFTER
    @ECHO    THE RUNNING OF THE ABOVE TESTS
    @ECHO ....................................
    :MENU
    @ECHO.
    @ECHO ....................................
    @ECHO.
    @ECHO   TYPE IN THE RELEVANT MENU NUMBER
    @ECHO.
    @ECHO ....................................
    @ECHO.
    @ECHO  0 - GET_MAC Obtain MAC address(es)
    @ECHO  1 - GET_IPs Lists all IP addresses
    @ECHO  2 - ADDRESS Force/Renew IP address
    @ECHO  3 - DNS_FIX Flush and Register DNS
    @ECHO  4 - WINSOCK Reset to remove errors
    @ECHO  5 - IPV4_V6 Reset to remove errors
    @ECHO  6 - PING_LO Ping tests to Loopback
    @ECHO  7 - NETSTAT All Network Statistics
    @ECHO  8 - SYS_SUM System Summary Windows
    @ECHO  9 - EXITNOW Close this Command Box
    @ECHO.
    @ECHO ....................................
    @ECHO OFF
    SET /P M= Choose from 0 - 9, then press ENTER:
    IF %M%==0 GOTO GET_MAC
    IF %M%==1 GOTO GET_IPs
    IF %M%==2 GOTO ADDRESS
    IF %M%==3 GOTO DNS_FIX
    IF %M%==4 GOTO WINSOCK
    IF %M%==5 GOTO IPV4_V6
    IF %M%==6 GOTO PING_LO
    IF %M%==7 GOTO NETSTAT
    IF %M%==8 GOTO SYS_SUM
    IF %M%==9 GOTO EXITNOW
    ::
    :GET_MAC
    GETMAC
    GOTO MENU
    ::
    :GET_IPs
    ipconfig
    GOTO MENU
    ::
    :ADDRESS
    ipconfig /release
    ipconfig /renew
    ::
    :DNS_FIX
    ipconfig /flushdns
    
    Ipconfig /registerdns
    
    GOTO MENU
    ::
    :WINSOCK
    netsh winsock reset catalog
    
    GOTO MENU
    ::
    :IPV4_V6
    netsh int ipv4 reset reset.log
    netsh int ipv6 reset reset.log
    GOTO MENU
    ::
    :PING_LO
    ping 127.0.0.1
    GOTO MENU
    ::
    :NETSTAT
    netstat -e -s
    GOTO MENU
    ::
    :SYS_SUM
    msinfo32
    GOTO MENU
    ::
    :EXITNOW
    EXIT
    

    Hello

    HOW?

    Well make HP machines, I'm a.  I wrote the code on mine, I ran and tweaked.  Since it is part of the operating system provided with my camera, it must be relevant.

    So when someone asks what is/where or how to find MAC address, he covered (0 GETMAC).

    If someone reports their Wi - Fi dropping out after a short time a possible solution in the list (4 WINSOCK

    You want to know your IP... (1 GET IPs)

    Trial material basis, ping your loopback (6 PING_LO).

    etc etc.

    Then as a sticky it could potentially help solve quite a few queries.  In the same way as The Great Deku Tree posted a sticky on the "Common corrects problems of wireless connectivity", to get ahead of the game by offering something that the OP can try for themselves.

  • When I log in with the user account that reflects on the one hand by car, there is no batch file or a script in AD for this user profile

    Hello

    I created a new user in AD (Server 2003).

    When I connect with the user account that reflects on the one hand by car, it not there no batch file or a script in advertising for this user profile. I don't want user to access this part by car.

    If anyone can help.

    Kind regards

    Virendra Tainya

    Hello Virenda,

    Thanks for posting your query on the Microsoft Community.

    I would like to inform you that we have a support forum dedicated to systems on area issues, I suggest you to send your query on Microsoft TechNet forum for this issue. You can get more effective suggestions and adapted by experts familiar with this topic.

    Please visit the link below to find a community that will support what ask you:

     

    Microsoft TechNet

    https://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?Forum=winservergen

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

    Thank you

  • Is there a way to 'batch' record as very? We have a customer who regularly sends files without all the embedded fonts. To clean the files for digital printing, save us as Postscript and pass them through Distller. "Save as Postscript is most of time consu

    Is there a way to 'batch' record as very? We have a customer who regularly sends files without all the embedded fonts. To clean the files for digital printing, save us as Postscript and pass them through Distller. "Save as Postscript is the longest part of the process, then I would be able to automate it.  Any ideas?

    This is the worst absolute way to embed fonts for PostScript through deletes dynamic transparency, color management, bookmarks, hyperlinks, etc. Yucck!  You are in many ways to ruin the files, do not clean them.

    Acrobat Preflight has a correction for embedding fonts. Takes only a few seconds per file PDF. And if you have a bunch of these files, you can create an action to do this.

    -Dov

Maybe you are looking for