Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

components needed for Perl connect to MS SQL server on Redhat 8

I am trying to move my website from IIS to Apache on Redhat 8.  I have several Perl scripts on the site that access an MS SQL Server.  So I am trying to configure my new Linux system so that database access from Perl is possible. I have installed Linux with Perl, and tested everything successfully. I've also downloaded and installed DBI.pm.

Here's where I'm stuck: I have downloaded DBD::ODBC, however when I attempt to install it, I get a message that says I need ODBCHOME set in my environment.  I issued 'echo $ODBCHOME' and got nothing.  I understand from my searching that I must set the ODBCHOME environment variable to my ODBC home directory, but I'm not even sure what my ODBC home directory is, or if it's something additional I should install. Is there a specific RPM package missing that I need to install?  Can someone get me moving in the right direction?

Thanks!
0
rustycp
Asked:
rustycp
  • 2
1 Solution
 
linxitCommented:
Yes, there's an RPM package unixODBC-2.2.2-3.i386.rpm (not installed by default unless you install 'Everything').

I think it's on CD3 of the install set.

Andy
0
 
rustycpAuthor Commented:
Ok, I downloaded and installed unixODBC-2.2.2-3.i386.rpm, but when I go to my DBD::ODBC and attempt 'perl Makefile.PL' I still get the error.  Did the unixODBC install the directories I needed, but I have to set the environment varilables?  If so, where did it install them? Here is the exact error message: Thanks!


Using DBI 1.32 installed in /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI

The DBD::ODBC module needs to link with an ODBC 'Driver Manager'.
(The Driver Manager, in turn, needs one or more database specific ODBC drivers.
The DBD::ODBC module does _not_ include any ODBC drivers!)

You need to indicate where your ODBC Driver Manager is installed.
You can do this ether by setting the ODBCHOME environment variable
or by runing 'perl Makefile.PL -o odbcdir'.

If you do not have an ODBC Driver Manager you can try building
the free iODBC Driver Manager in the iodbcsrc directory.

Makefile.PL aborted.
0
 
linxitCommented:
OK, it's a long time since I did this and I don't have access to my Linux box at the moment, but...

# rpm -ql unixODBC
 to list the files installed by the RPM, then set the ODBCHOME variable appropriately.

e.g.
# export ODBCHOME=/usr/lib/odbc (just a guess)

Just in case, it may also be necessary to install the unixODBC-devel RPM as well.

Sorry I can't offer any more specific help.

Andy
You might also want to check out the documentation at www.unixodbc.org
0
 
CleanupPingCommented:
rustycp:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now