[ZBX-17512] Oracle: Not possible to import some media type integrations into DB due to input length limitation Created: 2020 Mar 26  Updated: 2024 Apr 10  Resolved: 2020 May 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Server (S), Templates (T)
Affects Version/s: 4.4.7, 5.0.0alpha3
Fix Version/s: 5.0.0rc1, 5.0 (plan)

Type: Problem report Priority: Critical
Reporter: Sergejs Olonkins Assignee: Viktors Tjarve
Resolution: Fixed Votes: 1
Labels: integration, mediatypes, oracle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2020-04-27-12-52-07-549.png     PNG File image-2020-04-27-12-53-05-026.png     PNG File image-2020-04-27-12-53-51-630.png     PNG File loss-of-bsn.png     PNG File oracle.png     File oracle_log2.log     PNG File postgresql-media.png    
Issue Links:
Causes
causes ZBX-18359 gen_data.pl generates wrong data.sql ... Closed
Team: Team A
Sprint: Sprint 63 (Apr 2020)
Story Points: 1

 Description   

Problem description: when importing schema.sql and data.sql files into an Oracle database, import of some of the media types fails due to limited number of character per field. Errors like below are observed:

ERROR at line 1:
ORA-00926: missing VALUES keyword

Input truncated to 7499 characters
SP2-0027: Input is too long (> 2499 characters) - line ignored
Input truncated to 7499 characters
SP2-0027: Input is too long (> 2499 characters) - line ignored
hr(13) || chr(10) || '} catch (error) {' || chr(13) || chr(10) || 'Zabbix.Log(3, ''Slack notification failed : '' + error);' || chr(13) || chr(10) || 'throw ''Slack notification failed : '' + error;' || chr(13) || chr(10) || '}','30s','1','1','{EVENT.TAGS.__message_link}','Open in Slack: {EVENT.TAGS.__channel_name}','')
*
ERROR at line 2:
ORA-00926: missing VALUES keyword

Input truncated to 7499 characters
SP2-0027: Input is too long (> 2499 characters) - line ignored
SP2-0027: Input is too long (> 2499 characters) - line ignored
INSERT INTO media_type (mediatypeid,type,name,smtp_server,smtp_helo,smtp_email,exec_path,gsm_modem,username,passwd,status,smtp_port,smtp_security,smtp_verify_peer,smtp_verify_host,smtp_authentication,exec_params,maxsessions,maxattempts,attempt_interval,content_type,script,timeout,process_tags,show_event_menu,event_menu_url,event_menu_name,description)

Steps to reproduce:

  1. Set up an oracle database
  2. Run ./configure (dont forget to add --with-oracle=/opt/oracle/instantclient_19_6), make, make install and make dbschema commands
  3. Import the data.sql, schema.sql and images.sql to Your oracle database.

Result: multiple errors like "SP2-0027: Input is too long (> 2499 characters) - line ignored" are observed. Full import log is available here: oracle_log2.log

Expected: all media type integrations should be successfully imported.



 Comments   
Comment by Viktors Tjarve [ 2020 Apr 30 ]

Released in:

Generated at Tue Jan 07 13:59:58 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.