Running SQLPLUS from Shellscripting ...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running SQLPLUS from Shellscripting ...
# 1  
Old 06-08-2006
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  
Old 06-08-2006
Please read our rules. In particular:

(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.
# 3  
Old 06-12-2006
Ok.. finally found the solution.. with lots of (re)search..

here is the solution

1) user (say ops$usr1 should be externally identiifed user is Oracle)
2) Define the OS_AUTHENT_PREFIX parameter in the init.ora to define the prefix used in the Oracle usernames:
OS_AUTHENT_PREFIX=OPS$
3) set ORACLE_HOME and ORACLE_SID while calling sqlplus

This should work
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

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

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

5. Shell Programming and Scripting

Running SQLPLUS Script in CRONTAB

Hi, Can someone please help me here with this one. This is my script: # more tosh.sh #!/usr/bin/ksh clear . /home/oracle/.profile echo "Good morning, world." export ORACLE_HOME=/u01/app/oracle/product/9.0.1 export PATH=$ORACLE_HOME/bin:/usr/local/bin export ORACLE_SID=xxxx ... (11 Replies)
Discussion started by: santoshpayal
11 Replies

6. Shell Programming and Scripting

Running Oracle SqlPlus with Java in Kshells

Hello, This may not be the right place to ask for help for this problem but i might be because i'm using Java & SqlPlus in alot of Kshell scripts. Just to give a high level picture, i'm basically using Java to control each SqlPlus execute command, by reading a flat file that contains the run... (2 Replies)
Discussion started by: bobk544
2 Replies

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

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

9. Shell Programming and Scripting

New to shellscripting....need some help!

I have 3 shell scripts below.... I need to write a command line parser for these 3 utilities. basically the parser will accept ANY number of commands in this syntax -r = right -f = findtext -c = count so you do something like mu.s -r 3 4 5 -f hello goodbye.txt -c *.c -h 5 4 3 right... (5 Replies)
Discussion started by: TurboArkhan
5 Replies

10. 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
Login or Register to Ask a Question