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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Connecting to Oracle Database dreams5617 Shell Programming and Scripting 4 05-02-2008 12:37 PM
connecting to oracle thro informatica ksmbabu Shell Programming and Scripting 1 04-29-2008 05:52 AM
Connecting to Oracle from Ruby on Rails iBot Oracle Updates (RSS) 0 04-06-2008 05:10 AM
Connecting to Oracle from Shell..What Am I doing Wrong dzyr4tt Shell Programming and Scripting 1 12-21-2006 01:05 AM
Connecting to a Oracle Db using SunOS darmat0712 UNIX for Dummies Questions & Answers 2 03-03-2005 01:17 PM

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 03-20-2007
goodmis goodmis is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 24
Having A Problem Connecting to Oracle Using Cron

Can someone tell me how to prevent this?

stty: standard input: Invalid argument
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

I am running a cron job to run an SQl Query on an Oracle DB.

I can do a ./run_job.sh with no problem but sometimes Oracle returns a connection error when I use cron.

#!/bin/sh

source /home/reports/.bash_profile
source /home/reports/.bashrc

sqlplus login/password@instance

0 8,12,14,18 * * 1-5 /home/reports/cron/run_job.sh
  #2 (permalink)  
Old 03-20-2007
sayydevara sayydevara is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 2
Give the fully qualified instance name

give a try, should work
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:51 AM.


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