-
1. Re: connexion postgresql / perl
MunKeong Lee Oct 24, 2019 3:16 AM (in response to nicolas castel)2 of 2 people found this helpfulHi Nicolas:
Please do the following:
1. Add C:\Program Files\BMC Software\Control-M EM\Default\pgsql32\bin to the Path system environment variable. The required Postgres DLLs are located in this folder. Adding it will enable the Perl module to locate them.
2. The Postgres client that comes with EM is 32-bit. Make sure you are using 32-bit Perl.
3. Use ODBC Data Sources (32bit) to add Data Source.
You may want to take note of the following points as well:
1. It's not necessary to use ODBC. You can make of DBI like this:
my $dbh = DBI->connect('dbi:Pg:dbname=emdb;host=SVTFRCTM01;port=5432','emuser','password',{AutoCommit=>1,RaiseError=>1,PrintError=>0});
2. Look like you are using another installation of Perl. This should work fine. However BMC provided Perl in C:\Program Files\BMC Software\Control-M EM\Default\bmcperl folder as well.
Regards,
MK
-
2. Re: connexion postgresql / perl
nicolas castel Oct 28, 2019 9:55 AM (in response to MunKeong Lee)thank you for your kind answer
-
3. Re: connexion postgresql / perl
nicolas castel Oct 28, 2019 11:01 AM (in response to MunKeong Lee)hi , i just tried but it doesn't work =>
install_driver(Pg) failed: Can't load 'C:/Adminsouf/souffletPerl/perl/vendor/lib/auto/DBD/Pg/Pg.dll' for module DBD::Pg: load_file:\
The specified module could not be found at C:/Adminsouf/souffletPerl/perl/lib/DynaLoader.pm line 190.
at C:/Adminsouf/souffletPerl/perl/minimal/PAR/Heavy.pm line 95.
Compilation failed in require at (eval 48) line 3.
Perhaps a required shared library or dll isn't installed where expected
at C:\Adminsouf\ctm\vbs.pl line 118.
-
4. Re: connexion postgresql / perl
MunKeong Lee Oct 29, 2019 5:36 AM (in response to nicolas castel)Hi
Where did you obtain your Perl installation? I suspect that DBD:Pg (PostgreSQL database driver for the DBI module) may not be installed. You may need to install it separately. The easiest way to overcome this is to use the perl that come installed together with Control-M. It's already pre-installed with DBD:Pg.
Regards,
MK