Sponsored Content
Top Forums Shell Programming and Scripting Connect to Remote DB2 ,using URL ,username,Password Post 302862087 by Rohit G on Thursday 10th of October 2013 06:38:37 AM
Old 10-10-2013
Question Connect to Remote DB2 ,using URL ,username,Password

Hi All,

I am new to Shell scripting,
I want to connect to DB2 database through URL,username and password
Please help me out.

I read so many posts in that there is no where it is mentioned about how to connect to a remote database.

Thanks in advance Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remote Copy without entering Username and Password

I tried the following script to copy one file automatically: #!/bin/csh -f su - root -c "rcp 150.10.128.1:/export/home/sn408Xl/sn408Sol/$fn $fn This works fine but is there a better way to copy remotely without entering the username and password? Moreover, after the file is copied a... (1 Reply)
Discussion started by: ilak1008
1 Replies

2. Shell Programming and Scripting

connect to remote server by applying password

Hi , I am new to shell script. I have to write a shell script which will login to remote server then check for the space there. There 50 remote ervers all are having different password. Could you please suggest me some way. I am working on solaris box. Thanks in advance (2 Replies)
Discussion started by: vikash_k
2 Replies

3. Shell Programming and Scripting

[SSH] Need to connect to remote server as different user and without password

I have a task requiring that USER_A run a script, which connects to HOST_B as USER_B and does not ask for a password. If I am logged in on HOST_A as USER_B, I can connect to HOST_B without a password, no problem. However, if I try running ssh with the command line "ssh USER_B@HOST_B" while... (3 Replies)
Discussion started by: Totengraber
3 Replies

4. Shell Programming and Scripting

Connect db2 using db2 connect

I want to connect to DB2 database which is mainframes using a unix script and run query and get the result set into the unix box. Is this acheivable using db2 connect? pls help me with a sample script which can perform the same. (1 Reply)
Discussion started by: midhun19
1 Replies

5. Shell Programming and Scripting

DB2 Connect Encrypt Password

Hi All, If someone can help me with password encryption. We have shell scripts that connect to a database using db2 connect and we have the password hardcoded in the script. Can someone let me know if there's a way to encrypt this password? I've seen alot of users suggest we create an... (3 Replies)
Discussion started by: rethymno19
3 Replies

6. Shell Programming and Scripting

DB2 Connect issue

Hi i m trying to connect DB2 via unix. it is successfully connect. but the connect is getting disconnect . below is the query , countvalue=$(db2 "connect to <Database> user <username> using <Password>" | db2 -x 'select count(*) from <tablename>' ); echo $countvalue while... (2 Replies)
Discussion started by: baskivs
2 Replies

7. AIX

AIX Remote Connect Fail With “No more multiple IP addresses to connect” Error

We have a production server at a client site running AIX. And recently when users are trying to connect to it via telnet, it prompts "No more multiple IP addresses to connect". Can I know what does this error mean? and how to rectify this? Thanks. (2 Replies)
Discussion started by: a_sim
2 Replies

8. UNIX for Dummies Questions & Answers

Launch a URL,validate username and password using wget or curl

Hi All, I want to launch "ex: http://gmail.com" from the cmd window and validate the credentials with username and password, is it possible? I have found something like this "wget --http-user=USER' --http-password=PASSWORD http://gmail.com" am new to this and unable to find a solution, i... (0 Replies)
Discussion started by: harsha85
0 Replies

9. UNIX for Dummies Questions & Answers

How to connect to DB2 using UNIX

I am new to Putty, Unix and DB2 and this is what I am working on right now. I installed Putty I got access to username / pwd I got Unix usrname/Pwd.also got the home directory once I login into putty I get the screen and it shows $ sign From here how do I connect to DB2 database? I have... (2 Replies)
Discussion started by: JayDoshi
2 Replies

10. HP-UX

Connect to remote server using sftp with password define within command/script

I am trying to connect to remote server in hp-ux, using sftp command (using sftp username@ip and password ) able to connect to remote server but, in this case sftp prompt for password and user need to manually enter it. I want sftp can read a password define in script or from file, so it can... (1 Reply)
Discussion started by: ketanraut
1 Replies
Password(3pm)						User Contributed Perl Documentation					     Password(3pm)

NAME
DBIx::Password - Allows you to create a global password file for DB passwords SYNOPSIS
use DBIx::Password; my $dbh = DBIx::Password->connect($user); my $dbh = DBIx::Password->connect_cached($user); $dbh->getDriver; DBIx::Password::getDriver($user); DBIx::Password::checkVirtualUser($user); DBIx::Password::clearConfig(); DBIx::Password::readConfig("$ENV{HOME}/.my.secret.file"); DESCRIPTION
Don't you hate keeping track of database passwords and such throughout your scripts? How about the problem of changing those passwords on a mass scale? This module is one possible solution. It stores all your virtual users and data in /etc/dbix-password.conf. For each user you need to specify the database module to use, the database connect string, the username and the password. You will have to give a name to this virtual user. You can add as many as you like. I would recommend that if you are only using this with web applications that you change the final permissions on this package after it is installed in site_perl such that only the webserver can read it. A method called getDriver has been added so that you can determine what driver is being used (handy for working out database indepence issues). If you want to find out if the virtual user is valid, you can call the class method checkVirtualUser(). It returns true(1) if the username is valid, and zero if not. Once your are done you can use the connect method (or the connect_cache method) that comes with DBIx-Password and just specify one of the virtual users you defined while making the module. BTW I learned the bless hack that is used from Apache::DBI so some credit should go to the authors of that module. This is a rewrite of the module Tangent::DB that I did for slashcode. If your program does not need the system-wide information stored in the /etc/dbix-password.conf file, you may use the clearConfig() and readConfig() functions to get the data from another source. At any time, readConfig() may also be used to merge the data from another file into the currently-loaded configuration. Hope you enjoy it. HOME
To find out more information look at: http://www.tangent.org/DBIx-Password/ AUTHOR
Brian Aker, brian@tangent.org SEE ALSO
perl(1). DBI(3). perl v5.10.0 2009-05-09 Password(3pm)
All times are GMT -4. The time now is 03:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy