After deleting problem manually using query, how to make same problem occurred again in zabbix? - zabbix

As like title, i deleted a problem using query. What i expect to is that makes the same problem happen again.
For example, i have an event - "eventid 1". I delete "eventid 1" at events and problem table.
I think that the same problem should be happen again due to no same problem existed in the events table.
But it doesn't act as i thought.
Is there a way to do that? or Is it not possible?
Thanks in advance.

Related

After Delete Data Macro

I am running into a problem doing something very simple with MS Access data macros. When a record row is deleted from T_Roster, I want it copied to t_Deleted. I know there are a plethora of other and better ways to accomplish this however, the requirements for this are such that a data macro is required. The end user/manager does not want me to add columns to the roster table or use a form (both of which I had initially suggested). That said, I have been scouring the internet for a solution and see that this question has been answered however, I have not been able to get the simple macro to work on my end. I have finally worked up the nerve to ask the question here again so please be kind.
There are only 2 tables in this DB. t_Deleted and T_Roster
I have attached a screen shot of what my current macro looks like. In the interests of keeping things simple, I only want the "OCIO_Name" to copy over for now. I assume that if this test works, the rest of the fields will not be an issue.
Table properties are as follows:
T_Roster Table Properties
t_Deleted Table Properties
Macro in T_Roster:
T_Roster AfterDelete Macro
Can anyone tell me what is wrong with what they see?
edit Does not work means that t_Deleted is not updated when I delete a record from T_roster.
Fields set as required will prevent creating new record unless data is provided for them. Either don't set as required or provide data.

My Audit Trail Isn't Working

I am having a problem getting my audit trail started. If I change "Item Number" on tbl_MBRSummary, a record should be made on tbl_AuditChanges_Tables. This isn't happening and I don't know why. I followed directions to a T from ScottGem... Is there something wrong with this setup?
The macro you're showing us is for Tbl_AuditChanges_Tables, not for Tbl_MBRSummary, and thus won't trigger when you're updating that table.
You need to create the macro on the actual table you're changing, and you need to make sure the If statement actually includes a field you're changing. If you do that, it should work.

Invalid argument Error when attempting UPDATE query on linked SharePoint list

I'm running an UPDATE query from Access 2010 on a linked SharePoint 2013 list, but am getting an Invalid Argument error.
My Access DB is about 200 MB, I have tried compacting and repairing the DB. The query "runs" successfully when I select "View"--the error only appears when I actually click "Run". The query I'm running goes like:
UPDATE
SP_Table INNER JOIN Access_Table on SP_Table.ID1 = Access_Table.ID1
SET
SP_Table.Field1 = Access_Table.Field1,
SP_Table.Field2 = Access_Table.Field2,
--etc...
WHERE
(SP_Table.Field1 <> Access_Table.Field1 AND SP_Table.ID1 = Access_Table.ID1)
OR
(SP_Table.Field2 <> Access_Table.Field2 AND SP_Table.ID1 = Access_Table.ID1)
OR
--etc...
;
This question seems to have the same problem, and the solution even seems plausible, but they're both distinctly lacking in detail. I'm not even sure how to view the PK on my SharePoint list, or how to tell if it's the problem.
Any ideas on how to resolve the error?
I was able to resolve the error, though I'm still not sure what was causing it.
I went through all of the fields in my WHERE clause, and narrowed the issue down to two fields that would cause the query to generate the error if they were included. I compared the fields in both tables, making sure that all of the field settings were identical, but wasn't able to make the query work with them.
Fortunately for me, these fields were not particularly vital, and I can leave them out, but if anyone else has any thoughts, I'd love to have a deeper understanding about what's causing the issue.
EDIT
The error cropped up again in a field that I did care about, so I had to figure out what was causing it. It looks like the "Invalid Argument" error can be caused by a few things, including having the size of either the SharePoint list, SharePoint site, or Access DB being too large. In my case, it appears that I was a victim of corrupt data.
After narrowing down which field was causing the issue, I went through and updated most of the data elements manually on the SharePoint list. Doing that apparently overwrote the corrupt data element that was causing my error, because when I ran the query again, the last few records updated without any issue.
Bottom line, if this happens again, I'm going to check the size of the SP list (no more than 5,000 rows), the size of the SP site (ymmv), the size of the Access DB (no more than 2GB) and then narrow down which field is giving me the error, and try replacing those data elements one at a time until I find the corrupted data element.
I found that in Sharepoint Library -- Version Settings -- Require documents to be checked out set to Yes caused this issue. I set this radio button to No and now I can update SharePoint Library fields from MS Access.
I came across the same problem. Turns out I was returning all rows from one table and only those that matched in the other. There was a missing row in the second table. Change the query to return only rows that match both tables and the problem was sorted.

Why do *some* DATETIME fields in my database corrupt like this? (MySQL/MSACCESS)

Oddly enough, when I click on one of the fields the correct date and time will appear, but revert to it's previous state (###########) once I click away.
Does any body know what could be causing this? I believe one of the queries is corrupting the DATETIME fields in this program. A query randomly broke earlier when it was appending information into a table, and clearing the table solved the problem.
Lol, widen the column display a little bit and then see :) Thats just because the display field is not wide enough. Its nothing related to the data storage itself. Applies to excel as well. Such a common thing.

How to Make ActiveRecord always update a field?

When using ActiveRecord, if you are updating a record, it only adds the fields that have changed to the query. I need a way to tell it to always add a particular field to my query, even if Rails doesn't think it changed. In my example, I always want to set a field to "U" when saving a record. The name of the field is DELETE_FLAG. So, I want to see DELETE_FLAG="U" in the UPDATE query that is sent to MySQL every time.
I've tried DELETE_FLAG_will_change! In the model, but that doesn't seem to have done anything, perhaps because I put it in the wrong place?
I've seen the touch method as well, but this will not do. I don't want to update the record again afterwards.
This seems so basic, I'm sure I must be overlooking something here. Any help would be appreciated. Thanks!