[Catalyst] DB2 Connection string problem

Kenneth S Mclane ksmclane at us.ibm.com
Wed Mar 28 15:33:38 GMT 2012

Kenneth S Mclane/Dubuque/IBM at IBMUS
"The elegant MVC web framework" <catalyst at lists.scsys.co.uk>
03/28/2012 08:27 AM
Re: [Catalyst] DB2 Connection string problem

"Cosimo Streppone" <cosimo at streppone.it> 
Kenneth S Mclane/Dubuque/IBM at IBMUS 
"The elegant MVC web framework" <catalyst at lists.scsys.co.uk> 
03/28/2012 03:59 AM 
Re: [Catalyst] DB2 Connection string problem

On Tue, 27 Mar 2012 21:32:12 +0200, Kenneth S Mclane <ksmclane at us.ibm.com> 

> am able to connect from Perl directly with a quick test file I wrote.

Ok, then you're 99% done.

> I just cannot figure out how Catalyst passes/parses the arguments.

Maybe you could start by posting your working perl code
and then people on the list can help you transpose
that to the relevant Catalyst parts/plugins?

Just an idea.


Here is my perl script that connects: 

use DBI; 
use DBD::DB2::Constants; 
use DBD::DB2; 

$string = "dbi:DB2:DATABASE=$db; HOSTNAME=$hostname; PORT=$port; 

if ($dbh = DBI->connect($string, $user, $pass)) { 
        print "Success!"; 
else { 
        print "Connection failed with error: $DBI::errstr"; 

I am trying to use the MyApp_create.pl script to create the db model and 
pull in the entire existing schema, but cannot get the script to function 
correctly, it either will not connect or gives an error about not finding 
the db on the "filesystem". Yet the above script indicates success when 
run from the same VM I am using for Catalyst.

Update, I was successful in creating a connection. For future reference if 
anyone else is trying to accomplish this:


This page has instructions for cataloging db's on a remote system. Once 
this is done and an alias created, I was able to get the create script to 
connect using the alias. Note, if you are on a *nix system, db2 should not 
be typed in all caps as the example, this was done on a Win box. 

I now have a different problem as the schema still isn't being created.

Unable to load schema - chosen moniker/class naming style results in 
moniker clashes. Change the naming style, or supply an explicit 
moniker_map: tables "db1"."ASSIGNMENT", "db2"."ASSIGNMENTS" reduced to the 
same source moniker 'Assignment'

Off to research this one. Thanks for the help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120328/587ea98e/attachment.htm

More information about the Catalyst mailing list