Ad Widget

Collapse

Trying out Zabbix with Oracle as data store

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • keymoo
    Junior Member
    • Aug 2012
    • 1

    #1

    Trying out Zabbix with Oracle as data store

    Using Oracle 11.2.0.1 on Oracle Linux 5.8 x64

    I am trying to install Zabbix and am using Oracle database as the data store. The supplied schema script below is not working.
    Code:
    CREATE TABLE maintenances (
    	maintenanceid            number(20)                                NOT NULL,
    	name                     nvarchar2(128)  DEFAULT ''                ,
    	maintenance_type         number(10)      DEFAULT '0'               NOT NULL,
    	description              nvarchar2(2048) DEFAULT ''                ,
    	active_since             number(10)      DEFAULT '0'               NOT NULL,
    	active_till              number(10)      DEFAULT '0'               NOT NULL,
    	PRIMARY KEY (maintenanceid)
    );
    When I run it, I get
    Code:
    Error at Command Line:5 Column:42
    Error report:
    SQL Error: ORA-00910: specified length too long for its datatype
    00910. 00000 -  "specified length too long for its datatype"
    *Cause:    for datatypes CHAR and RAW, the length specified was > 2000;
               otherwise, the length specified was > 4000.
    *Action:   use a shorter length or switch to a datatype permitting a
               longer length such as a VARCHAR2, LONG CHAR, or LONG RAW
    This is because the limit is 4000 bytes for nvarchar2 (2000 characters). Also the defaults for number columns should not be surrounded by quotes. This is my first experience of Zabbix and it seems the Oracle db script is buggy, how's the rest of the product?
  • fsouza
    Junior Member
    • Sep 2013
    • 5

    #2
    I had the same problem as I started using the version 2.0
    The solution was auterar the script and edit all the references to NVARCHAR2 to varchar2
    Worked that way, but ....

    Now I'm trying to upgrade to 2.2.2 and ...

    zabbix_server.log:
    * 19745:20131223:085200.904 starting automatic database upgrade
    * 19745:20131223:085200.907 [Z3005] query failed: [-1] ORA-00910: specified length too long for its datatype [alter table modify triggers expression NVARCHAR2 (2048)]
    * 19745:20131223:085200.908 database upgrade failed

    Has anyone reached that level?

    I thank

    Comment

    • revglor
      Junior Member
      • Sep 2012
      • 4

      #3
      sorry, my English is very bad.
      To resolve this trouble I'm editing zabbix-2.2.1/src/libs/zbxdbupgrade/dbupgrade.c
      I replace 2048 to 2000 in lines: 84, 772, 2172, 2179 and now it's(update 2.0 -> 2.2) working fine.

      Comment

      • Isis
        Junior Member
        • Feb 2014
        • 2

        #4
        When creating the database, there are options to change the database character set and the national character set. The national charcater set needs to be set to UTF-8 as this has an effect on the nvarchar2 data type.

        Hope that helps.

        Pete

        Comment

        Working...