Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to set an enviroment variable require for test?

Posted on 2009-02-22
5
Medium Priority
?
341 Views
Last Modified: 2012-05-06
Hi!
i want to connect to postresplus database thru' perl
im using DBD::pgpp driver.
In readme i notice that i need to change the variable to test my driver but where to change?

0
Comment
Question by:tankergoblin
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:Rawdust
ID: 23714814
How to set Environment Variables in XP
http://support.microsoft.com/kb/310519
0
 
LVL 7

Author Comment

by:tankergoblin
ID: 23717472
the actual error message i received is

DBI connect('dbname =$dbname;host=$host;port=$port','$username',...)failed:
couldn't connect to /tmp/.s.PGSQL.5444: at C:/Perl/site/lib/DBD/PgPP.pm
0
 
LVL 3

Expert Comment

by:sreindl04
ID: 23731017
The Environment-Variable "TEST" is only used during installation of the package...

Do you still need to install the package? It seems that your problem is not related to installation but to passing the correct parameters to the connection string...


#!/bin/perl 
use DBI;
 
my $dbname = 'my_famous_db';
my $hostname = 'localhost';
my $port = 5432; # optional, but to keep it complete
my $user = 'username';
my $password = "I won't tell";
 
my $dbh = DBI->connect("dbi:PgPP:dbname=$dbname;host=$hostname;port=$port", $username, $password)
    or die $DBI::errstr;

Open in new window

0
 
LVL 7

Author Comment

by:tankergoblin
ID: 23742211
Is that mean after installing tha package i can delete the Enviroment variable?
0
 
LVL 3

Accepted Solution

by:
sreindl04 earned 2000 total points
ID: 23742424
Yes, the variable is only used for isntalling the software and therefore it's not needed any more.
Most perl packages provide some kind of funtionality and integration test during installation.
This is a problem for database packages and they need to know to which database they want to test against.Therefore they ask for connection properties using environment variables.

0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month20 days, 21 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question