Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Help required for Running SQLPLUS command from Bat file Post 302885727 by PavanPatil on Tuesday 28th of January 2014 05:58:04 AM
Old 01-28-2014
Lightbulb Help required for Running SQLPLUS command from Bat file

Hello All,

Good Afternoon.

I am new to this platform and I need one small help regarding running a SQL file from Bat file. Below is what I am doing,

1. I placed the below command in one Bat file.
Code:
start putty.exe -ssh user@host -pw pwd -m C:\2.txt

2. In 2.txt, I have below command.

Code:
sqlplus u/u@host @/root/home/sql1.sql

3. Sql1.sql has simple sql commands.

When I am invoking the bat file, its logging into putty and logging off and not doing any thing. Smilie

If I run separately 2.txt by logging into putty then its running properly.

Please help me out. If I posted wrongly then, please guide me.

Last edited by radoulov; 01-28-2014 at 07:07 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

executing *.bat file on windows from Unix box via ftp command

I have created get_list.bat file containing following line: dir /B /O-d >file_list.txt I am executing ftp command from Unix box and transferring get_list.bat file to windows server. In my next ftp command I am trying to execute this test.bat file by entering this line: get_list or by... (9 Replies)
Discussion started by: alx
9 Replies

2. Shell Programming and Scripting

Running SQLPLUS from Shellscripting ...

Hi guys, I am facing issues while triggering sqlplus with "/" option I can connect to database with USER ID and password. but, if i just specify "/" option since it is "externally identiifed user" it doesn't work Any suggestions? mail me @ Removed. Regards, Giri (2 Replies)
Discussion started by: chittari
2 Replies

3. Shell Programming and Scripting

error running sqlplus from shell file

I am running a shell file following script on bash shell in solaris 10 ( echo abc@orcl echo abc echo "set feedback off" echo "truncate table SIndexDataTypeHst1_changes;" ) | sqlplus -s but getting the following error ERROR: ORA-01005: null password given; logon denied ... (3 Replies)
Discussion started by: mmunir
3 Replies

4. Windows & DOS: Issues & Discussions

Can rsh command be used to call a bat file

I have a .bat file on windows, which converts a .xls file into .csv file and using a ksh script i would usually FTP this .csv file... Now i want to trigger this .bat form my ksh script. can i use rsh command in my FTP to run .bat file on windows and then ftp the generated .csv file...is... (19 Replies)
Discussion started by: bhagya2340
19 Replies

5. Shell Programming and Scripting

URGENT: cron job not running the sqlplus command in shell script

cron job not running the sqlplus command in shell script but the shell script works fine from command line.. Cronjob: 5 * * * * /home/dreg/script.sh script.sh: #!/bin/ksh /oracle/u000/app/oracle/product/10204/GEN/bin/sqlplus -s <user>/<pass>@<sid/home/dreg/sqlscript.sh ... (18 Replies)
Discussion started by: Ikea
18 Replies

6. Shell Programming and Scripting

Running sqlplus for 5 DB in a shell

Hi all, on AIX 6.1 I want to run the following but for 5 DB. How should I do that ? Using FOR, WHILE ???? How ? export ORACLE_SID=DB1 sqlplus / as sysdba << EOF whenever sqlerror exit sql.sqlcode; whenever oserror exit FAILURE set define off set head off set feedback off set echo off... (1 Reply)
Discussion started by: big123456
1 Replies

7. Solaris

Error during running sqlplus command from shell script in Solaris

I am using following code to connect to oracle database from solaris shell script. which will try thrice to connect the database ...at the 4rth atempt it will exir=t. count=0 while ; do sqlplus -s $usrname/$password@dbSID <<-EOF | tee $logfile WHENEVER OSERROR EXIT 9; WHENEVER SQLERROR... (4 Replies)
Discussion started by: millan
4 Replies

8. Shell Programming and Scripting

Sqlplus error - sqlplus -s <login/password@dbname> : No such file or directory

i am using bash shell Whenever i declare an array, and then using sqlplus, i am getting sqlplus error and return code 127. IFS="," declare -a Arr=($Variable1); SQLPLUS=sqlplus -s "${DBUSER}"/"${DBPASS}"@"${DBASE} echo "set head off ; " > ${SQLCMD} echo "set PAGESIZE 0 ;" >> ${SQLCMD}... (6 Replies)
Discussion started by: arghadeep adity
6 Replies

9. Shell Programming and Scripting

Help required with xargs to use sqlplus

Hello All, I have a requirement in which i need to run few Oracle sql files in parallel. I want to use xargs command to achieve parallelism. I tried below command: cat x|xargs -n 1 -P 5 sqlplus -s $usr/$pwd@$Host @{} File x has the list of sql files to be executed. I am getting the... (3 Replies)
Discussion started by: vikas_trl
3 Replies
TKGATE(1)						      General Commands Manual							 TKGATE(1)

NAME
tkgate - Tcl/Tk based digital circuit editor and simulator SYNOPSIS
tkgate [-xqs] [-X script] [-l file] [-p file] [-P printer] [files...] DESCRIPTION
TkGate is a graphical editor and event driven simulator for digital circuits with a tcl/tk-based interface. Supported circuit elements include basic gates (AND, OR, etc.), tri-state gates, adders, multipliers, registers, memories and mos transistors. Hierarchical design is also supported with support for user defined modules. Save files are based on the Verilog netlist format. TkGate documentation can be found at: http://www.cs.cmu.edu/~hansen/tkgate OPTIONS
The options are as follows: -X script Automaticaly start the simulator and execute the specified simulation script. -p file Print circuit to file without starting GUI. -P printer Print circuit to printer without starting GUI. -l file Read the specified file as a library. -x Automaticaly start the simulator. -q Suppress startup messages. -s Excute with a synchronous X server connection. This option is primarily for debugging. -L lang Specify a locality to use if tkgate has been configued for Japanese support. The locality should be either "ASCII" for Eng- lish, or "ja_JP.EUC" for Japanese. This option can also be set via the LANG environment variable. HISTORY &; CREDITS TkGate begin life as an undergraduate project at Carnegie Mellon University (CMU) in 1987. At that time it was called simply 'gate' and ran under the 'wm' window manager, a windowing system developed at CMU before X11 was widely used. In this incarnation it was used by stu- dents in the computer architecture course at CMU to develop a simple microprocessor (dubbed "The Bat Computer"). After laying dormant for several years, it was resurrected in 1991 and ported to run under X11 with the Xlib API. In this incarnation it was used several times by students in the introductory digital logic course, but after the author graduated and left CMU, it went into hibernation again. This Tcl/Tk incarnation was begun in 1998. While there is certainly some cruftyness in the implementation in places due to the multiple rein- carnations, many new features have been added since the older wm and X11 versions, and the interface has been made much easier to use. SEE ALSO
gmac(1) AUTHOR
Jeffery Hansen (hansen@cmu.edu) COPYRIGHT
Copyright (c) 1987-2004 by Jeffery Hansen TKGATE(1)
All times are GMT -4. The time now is 10:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy