how do i access db2 instance via telnet command prompt


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how do i access db2 instance via telnet command prompt
# 1  
Old 09-05-2010
how do i access db2 instance via telnet command prompt

Hi
I have a perl script code in which connecting with db2 database and doing some process. My perl script code and db2 database server present in the same unix server. I am connecting and executing perl script code via windows telnet. Now my question is i could not able to connect db2 server or invoke my db2 instance..If i give any db2 commands via telnet it's giving command not found. I wanted to invoke db2 instance via telnet through perl script.any help?

thanks in advance..
# 2  
Old 09-05-2010
source the db2profile first. Either run from the command line or place at the top of the script.

Code:
. /home/$your_db2_instance_name/sqllib/db2profile

# 3  
Old 09-06-2010
How do i access db2 instance via telnet command prompt?

still i have a problem i couldn't able to connect db2. I gave the same which you have mentioned above but still i am getting command not found. I have checked manually i have a valid instance with database. I wanted to connect db2 via telnet command prompt.


$ /home/instance_name/sqllib/db2profile
ksh: /home/instance_name/sqllib/db2profile: not found.
$


any help really appreciated..
# 4  
Old 09-07-2010
find /home -name db2profile 2> /dev/null
# 5  
Old 09-07-2010
you need to replace instance_name with your DB2 instance.


ps -ef|grep db2sysc will show you the user(instance)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

SSH and telnet long delay to recieve prompt.

Hi guys. You'd have to excuse me a bit, as I'm a noob. I really try to avoid asking questions and do research for whatever linux issues that may arise. I am experiencing a long wait for the shell to come up when I ssh or telnet into a Sunos 5.10 environment. It takes 70 seconds to give me... (12 Replies)
Discussion started by: gpenco
12 Replies

2. Solaris

Can't use 'break' command, Can't access 'ok' prompt.

Hi I have A Sun Ultra Enterprise 450 server, it has Solaris installed on it. I have A serial terminal hooked up to it (nullmodem cable plugged into serial port 1 on the box, and the other end plugged into the serial port of A laptop (NEC Versa M300)) The laptop is running Ubuntu 12.04.2... (3 Replies)
Discussion started by: SomeoneTwo
3 Replies

3. Shell Programming and Scripting

Access to Prompt

Hello, I have a question concerning the following script which I can execute in a terminal: telnet horizons.jpl.nasa.gov 6775 I will be asked to enter a certain number in order to select an object (just for completness 301=moon, the tool yields the ephemeris for solar system objects)... (5 Replies)
Discussion started by: grobian
5 Replies

4. UNIX for Dummies Questions & Answers

How to disconnect telnet prompt with port no in script.

Hi Gurus, I am trying to write a script for checking the status of linux servers by connecting via telnet with port no but to terminate i have to manually type "quit" .how can i terminate the telnet session in script itself.For E.g ========================================= telnet ipaddress... (3 Replies)
Discussion started by: kapil514
3 Replies

5. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

6. UNIX for Dummies Questions & Answers

Auto-exit from telnet prompt

Hi, Hope all your are doing well. Need a suggestion from you. I am writing an automated shell script that will effectively check the telnet connectivity with different backends from present deployment server. Ideally, this script reads each backend hostname from a configuration file and fires... (4 Replies)
Discussion started by: bhaskar_m
4 Replies

7. Shell Programming and Scripting

Net::Telnet (match prompt)

Hi, The code below is used to telnet to list of devices and configure them. The program executes in this manner: 1. telnet to the first device in file.txt 2. one the telnet command is executed a "press any key to continue" prompts. 3. once a return key is executed it ask for username,... (1 Reply)
Discussion started by: sureshcisco
1 Replies

8. Shell Programming and Scripting

access db2 from shell script

How to connect to db2 through shell script using cygwin? (0 Replies)
Discussion started by: supriyat
0 Replies

9. Shell Programming and Scripting

Telnet in command prompt

Hi, i have typed telnet yahoo.com 80 in command prompt it displays as a blank command prompt page titling as Telnet Yahoo.com Other than that i am not able to get anything. can anyone sort me out the reason for this (12 Replies)
Discussion started by: satheeshkr_cse
12 Replies

10. UNIX for Dummies Questions & Answers

Unable to get the db2 command prompt in unix

Hi, When i try to connect to the db2 database from unix solaris 5.8 version by typing "db2" from the .../sqllib/bin/ folder, i am not getting the db2 command prompt. Could anyone help me resolve this? Here the db2 is executable only. But still iam not getting the db2 prompt. The error i get is... (4 Replies)
Discussion started by: ragavhere
4 Replies
Login or Register to Ask a Question