From: Kenneth S Mclane/Dubuque/IBM@IBMUS To: "The elegant MVC web framework" <catalyst@lists.scsys.co.uk> Date: 03/28/2012 08:27 AM Subject: Re: [Catalyst] DB2 Connection string problem
From: "Cosimo Streppone" <cos...@streppone.it> To: Kenneth S Mclane/Dubuque/IBM@IBMUS Cc: "The elegant MVC web framework" <catalyst@lists.scsys.co.uk> Date: 03/28/2012 03:59 AM Subject: Re: [Catalyst] DB2 Connection string problem On Tue, 27 Mar 2012 21:32:12 +0200, Kenneth S Mclane <ksmcl...@us.ibm.com> wrote: > 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. -- Cosimo Here is my perl script that connects: #!/usr/bin/perl use DBI; use DBD::DB2::Constants; use DBD::DB2; $db="dbname"; $hostname="server.fqdn"; $port="55555"; $user="user"; $pass="password"; $string = "dbi:DB2:DATABASE=$db; HOSTNAME=$hostname; PORT=$port; PROTOCOL=TCPIP;"; 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: http://www-01.ibm.com/support/docview.wss?uid=swg21182248 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.
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/