Sponsored Content
Operating Systems Linux Red Hat TNS Timeout Error when connecting to SQLPLUS through scripts only Post 302643495 by aashish.sharma8 on Saturday 19th of May 2012 02:14:05 PM
Old 05-19-2012
Password doesn't contains any special character, though I have tried enclosing userid,password and sid in double quotes but no success.

it is not necessary the code will struck at third iteration only.it gets struck at any point.

Another example :

Code:
0
ERROR:
ORA-12170: TNS:Connect timeout occurred

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
1
SYSDATE
---------
19-MAY-12
2
ERROR:
ORA-12170: TNS:Connect timeout occurred

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
3
SYSDATE
---------
19-MAY-12

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

error connecting to sqlplus

Hi, I wrote a shell script to call oracle procedure. But when i am trying to connet sqlplus with the fallowing statement It is giving me error " callproce.sh : sqlplus: not found". What could be the problem. sqlplus -s $CONNECT_STRING >$LOGFILE <<!! thank u all papachi (2 Replies)
Discussion started by: papachi
2 Replies

2. Shell Programming and Scripting

Showing errors when connecting to sqlplus in shell script

hi, I am trying to automate the compilation of procedures stored in .sql files in Unix. Is there any way in which we can sho err if there errors are raised in the compilation? I am using the following code to connect to the sqlplus sqlplus ${SQL_USER}/${SQL_PASSWORD} (5 Replies)
Discussion started by: silas.john
5 Replies

3. Shell Programming and Scripting

control timeout of sqlplus process

Hi, I'm using simple sqlplus to test DB availability. When DB is going down, sqlplus command is hang for a few minutes I want to implement the following: 1. execute sqlplus 2. if after 20 sec I dont get a response, kill the process and exit with error. 3. if I get immediate response... (2 Replies)
Discussion started by: gdan2000
2 Replies

4. Shell Programming and Scripting

connecting through sqlplus

I am trying to connect to one of the oracle sever using uni through sqlplus command: sqlplus -s BOXI_ALPH_AUDITOR,Q078_audit$@Q047 But its not getting connected. I tried using some different server using same syntax its working. What differene i found is the password is having no special... (2 Replies)
Discussion started by: gander_ss
2 Replies

5. UNIX for Dummies Questions & Answers

Connecting to Oracle DB using sqlplus

Hi, I am very new to shell scripting and trying to write a simple shell script in which i am trying to achieve the following: 1. Connect to oracle database hosted on a different server 2. fire a query on the oracle db 3. store the output in a variable 4. use this variable for further logic... (1 Reply)
Discussion started by: shrutihardas
1 Replies

6. Shell Programming and Scripting

Connecting to Oracle DB using sqlplus

Hi, I am very new to shell scripting and trying to write a simple shell script in which i am trying to achieve the following: 1. Connect to oracle database hosted on a different server 2. fire a query on the oracle db 3. store the output in a variable 4. use this variable for further logic... (26 Replies)
Discussion started by: shrutihardas
26 Replies

7. UNIX for Advanced & Expert Users

TNS no listener error when connecting to a new DB

Hi all We connect to 10 Oracle Databases from our UNIX box through the regular TNS file we have on any oracle client installation. Recently we acquired a new connection. I added the entries as usual to the TNS file. The connection fails with the below error message ORA-12541: TNS:no... (2 Replies)
Discussion started by: b_sri
2 Replies

8. UNIX for Advanced & Expert Users

Connecting once using sqlplus and doing multiple queries

Hello everyone, It's my first week using unix and shell scripting. I tried creating a script that has a function that execute SQL query. my script looks something like this: ---------------------------------------------------- #!/bin/sh tableName="myTable" secondTable="secondTable"... (2 Replies)
Discussion started by: edlin_r
2 Replies

9. Shell Programming and Scripting

Connecting sqlplus from UNIX with multiple select statement

hi, i have a requirement where i need to connect sqlplus from unix and i am able to do so by following command: cust_count=`sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID << EOF set pagesize 0 set feedback off set verify off ... (1 Reply)
Discussion started by: lovelysethii
1 Replies

10. Shell Programming and Scripting

Sqlplus not connecting the 2nd time in for loop

Hi, I am trying to get the rows(First step is to get the poolid's and then second step run a loop to get the output based on each pool id and third connection is to get the member id and pool id based on a different condition) where based of certain conditions and storing it in a file. I wrote the... (6 Replies)
Discussion started by: ajayakunuri
6 Replies
OCF_HEARTBEAT_SAPDAT(7) 					OCF resource agents					   OCF_HEARTBEAT_SAPDAT(7)

NAME
ocf_heartbeat_SAPDatabase - Manages any SAP database (based on Oracle, MaxDB, or DB2) SYNOPSIS
SAPDatabase [start | stop | status | monitor | validate-all | meta-data | methods] DESCRIPTION
Resource script for SAP databases. It manages a SAP database of any type as an HA resource. SUPPORTED PARAMETERS
SID The unique SAP system identifier. e.g. P01 (required, string, no default) DIR_EXECUTABLE The full qualified path where to find sapstartsrv and sapcontrol. (optional, string, no default) DBTYPE The name of the database vendor you use. Set either: ORA,DB6,ADA (required, string, no default) NETSERVICENAME The Oracle TNS listener name. (optional, string, no default) DBJ2EE_ONLY If you do not have a ABAP stack installed in the SAP database, set this to TRUE (optional, boolean, default false) JAVA_HOME This is only needed if the DBJ2EE_ONLY parameter is set to true. Enter the path to the Java SDK which is used by the SAP WebAS Java (optional, string, no default) STRICT_MONITORING This controls how the resource agent monitors the database. If set to true, it will use SAP tools to test the connect to the database. Do not use with Oracle, because it will result in unwanted failovers in case of an archiver stuck (optional, boolean, default false) AUTOMATIC_RECOVER The SAPDatabase resource agent tries to recover a failed start attempt automaticaly one time. This is done by running a forced abort of the RDBMS and/or executing recovery commands. (optional, boolean, default false) DIR_BOOTSTRAP The full qualified path where to find the J2EE instance bootstrap directory. e.g. /usr/sap/P01/J00/j2ee/cluster/bootstrap (optional, string, no default) DIR_SECSTORE The full qualified path where to find the J2EE security store directory. e.g. /usr/sap/P01/SYS/global/security/lib/tools (optional, string, no default) DB_JARS The full qualified filename of the jdbc driver for the database connection test. It will be automaticaly read from the bootstrap.properties file in Java engine 6.40 and 7.00. For Java engine 7.10 the parameter is mandatory. (optional, string, no default) PRE_START_USEREXIT The full qualified path where to find a script or program which should be executed before this resource gets started. (optional, string, no default) POST_START_USEREXIT The full qualified path where to find a script or program which should be executed after this resource got started. (optional, string, no default) PRE_STOP_USEREXIT The full qualified path where to find a script or program which should be executed before this resource gets stopped. (optional, string, no default) POST_STOP_USEREXIT The full qualified path where to find a script or program which should be executed after this resource got stopped. (optional, string, no default) SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 1800. stop Stops the resource. Suggested minimum timeout: 1800. status Performs a status check. Suggested minimum timeout: 60. monitor Performs a detailed status check. Suggested minimum timeout: 60. Suggested interval: 120. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 5. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5. methods Suggested minimum timeout: 5. EXAMPLE
The following is an example configuration for a SAPDatabase resource using the crm(8) shell: primitive example_SAPDatabase ocf:heartbeat:SAPDatabase params SID=string DBTYPE=string op monitor depth="0" timeout="60" interval="120" SEE ALSO
http://www.linux-ha.org/wiki/SAPDatabase_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_SAPDAT(7)
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy