Home > CentOS, Perl > CentOS: Configurar Perl DBD Module para conectar a bases de datos SQL Server

CentOS: Configurar Perl DBD Module para conectar a bases de datos SQL Server

Intro

Pre-Req

Para ejecutar el siguiente tutorial se recomienda haber leido y ejecutado los siguientes (en orden):
CentOS: Instalar y configurar perl
CentOS: Instalar y configurar FreeTDS

How to

1.Get Source

Here you have two choices
a) Execute as root

perl -MCPAN -e 'install DBD::Sybase'

Or
b)

wget http://search.cpan.org/CPAN/authors/id/M/ME/MEWP/DBD-Sybase-1.09.tar.gz
tar xfvz DBD-Sybase-1.09.tar.gz
cd DBD-Sybase-1.09

2. Modify sources to compile by hand

Now, follow next steps (http://www.monitoring-portal.org/wbb/index.php?page=Thread&threadID=14583). If you choice A option, then search dbimp.c file inside your /root/.cpan/build folder. If you choice B option, then just search in your current DBD-Sybase-1.09 folder like the above link

There you need to patch the file “dbdimp.c” (vi dbdimp.c).
Search there for the syntax “syb_init”. Add some lines before the function:

#undef CS_VERSION_150
#undef CS_VERSION_125
#undef CS_VERSION_120
#undef CS_DATE_TYPE 
#undef CS_BIGINT_TYPE

3. Compile and Install

Start Compiling

perl Makefile.PL

When ask for Sybase server to use (default: SYBASE) type your [SQLSERVER] added to freetds
Now type

make test

At last type

make install

Another possibility to configure DBD::Sybase is (http://monkeygumbo.com/news/mt/mt-comments.cgi?entry_id=318)

About these ads
Categories: CentOS, Perl

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: