Sponsored Content
Full Discussion: Checking SQL DB Availability
Top Forums Shell Programming and Scripting Checking SQL DB Availability Post 302888305 by SeaSoul on Thursday 13th of February 2014 06:49:23 PM
Old 02-13-2014
Quote:
Originally Posted by Yoda
Why you want to test connectivity remotely using ssh?

I would suggest you to create your own tnsnames.ora with database address for establishing connection.

Then point TNS_ADMIN variable to the path where tnsnames.ora is placed and test connectivity locally.
Because I really dont know much about managing DBs, Im working just testing the status of many many servers and this was the way I do it manually, so I think that it would be very simple to just convert it to an script. I have no idea how to create a .ora file, and honestly, I dont want to learn. haha. I jsut need to make this fast and efficient. Thanks for your advices. If this doesnt work I will try to do what u just told me, but ill have to read a little bit first.Smilie

---------- Post updated at 06:49 PM ---------- Previous update was at 06:20 PM ----------

Quote:
Originally Posted by SeaSoul
Because I really dont know much about managing DBs, Im working just testing the status of many many servers and this was the way I do it manually, so I think that it would be very simple to just convert it to an script. I have no idea how to create a .ora file, and honestly, I dont want to learn. haha. I jsut need to make this fast and efficient. Thanks for your advices. If this doesnt work I will try to do what u just told me, but ill have to read a little bit first.Smilie

I was able to do it. Tnak you very much for your help!!!!!
 

10 More Discussions You Might Find Interesting

1. IP Networking

Checking for availability of remote server

Hi. In my KSH script I'm running a command on a remote server. I want to know how I can test to see if the remote server is available (accessible) prior to running the command. Any ideas? My command looks like: `ssh $USER@$TARGET_SERVER_DNS ls -l $REMOTE_FOLDER ` This check should be... (1 Reply)
Discussion started by: dylanmilks
1 Replies

2. Shell Programming and Scripting

Checking for availability of remote server

Hi. In my KSH script I'm running a command on a remote server. I want to know how I can test to see if the remote server is available (accessible) prior to running the command. Any ideas? My command looks like: `ssh $USER@$TARGET_SERVER_DNS ls -l $REMOTE_FOLDER ` This check should be... (4 Replies)
Discussion started by: dylanmilks
4 Replies

3. Shell Programming and Scripting

Checking availability of Web pages through Unix script

Hi Guru's, I need to check the availability of a web page for every one hour through a script. Following is the requirement. 1. Go to http://vsn.srivsn.com 2. If any error encountered in openeing the home page, it should trigger an email with the appropriate error message. 3. If page opens... (6 Replies)
Discussion started by: srivsn
6 Replies

4. Solaris

Printer availability

Hi, Im new in shell programming. I need to know the availability for specific printers. We send requests from solaris to printers located at an NT server. My idea is creating a shell that will monitor availbaility and send an email when something is wrong. I have a file with printers and its... (2 Replies)
Discussion started by: agsarm1971
2 Replies

5. Shell Programming and Scripting

checking sql connectivity in unix

hi, i am using a sqlplus connection in one of my shell scripts. i want to check if the connection is set properly or not.. can i use '$?' to check the status of the sql connectivity..? or is there any other option to do that..? thanks, (1 Reply)
Discussion started by: kripssmart
1 Replies

6. Shell Programming and Scripting

Checking availability of service

HI CAN ANY ONE HELP ME FOR BELOW QUESTION CHECKING AVAILABILITY OF SERVICE IN LINUX (2 Replies)
Discussion started by: satheeshkr_cse
2 Replies

7. Programming

Checking columns in SQL, comparing user input and sizes.

I'm writing a KSH shell script that's using SQL though DB2. If I have a table defined and populated db2 "create table tb(num int,letter char(4))" db2 "insert into tb values(111,a) db2 "insert into tb values(112,b) db2 "insert into tb values(111,c) How can I check if a letter user... (0 Replies)
Discussion started by: busdude
0 Replies

8. Shell Programming and Scripting

Script should keep checking for availability of files.

Hi, I want my script to check for availability of few files contineously for some time. Lets say from 10:00 AM to 10:30 AM script should keep checking on a particular location for each file one by one. If all the files are available then only it should complete the next processing part, else... (2 Replies)
Discussion started by: amit.mathur08
2 Replies

9. SCO

Stop boot system at "Checking protected password and checking subsystem databases"

Hi, (i'm sorry for my english) I'm a problem on boot sco unix 5.0.5 open server. this stop at "Checking protected password and checking subsystem databases" (See this image ) I'm try this: 1) http://www.digipedia.pl/usenet/thread/50/37093/#post37094 2) SCO: SCO Unix - Server hangs... (9 Replies)
Discussion started by: buji
9 Replies

10. Programming

Dynamically checking rules in database tables using SQL

I want to check for rows in a table where all values (except the key) is empty. I am using MySQL 5.5. I plan to do this mechanically, so the approach should work for any table in my database schema. Suppose for illustration purposes I start with the following table: CREATE TABLE `sources` ( ... (4 Replies)
Discussion started by: figaro
4 Replies
General::Interpolated(3)				User Contributed Perl Documentation				  General::Interpolated(3)

NAME
Config::General::Interpolated - Parse variables within Config files SYNOPSIS
use Config::General; $conf = new Config::General( -ConfigFile => 'configfile', -InterPolateVars => 1 ); DESCRIPTION
This is an internal module which makes it possible to interpolate Perl style variables in your config file (i.e. $variable or "${variable}"). Normally you don't call it directly. VARIABLES
Variables can be defined everywhere in the config and can be used afterwards as the value of an option. Variables cannot be used as keys or as part of keys. If you define a variable inside a block or a named block then it is only visible within this block or within blocks which are defined inside this block. Well - let's take a look to an example: # sample config which uses variables basedir = /opt/ora user = t_space sys = unix <table intern> instance = INTERN owner = $user # "t_space" logdir = $basedir/log # "/opt/ora/log" sys = macos <procs> misc1 = ${sys}_${instance} # macos_INTERN misc2 = $user # "t_space" </procs> </table> This will result in the following structure: { 'basedir' => '/opt/ora', 'user' => 't_space' 'sys' => 'unix', 'table' => { 'intern' => { 'sys' => 'macos', 'logdir' => '/opt/ora/log', 'instance' => 'INTERN', 'owner' => 't_space', 'procs' => { 'misc1' => 'macos_INTERN', 'misc2' => 't_space' } } } As you can see, the variable sys has been defined twice. Inside the <procs> block a variable ${sys} has been used, which then were interpolated into the value of sys defined inside the <table> block, not the sys variable one level above. If sys were not defined inside the <table> block then the "global" variable sys would have been used instead with the value of "unix". Variables inside double quotes will be interpolated, but variables inside single quotes will not interpolated. This is the same behavior as you know of Perl itself. In addition you can surround variable names with curly braces to avoid misinterpretation by the parser. SEE ALSO
Config::General AUTHORS
Thomas Linden <tlinden |AT| cpan.org> Autrijus Tang <autrijus@autrijus.org> Wei-Hon Chen <plasmaball@pchome.com.tw> COPYRIGHT
Copyright 2001 by Wei-Hon Chen <plasmaball@pchome.com.tw>. Copyright 2002-2010 by Thomas Linden <tlinden |AT| cpan.org>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> VERSION
2.13 perl v5.12.1 2010-04-09 General::Interpolated(3)
All times are GMT -4. The time now is 03:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy