ERROR: SQL Save Command Failed

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
Dirk2
Posts: 6
Joined: Wed Jun 08, 2011 2:37 pm

ERROR: SQL Save Command Failed

Post by Dirk2 »

Hello!

Need some help. I am trying to setup cacti on a windows 7 (32Bit) notebook.
Creating a Data Input Method (Scipt/Command) works fine.
When I am trying to create a Data Source i got his Error:
06/08/2011 09:17:15 PM - CMDPHP: Poller[0] ERROR: SQL Save Command Failed for Table 'data_template_rrd'. Error was 'Incorrect integer value: '' for column 'local_data_template_rrd_id' at row 1'
There was no new .rrd file in the Directory C:\htdocs\cacti\rra\ created.
Do I have a rights problem? I think I followed the instruction...

Can someone give me a hint? Tec. support screenshot attached.

Dirk
Attachments
Screenshot_cacti_tec_support.gif
Screenshot_cacti_tec_support.gif (74.9 KiB) Viewed 3074 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: ERROR: SQL Save Command Failed

Post by BSOD2600 »

PIA installed? If so, should be using 2.9.
Plugins / addons installed?

That cacti technical support page show any issues with the tables?
Dirk2
Posts: 6
Joined: Wed Jun 08, 2011 2:37 pm

Re: ERROR: SQL Save Command Failed

Post by Dirk2 »

Thanks for your quick reply!

PIA is not installed - should I?
I have no Plugins / addons yet installed.
The technical support page shows for all tables Check Status OK.

Any hints?

Dirk
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: ERROR: SQL Save Command Failed

Post by BSOD2600 »

No need for PIA unless you want to use the various plugins.

How did you install cacti and the database?
Can you post a screenshot of the page with the save error?
Dirk2
Posts: 6
Joined: Wed Jun 08, 2011 2:37 pm

Re: ERROR: SQL Save Command Failed

Post by Dirk2 »

My installation procedure:
- downloaded php-5.2.17-Win32-VC6-x86.msi, cacti-0.8.7g.zip, rrdtool-1.2.30-bin-w32.zip, mysql-5.5.12-win32.msi and phpMyAdmin-3.4.0-all-languages.zip
- followed the instruction from: http://www.cacti.net/downloads/docs/htm ... ndows.html exept:
- I used phpMyAdmin to create the MySQL Database. When importing cacti.sql I got the attached "TYPE" Error. I changed TYPE by ENGINE in the cacti.sql and the import works fine.

Could this be a reason?
Attachments
Screenshot Cacti cacti.sql failed.gif
Screenshot Cacti cacti.sql failed.gif (111.55 KiB) Viewed 3060 times
Screenshot Cacti SaveFailed.gif
Screenshot Cacti SaveFailed.gif (171.9 KiB) Viewed 3060 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: ERROR: SQL Save Command Failed

Post by BSOD2600 »

1) always a good idea to install the latest patches http://www.cacti.net/download_patches.php
2) I'd revert back to the latest mysql 5.1.x branch.
Dirk2
Posts: 6
Joined: Wed Jun 08, 2011 2:37 pm

Re: ERROR: SQL Save Command Failed

Post by Dirk2 »

Can you give me a hint where to find the
latest mysql 5.1.x branch
in this forum?

Dirk
Dirk2
Posts: 6
Joined: Wed Jun 08, 2011 2:37 pm

Re: ERROR: SQL Save Command Failed

Post by Dirk2 »

thanks,

I installed MySQL version 5.5.13. This did not solve my problem.
I set the poller logging level to low and tryed to create a data source again. Here is what i got:
06/17/2011 02:58:47 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1366', SQL:"INSERT INTO poller_item (local_data_id, host_id, action,hostname, snmp_community, snmp_version, snmp_timeout, snmp_username, snmp_password, snmp_auth_protocol, snmp_priv_passphrase, snmp_priv_protocol, snmp_context, snmp_port, rrd_name, rrd_path, rrd_num, rrd_step, rrd_next_step, arg1, arg2, arg3) VALUES (19, 0, 1,'None', '', '', '', '', '', '', '', '', '', '', '', 'C:\\htdocs\\cacti\\rra\\ds_3_19.rrd', '1', '300', '0', 'c:/perl/bin/perl.exe c:/htdocs/cacti/scripts/wetter.pl', '', '')'
Direct executing of this SQL-statement results in
#1366 - Incorrect integer value: '' for column 'snmp_version' at row 1
.
Why did CACTI need the snmp data?
In the general settings I set SNMP Version to "Not In Use" - I dont need SNMP (want to use data input from script/command only).
So I dont have net-snmp installed - need I?

Dirk
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: ERROR: SQL Save Command Failed

Post by BSOD2600 »

Since this is a new install, I'd purge the database and reimport it again with mysql 5.1.x, making sure there are no errors this time around.

If you don't want to use snmp, then change the Downed Device Detection method. You don't need net-snmp installed unless you need to use snmpv3 (since its lacking from the php snmp extension).
Dirk2
Posts: 6
Joined: Wed Jun 08, 2011 2:37 pm

Re: ERROR: SQL Save Command Failed

Post by Dirk2 »

After some investigation here my status:
- when trying to create a "Data Source" without a "Data Template" I get a save ERROR: Incorrect value for 'local_data_template_rrd_id' [SQL Save Command Failed for Table 'data_template_rrd'. Error was 'Incorrect integer value: '' for column 'local_data_template_rrd_id' at row 1']
- when I use a "Data Template" to create a "Data Source" everything is fine, so this is a workaround, not a solution

> Has anybody insight to explain why the database seems to need a local_data_template_rrd_id?

Dirk

PS: I can now start to work with cacti :D
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: ERROR: SQL Save Command Failed

Post by BSOD2600 »

Dirk2 wrote:After some investigation here my status:
- when trying to create a "Data Source" without a "Data Template" I get a save ERROR: Incorrect value for 'local_data_template_rrd_id' [SQL Save Command Failed for Table 'data_template_rrd'. Error was 'Incorrect integer value: '' for column 'local_data_template_rrd_id' at row 1']
- when I use a "Data Template" to create a "Data Source" everything is fine, so this is a workaround, not a solution
This is a training issue. you cannot have a data source without a data template.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest