Trouble with multiple Device ID's (Local Hard drives)
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- mtartaglia
- Posts: 101
- Last visit: Mon Dec 19, 2022 11:45 am
Re: Trouble with multiple Device ID's (Local Hard drives)
I want it to update every record. I am only updating what is in the view. The view only shows entries for ENDTIME, ENDDATE and ENDSPACE(Free disk space) that are NULL. This is exactly what I need. The script is only meant to run twice a day. Once for the START switch and once for the END switch. I will run it for a few days and report back to you if you like.
Thanks again!
Mike
Thanks again!
Mike
Re: Trouble with multiple Device ID's (Local Hard drives)
But you will update every deviceid with the values for the last device ID. If there is only one device per server then this will not be obvious. You have never said you are updating a view that filters old records. THat will still fail if you miss an end of day update. Add Date intot he key and this can be prevented.
The key needs to be "Server+DeviceID+Date". If this is set as the primary key then you will not be able to corrupt the table with duplicate entries for a day.
The key needs to be "Server+DeviceID+Date". If this is set as the primary key then you will not be able to corrupt the table with duplicate entries for a day.
- mtartaglia
- Posts: 101
- Last visit: Mon Dec 19, 2022 11:45 am
Re: Trouble with multiple Device ID's (Local Hard drives)
However, I agree with you about the the primary key should be more than just the ID field. I will work on that. Thanks again!
Mike