The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
pwd & cd commands not working in shell script perk_bud Shell Programming and Scripting 9 04-07-2008 07:11 AM
Shell script is not working... vishalpatel03 Shell Programming and Scripting 2 01-10-2008 05:19 PM
cd command is not working in my shell script amitrajvarma Shell Programming and Scripting 3 10-03-2007 05:04 AM
Shell Script not working on new RS/6000 mariner Shell Programming and Scripting 1 02-14-2006 01:59 PM
Write a shell script to find whether the first day of the month is a working day phani Shell Programming and Scripting 7 03-18-2005 01:59 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-29-2008
govindts govindts is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 63
shell script is not working..

Dear all,

I am writing simple shell script.

#/bin/bash
ORACLE_HOME=/home/app/oracle/product/9.2.0
export ORACLE_HOME
export ORACLE_SID=DATX
$ORACLE_HOME/bin/sqlplus -s datadmin/password <<EOF
execute testproc;
exit;
EOF
~
~

In the above shell script, the oracle instance name is DATX. This instance is available in another server.

db1:/home/app/oracle/admin/DBA/crontab/jobs>sh testproc.sh
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory


SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_string>] | /

ERROR:
ORA-01005: null password given; logon denied


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
DB1:/home/app/oracle/admin/DBA/crontab/jobs>


Can anyone help me what is wrong here...
  #2 (permalink)  
Old 07-29-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
If the Oracle instance is on another server, don't you need to connect via TNS? i.e. specify the TNS name (datadmin/password@name), make sure it is present in tnsnames.ora, etc.
  #3 (permalink)  
Old 11-18-2008
Geller Geller is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 19
Try this:

#/bin/bash
export ORACLE_SID=DATX
export ORACLE_HOME=/home/app/oracle/product/9.2.0
sqlplus -s datadmin/password <<EOF
execute testproc;
exit;
EOF
~
~
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0