The UNIX and Linux Forums  

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
Running a Script in a Remote server ZeroGPX Shell Programming and Scripting 2 03-07-2008 08:07 PM
Script to check running processes on remote server. amitsayshii Shell Programming and Scripting 5 10-06-2006 04:43 AM
Running a remote Server through perl script chandrak Shell Programming and Scripting 0 02-13-2006 12:25 AM
running a script on remote server. whited05 Shell Programming and Scripting 1 10-20-2005 06:07 AM
Running shell scripts on a remote server pepintheshort UNIX for Dummies Questions & Answers 2 07-22-2003 05:20 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-08-2007
sureshg_sampat sureshg_sampat is offline
Registered User
  
 

Join Date: Nov 2006
Location: Czech Republic
Posts: 49
Running an informix query on remote server

Hi,

I have the following query:

-------------------------------------------------------------------
set -xv
ssh <remote server name> -l <login>
export CLIENT_LOCALE=<some value>
export INFORMIXDIR=<directory name>
TERM=vt100 $INFORMIXDIR/bin/dbaccess sysmaster@dwem_test<<EOF>temp.txt
select d.name dbspace,
c.pagesize
from sysdbspaces d, syschunks c
where d.dbsnum = c.dbsnum
group by 1,2
having d.name = "dw_em1_comdbs1"
order by 1
EOF
-----------------------------------------------------------------------

Aim is to write a unix script (assuming script is placed in the source unix box) which will connect to the remote server via ssh command. Next it should execute an informix query on the remoteserver and the results fetched shuld be saved on the unix box

I tried executing this above query, but it doesnot work
Can any one provide some inputs if am missing some syntax

Thanks in advance,
Suresh
  #2 (permalink)  
Old 10-08-2007
devtakh devtakh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore
Posts: 514
what is the error are you getting?

Did you miss a semicolon after TERM=vt100 ?


cheers,
Devaraj Takhellambam
  #3 (permalink)  
Old 10-09-2007
sureshg_sampat sureshg_sampat is offline
Registered User
  
 

Join Date: Nov 2006
Location: Czech Republic
Posts: 49
Running an informix query on remote server

Hi,

I got the error message as
/<informixdir>/bin/dbaccess not found....

When I try to directly connect to remote server and execute the dbaccess cmd..it works fine.

But running via script is creating this error message
Please suggest

Thanks
Suresh
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 06:18 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