Sponsored Content
Top Forums Shell Programming and Scripting error running sqlplus from shell file Post 302284639 by mmunir on Friday 6th of February 2009 02:19:21 AM
Old 02-06-2009
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



ERROR:
ORA-12162: TNS:net service name is incorrectly specified


SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus


user/password and service all are correct.

Can any body tell me where i am going wrong?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

running shell script from sqlplus

I have a script which connects to different database servers using sqlplus. Is there a way by which I can run a shell command on that host from sqlplus? I know about 'host' command but it runs script on the local machine where the original script is running. Is there a way to run command on the... (9 Replies)
Discussion started by: dkr123
9 Replies

2. Shell Programming and Scripting

To pass the .sql file as a paramter to sqlplus through shell programming

Hi, Currently i have a .sql file 1.sql. I need to pass that as a parameter through a shell script to the sqlplus inside the same shell script. How I should I do.can anyone help me pls. I have an req where I need to send the .sql file and the place where the script has to create a .csv... (9 Replies)
Discussion started by: Hemamalini
9 Replies

3. Shell Programming and Scripting

error in passing a variable to sqlplus from a shell script

hi, I am using a shell script from where i will be conecting to sqlplus.. i am having a problem in passing a variable to sqlplus query.. i will be assigning the variable in the unix environment..whenever i am trying to pass a variable having the contents greater than 2500 characters, i am... (3 Replies)
Discussion started by: kripssmart
3 Replies

4. Shell Programming and Scripting

sqlplus error output to different error log file

HELLO, I am using such a command to write oracle sqlplus query result to text file: sqlplus -S xxx/xxx@xxxxxxx @\tmp\2.sql>\tmp\123.txt Is it possible to script that: If command succesfull write in \tmp\log.txt: timestamp and "succeded" and create 123.txt with results else If error... (2 Replies)
Discussion started by: tomasba
2 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

Error while using sqlplus command inside 'if' condition in an unix shell script

Hi all, I am using the below given sqlplus command in my unix script to invoke a stored procedure which returns a value .It works fine. RET_CODE=$(/opt/oracle/product/10.2.0.4.CL/bin/sqlplus -S $USER/$PASSWD@$DB_NAME <<EOF EXEC MY_PKG.MY_SP (:COUNT); PRINT COUNT; commit; ... (6 Replies)
Discussion started by: Shri123
6 Replies

7. 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

8. 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

9. Windows & DOS: Issues & Discussions

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. start putty.exe -ssh user@host -pw pwd -m C:\2.txt 2. In 2.txt, I have below command. ... (3 Replies)
Discussion started by: PavanPatil
3 Replies

10. 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
asadmin-delete-ssl(1AS) 					   User Commands					   asadmin-delete-ssl(1AS)

NAME
asadmin-delete-ssl, delete-ssl - deletes the ssl element from the HTTP listener,IIOP listener, or IIOP service SYNOPSIS
delete-ssl --user admin_user[--password admin_password] [--host localhost] [--port 4848][--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] --type [http-listener|iiop-listener|iiop-service] [listener_id] Deletes the ssl element from the HTTP listener, IIOP listener, or IIOP service. The listener_id is not required if the --type option is iiop-service. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. --type type of service or listener that the SSL is deleted. The type can be: http-listener, iiop-listener, and iiop-ser- vice. OPERANDS
listener_ID the ID of the listener or service that the SSL is deleted. This operand is not required if the --type option is iiop-service. Example 1: Using delete-ssl asadmin> delete-ssl --user admin --password adminadmin --host fuyako --port 7070 --type http-listener http-listener-1 Deleted SSL in HTTP Listener Where: SSL is deleted for http-listener-1. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-ssl(1AS) J2EE 1.4 SDK March 2004 asadmin-delete-ssl(1AS)
All times are GMT -4. The time now is 06:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy