Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQL Error: ORA-00910: specified length too long for its datatype

947157Aug 14 2012 — edited Aug 14 2012
Using Oracle 11.2.0.1 on Oracle Linux 5.8 x64

I am trying to install Zabbix http://www.zabbix.com and am using Oracle database as the data store. The supplied schema script below is not working.
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
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
According to the oracle documentation the limit for nvarchar2 is 4000. What have I missed here?
This post has been answered by Hoek on Aug 14 2012
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 11 2012
Added on Aug 14 2012
2 comments
4,175 views