Re: [Catalyst] Creating Catalyst Models from MSSQL
Hi, state=1 line=1 server=MyServer text=Invalid object name 'sysrowsetcolumns'. [for Statement SELECT * FROM sysrowsetcolumns WHERE ( 1 = 0 )] at /usr/lib/perl5/site_perl/5.8.8/Catalyst/Helper/Model/DBIC/Schema.pm line 173' At least on MSSQL 2008 sysrowsetcolumns and some other views are hidden and cannot be queried like SELECT * FROM sysrowsetcolumns. The reported error is probably an issue somewhere in DBIx::Class::Schema::Loader (but they are not claiming to support MSSQL - unfortunately). I also seem to remember reading or hearing that DBD::ODBC may be a better solution for MSSQL, but don't quote me on that. DBD::ODBC is a pretty good option that I would recommend if you are on a Win32 system. I am afraid you will not be able to use DBD::ODBC for MSSQL connection from a UNIX system. -- kmx ___ 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/
Re: [Catalyst] Creating Catalyst Models from MSSQL
use freetds. On Tue, Aug 4, 2009 at 4:00 PM, k...@volny.cz wrote: Hi, state=1 line=1 server=MyServer text=Invalid object name 'sysrowsetcolumns'. [for Statement SELECT * FROM sysrowsetcolumns WHERE ( 1 = 0 )] at /usr/lib/perl5/site_perl/5.8.8/Catalyst/Helper/Model/DBIC/Schema.pm line 173' At least on MSSQL 2008 sysrowsetcolumns and some other views are hidden and cannot be queried like SELECT * FROM sysrowsetcolumns. The reported error is probably an issue somewhere in DBIx::Class::Schema::Loader (but they are not claiming to support MSSQL - unfortunately). I also seem to remember reading or hearing that DBD::ODBC may be a better solution for MSSQL, but don't quote me on that. DBD::ODBC is a pretty good option that I would recommend if you are on a Win32 system. I am afraid you will not be able to use DBD::ODBC for MSSQL connection from a UNIX system. -- kmx ___ 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/ -- Jack Malloy ___ 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/
[Catalyst] Why load modules two times?
Please check my error.log: I find the modules were loaded two times? Why? [Tue Aug 04 01:05:14 2009] [notice] caught SIGTERM, shutting down *[debug] Debug messages enabled* [debug] Statistics enabled [debug] Loaded plugins: .. | Catalyst::Plugin::ConfigLoader 0.20 blabla *[info] myapp powered by Catalyst 5.7014* *[debug] Debug messages enabled* [debug] Statistics enabled [debug] Loaded plugins: .. | Catalyst::Plugin::ConfigLoader 0.20 | blabla *[info] myapp powered by Catalyst 5.7014* [Tue Aug 04 01:05:18 2009] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations -- Jack Malloy ___ 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/
Re: [Catalyst] Why load modules two times?
On Tue, Aug 4, 2009 at 10:07 AM, Malloyjackwor...@gmail.com wrote: I find the modulesĀ were loaded two times? [info] myapp powered by Catalyst 5.7014 [Tue Aug 04 01:05:18 2009] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations That's how mod_perl rolls. I think you'll find that the standalone server doesn't load the modules twice. http://perl.apache.org/docs/2.0/user/handlers/server.html Best way to avoid this: don't use mod_perl. -- Lars Balker RasmussenConsult::Perl ___ 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/
Re: [Catalyst] Why load modules two times?
Thanks. On Tue, Aug 4, 2009 at 4:28 PM, Lars Balker Rasmussen l...@balker.dkwrote: On Tue, Aug 4, 2009 at 10:07 AM, Malloyjackwor...@gmail.com wrote: I find the modules were loaded two times? [info] myapp powered by Catalyst 5.7014 [Tue Aug 04 01:05:18 2009] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations That's how mod_perl rolls. I think you'll find that the standalone server doesn't load the modules twice. http://perl.apache.org/docs/2.0/user/handlers/server.html Best way to avoid this: don't use mod_perl. -- Lars Balker RasmussenConsult::Perl ___ 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/ -- Jack Malloy ___ 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/
Re: [Catalyst] Why load modules two times?
Thanks. But Apache2 has not ServerType option, how to set standalone? On Tue, Aug 4, 2009 at 4:28 PM, Lars Balker Rasmussen l...@balker.dkwrote: On Tue, Aug 4, 2009 at 10:07 AM, Malloyjackwor...@gmail.com wrote: I find the modules were loaded two times? [info] myapp powered by Catalyst 5.7014 [Tue Aug 04 01:05:18 2009] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations That's how mod_perl rolls. I think you'll find that the standalone server doesn't load the modules twice. http://perl.apache.org/docs/2.0/user/handlers/server.html Best way to avoid this: don't use mod_perl. -- Lars Balker RasmussenConsult::Perl ___ 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/ -- Jack Malloy ___ 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/
Re: [Catalyst] Why load modules two times?
On Tue, Aug 4, 2009 at 11:20 AM, Malloyjackwor...@gmail.com wrote: But Apache2 has not ServerType option, how to set standalone? Standalone server = perl script/myapp_server.pl Check http://dev.catalystframework.org/wiki/deployment for alternatives to mod_perl. -- Lars Balker RasmussenConsult::Perl ___ 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/
[Catalyst] Issues with Session::Store::DBIC + MSSQL
Hey guys, I am trying to set up Session::Store::DBIC but I am getting no love. Here is all of the relevant (afaik) data: Error: [Tue Aug 4 09:54:25 2009] acd_server.pl: DBIx::Class::ResultSet::find_or_create(): DBI Exception: DBD::ODBC::st fetchrow_array failed: [Microsoft][SQL Native Client]String data, right truncation (SQL-01004) [for Statement SELECT me.id, me.session_data, me.expires FROM Session me WHERE ( me.id = ? ) with ParamValues: 1='session:c28d6383a2b334128738f4b70ee08ff7df5cd737'] at c:/strawberry/perl/site/lib/Catalyst/Plugin/Session/Store/DBIC/Delegate.pm line 73 SQL Creation Script CREATE TABLE dbo.Session ( id char(72) NOT NULL, session_data text, expires int ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE dbo.Session ADD CONSTRAINT PK_Session PRIMARY KEY CLUSTERED ( id ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] GO COMMIT DBIC Model: package ACD::Schema::Result::Session; use base DBIx::Class; use strict; use warnings; use Method::Signatures::Simple; use CLASS; CLASS-load_components(qw/Core/); CLASS-table('Session'); CLASS-add_columns(qw/ id session_data expires /); CLASS-set_primary_key('id'); 'Truth-fact!'; Configuration in ACD.pm session = { dbic_class = 'DB::Session', expires= 60*60, # one hour }, Does anyone have any ideas regarding this? -- fREW Schmidt http://blog.afoolishmanifesto.com ___ 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/
Re: [Catalyst] Creating Catalyst Models from MSSQL
Hi, just to let everyone know, I never was able to get DBIx::Class::Schema::Loader to create my schemas automatically. However, I took the create=static option out, let Catalyst create just the model, and then manually created my schema, and was able to get my Catalyst app working with MSSQL using freetds. It's kind of a PITA to have to manually create all my schemas, but at least it works. - Meeko On Tue, Aug 4, 2009 at 4:00 AM, k...@volny.cz wrote: Hi, state=1 line=1 server=MyServer text=Invalid object name 'sysrowsetcolumns'. [for Statement SELECT * FROM sysrowsetcolumns WHERE ( 1 = 0 )] at /usr/lib/perl5/site_perl/5.8.8/Catalyst/Helper/Model/DBIC/Schema.pm line 173' At least on MSSQL 2008 sysrowsetcolumns and some other views are hidden and cannot be queried like SELECT * FROM sysrowsetcolumns. The reported error is probably an issue somewhere in DBIx::Class::Schema::Loader (but they are not claiming to support MSSQL - unfortunately). I also seem to remember reading or hearing that DBD::ODBC may be a better solution for MSSQL, but don't quote me on that. DBD::ODBC is a pretty good option that I would recommend if you are on a Win32 system. I am afraid you will not be able to use DBD::ODBC for MSSQL connection from a UNIX system. -- kmx ___ 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/ ___ 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/
Re: [Catalyst] Creating Catalyst Models from MSSQL
Amiri Barksdale wrote: I also seem to remember reading or hearing that DBD::ODBC may be a better solution for MSSQL, but don't quote me on that We use DBD::ODBC for MSSQL with little problem. The main issue was to get quoting right. We enabled portability by getting MySQL to use ANSI quotes, and using the following (we use YAML) configuration when talking to MSSQL: connect_info: - 'dbi:ODBC(dbi_connect_method=connect_cached):Driver={SQL Server};Server=localhost;database=armdb' - 'username' - 'password' - AutoCommit: 1 - quote_char: '' name_sep: '.' The additional quote_char and name_sep args were required to get DBIC to do the right thing. All the best Stuart -- Stuart Watt ARM Product Developer Information Balance ___ 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/
Re: [Catalyst] Creating Catalyst Models from MSSQL
On Tue, 4 Aug 2009 12:16:36 -0400 Meeko meeko.li...@gmail.com wrote: Hi, just to let everyone know, I never was able to get DBIx::Class::Schema::Loader to create my schemas automatically. However, I took the create=static option out, let Catalyst create just the model, and then manually created my schema, and was able to get my Catalyst app working with MSSQL using freetds. It's kind of a PITA to have to manually create all my schemas, but at least it works. - Meeko Hi, At my last job I was able to create a schema from a MSSQL server using DBIx::Class::Schema::Loader. I believe I specified specifically what tables I wanted it to create a schema for, though. I did have to ignore a few warnings about column types, and manually tweak a few other things. In any case, it is possible and saved me a ton of time since the tables had way too many columns. -- Lee ___ 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/
Re: [Catalyst] Issues with Session::Store::DBIC + MSSQL
On 2009-08-04 10:20:22 -0500, fREW Schmidt wrote: I am trying to set up Session::Store::DBIC but I am getting no love. Here is all of the relevant (afaik) data: Error: [Tue Aug 4 09:54:25 2009] acd_server.pl: DBIx::Class::ResultSet::find_or_create(): DBI Exception: DBD::ODBC::st fetchrow_array failed: [Microsoft][SQL Native Client]String data, right truncation (SQL-01004) [for Statement SELECT me.id, me.session_data, me.expires FROM Session me WHERE ( me.id = ? ) with ParamValues: 1='session:c28d6383a2b334128738f4b70ee08ff7df5cd737'] at c:/strawberry/perl/site/lib/Catalyst/Plugin/Session/Store/DBIC/Delegate.pm line 73 That session ID is 48 characters long, but your table was created with a column length of 72 characters (as recommended in the docs). Could you try creating the table using a VARCHAR instead of CHAR? Perhaps MSSQL is being strict about the length of the input string. If this turns out to be the case, think you could throw together a doc patch? SQL Creation Script CREATE TABLE dbo.Session ( id char(72) NOT NULL, session_data text, expires int ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO -- Daniel Westermann-Clark ___ 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/