Subject: | schema create=static fails on MS-SQL when using a specified database |
Dumping the schema via catalyst model helper:
/script/tournamaxx_create.pl model MyDB DBIC::Schema MySchema
create=static "dbi:Sybase:server=myserver;database=mydb;port=1433;"
mylogin mypassword
fails on _get_server_version, as the version stored procedure is in
the master db, not the used db. (DBD::Sybase using freetds for the
communication layer from a linux machine: Mandriva 2009.5, perl
5.10.0, updated cpan packages using local::lib).
in DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm
replacing:
my $product_version = $self->_get_dbh->selectrow_hashref('xp_msver
ProductVersion');
with:
my $product_version =
$self->_get_dbh->selectrow_hashref('master.dbo.xp_msver
ProductVersion');
solved the problem.