customer backup on db2 problem

Hello, I installed OTRS 3.0.11 on Ubuntu 10.04 without any problem. Now I'm trying to configure the customer backend in db2. To do so, I've pasted customised fragment of Kernel/Config/Defaults.pm into Kernel/Config.pm and after this I have the following error: install_driver(db2) failed: Can't locate DBD/db2.pm in @INC (@INC contains: /usr/sbin/../../Custom /usr/sbin/../../Kernel/cpan-lib /usr/sbin/../.. /usr/Custom /usr/Kernel/cpan-lib /usr /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs/ /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at (eval 195) line 3. Perhaps the DBD::db2 perl module hasn't been fully installed, or perhaps the capitalisation of 'db2' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql. at /opt/otrs//Kernel/System/DB.pm line 210 Customized Kernel/Config.pm configuration fragment is: # CustomerUser # (customer user database backend and settings) $Self->{CustomerUser2} = { Name => 'Database Backend', Module => 'Kernel::System::CustomerUser::DB', Params => { # if you want to use an external database, add the # required settings DSN => 'DBI:db2:db_name:some.server.com:50000', User => 'db2inst1', Password => 'top_secret', Table => 'otrs_customers', # CaseSensitive will control if the SQL statements need LOWER() # function calls to work case insensitively. Setting this to # 1 will improve performance dramatically on large databases. CaseSensitive => 0, }, # customer uniq id CustomerKey => 'login', # customer # CustomerID => 'customer_id', CustomerValid => 'valid_id', CustomerUserListFields => [ 'first_name', 'last_name', 'email' ], # CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'], CustomerUserSearchFields => [ 'login', 'first_name', 'last_name', 'customer_id' ], CustomerUserSearchPrefix => '*', CustomerUserSearchSuffix => '*', CustomerUserSearchListLimit => 250, CustomerUserPostMasterSearchFields => ['email'], CustomerUserNameFields => [ 'title', 'first_name', 'last_name' ], CustomerUserEmailUniqCheck => 1, # # show now own tickets in customer panel, CompanyTickets # CustomerUserExcludePrimaryCustomerID => 0, # # generate auto logins # AutoLoginCreation => 0, # # generate auto login prefix # AutoLoginCreationPrefix => 'auto', # # admin can change customer preferences # AdminSetPreferences => 1, # # use customer company support (reference to company, See CustomerCompany settings) # CustomerCompanySupport => 1, # # cache time to live in sec. - cache any database queries # CacheTTL => 0, # # just a read only source ReadOnly => 1, Map => [ # note: Login, Email and CustomerID needed! # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ], [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ], [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ], [ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ], [ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ], [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ], # [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ], [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ], # [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ], [ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ], [ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ], [ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ], [ 'UserStreet', 'Street', 'street', 1, 0, 'var', '', 0 ], [ 'UserZip', 'Zip', 'zip', 1, 0, 'var', '', 0 ], [ 'UserCity', 'City', 'city', 1, 0, 'var', '', 0 ], [ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ], [ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ], [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ], ], # default selections Selections => { # UserTitle => { # 'Mr.' => 'Mr.', # 'Mrs.' => 'Mrs.', # }, }, }; I'm new to OTRS and Perl so I'll appreciate any help. -- Regards, Grzegorz

Error: "Can't locate DBD/db2.pm" tells you why.
You haven't got the DBD::db2 package installed so Perl doesn't know how to
connect to a db2 database. Either install from the package management
system on your flavour of linux or via CPAN.
Steve
2011/12/21 Grzegorz Budzyński
Hello, I installed OTRS 3.0.11 on Ubuntu 10.04 without any problem. Now I'm trying to configure the customer backend in db2. To do so, I've pasted customised fragment of Kernel/Config/Defaults.pm into Kernel/Config.pm and after this I have the following error:
install_driver(db2) failed: Can't locate DBD/db2.pm in @INC (@INC contains: /usr/sbin/../../Custom /usr/sbin/../../Kernel/cpan-lib /usr/sbin/../.. /usr/Custom /usr/Kernel/cpan-lib /usr /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs/ /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at (eval 195) line 3. Perhaps the DBD::db2 perl module hasn't been fully installed, or perhaps the capitalisation of 'db2' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql. at /opt/otrs//Kernel/System/DB.pm line 210
Customized Kernel/Config.pm configuration fragment is: # CustomerUser # (customer user database backend and settings) $Self->{CustomerUser2} = { Name => 'Database Backend', Module => 'Kernel::System::CustomerUser::DB', Params => { # if you want to use an external database, add the # required settings DSN => 'DBI:db2:db_name:some.server.com:50000', User => 'db2inst1', Password => 'top_secret', Table => 'otrs_customers', # CaseSensitive will control if the SQL statements need LOWER() # function calls to work case insensitively. Setting this to # 1 will improve performance dramatically on large databases. CaseSensitive => 0, },
# customer uniq id CustomerKey => 'login',
# customer # CustomerID => 'customer_id', CustomerValid => 'valid_id', CustomerUserListFields => [ 'first_name', 'last_name', 'email' ],
# CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'], CustomerUserSearchFields => [ 'login', 'first_name', 'last_name', 'customer_id' ], CustomerUserSearchPrefix => '*', CustomerUserSearchSuffix => '*', CustomerUserSearchListLimit => 250, CustomerUserPostMasterSearchFields => ['email'], CustomerUserNameFields => [ 'title', 'first_name', 'last_name' ], CustomerUserEmailUniqCheck => 1,
# # show now own tickets in customer panel, CompanyTickets # CustomerUserExcludePrimaryCustomerID => 0, # # generate auto logins # AutoLoginCreation => 0, # # generate auto login prefix # AutoLoginCreationPrefix => 'auto', # # admin can change customer preferences # AdminSetPreferences => 1, # # use customer company support (reference to company, See CustomerCompany settings) # CustomerCompanySupport => 1, # # cache time to live in sec. - cache any database queries # CacheTTL => 0, # # just a read only source ReadOnly => 1, Map => [
# note: Login, Email and CustomerID needed! # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ], [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ], [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ], [ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ], [ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ], [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ],
# [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ], [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ], [ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ], [ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ], [ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ], [ 'UserStreet', 'Street', 'street', 1, 0, 'var', '', 0 ], [ 'UserZip', 'Zip', 'zip', 1, 0, 'var', '', 0 ], [ 'UserCity', 'City', 'city', 1, 0, 'var', '', 0 ], [ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ], [ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ], [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ], ],
# default selections Selections => {
# UserTitle => { # 'Mr.' => 'Mr.', # 'Mrs.' => 'Mrs.', # }, }, };
I'm new to OTRS and Perl so I'll appreciate any help.
-- Regards, Grzegorz
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
participants (2)
-
Grzegorz Budzyński
-
Steven Carr