You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old November 16th, 2017, 01:51 AM   #1
rahilansari
Member
India

rahilansari is offline
 
Join Date: Jul 2008
Location: INDIA
Posts: 101
Citect V 5.21 and MySQL 0.9.4 beta.

Hi all,

I have a Citect SCADA V 5.21 and MySQL 0.9.4 beta installed on my Server (Windows Server 2003). All process events are logging in a data base file with an extension events.MYD. Everything was working fine but since last 2 weeks events are not looging into that file and I can only see the events occur before 2 weeks. I am not expert on MySQL and don't know how to fix this. I have restarted the system, compiled the Citect projects and run but still same condition. Can anyone guide me if we assume the problem is from MySQL then how should I fix this.

Any type of support is highly appreciable.
Thanks
Rahil
__________________
Rahil
  Reply With Quote
Old November 16th, 2017, 02:04 AM   #2
rahilansari
Member
India

rahilansari is offline
 
Join Date: Jul 2008
Location: INDIA
Posts: 101
I have attached some screenshot for reference.
Attached Images
File Type: jpg 1.jpg (52.4 KB, 10 views)
File Type: jpg 2.jpg (59.2 KB, 5 views)
File Type: jpg 3.jpg (66.8 KB, 6 views)
File Type: jpg 4.jpg (52.9 KB, 5 views)
__________________
Rahil
  Reply With Quote
Old November 16th, 2017, 02:25 AM   #3
sigmadelta
Member
Canada

sigmadelta is offline
 
Join Date: Apr 2016
Location: From Canada - Living in Bulgaria
Posts: 702
A quick glance makes me think your database is too large for MSQL 0.9.4 beta (4 GB).
__________________
Freelance Automation Programmer
  Reply With Quote
Old November 16th, 2017, 02:34 AM   #4
rahilansari
Member
India

rahilansari is offline
 
Join Date: Jul 2008
Location: INDIA
Posts: 101
Hi, Thanks for your reply.

The system logged the events of 1 year then reset. However if the size is too large what should I do to fix it? Do I need to copy the events.MYD file and delete from that directory and system will regenerate it again? or do I need to follow some specific procedure or use some tools? please advise.
__________________
Rahil
  Reply With Quote
Old November 16th, 2017, 04:49 AM   #5
sigmadelta
Member
Canada

sigmadelta is offline
 
Join Date: Apr 2016
Location: From Canada - Living in Bulgaria
Posts: 702
The quickest solution is to backup the events database, and delete all the data inside the database.

If you can open a command line window in MySQL, do this:

mysqldump mstw_db > mstw_db_2017-11-16.sql

Then from a MySQL query window:

USE mstw_db
DELETE from events

https://www.tutorialspoint.com/mysql...lete-query.htm
__________________
Freelance Automation Programmer
  Reply With Quote
Old November 16th, 2017, 07:02 AM   #6
rahilansari
Member
India

rahilansari is offline
 
Join Date: Jul 2008
Location: INDIA
Posts: 101
Hi, Thanks for the reply. while doing this do I need to Shutdown the runtime of my Citect SCADA? By above method am I deleting the complete file or just contents of the file?
__________________
Rahil
  Reply With Quote
Old November 16th, 2017, 07:04 AM   #7
sigmadelta
Member
Canada

sigmadelta is offline
 
Join Date: Apr 2016
Location: From Canada - Living in Bulgaria
Posts: 702
You should be able to backup and delete the contents of the database while Citect is running.
__________________
Freelance Automation Programmer
  Reply With Quote
Old November 20th, 2017, 11:16 PM   #8
rahilansari
Member
India

rahilansari is offline
 
Join Date: Jul 2008
Location: INDIA
Posts: 101
Hi Sigmadelta,

As per your suggestion I tried but couldn't find an option to open command line in MySQL to write that command. However I am able to find MySQL query. I have gone through manuals and internet documents but not sure. Can you please guide me in a little more depth. Also I want to inform you that I have events.MYD file from my old ghost backup so if I copy and replace directly from the directory then will it work fine because its size is around 1 GB. Please advise.
__________________
Rahil
  Reply With Quote
Old November 21st, 2017, 01:45 AM   #9
sigmadelta
Member
Canada

sigmadelta is offline
 
Join Date: Apr 2016
Location: From Canada - Living in Bulgaria
Posts: 702
If that's the case then you could do this, but you should stop Citect Runtime.

1) Stop Citect Runtime
2) Copy your current events.myd to a backup location
3) In a query window do this:

USE mstw_db
DELETE from events


4) Start Citect Runtime

Then you should have an empty events.myd to work with. The file size might remain the same, but it should be able to write data again since it should overwrite information instead of adding new information.

Alternatively, you could to this for Step 3:
3) copy your backup events.myd from your ghost backup, and run this in the query window, to start with a file size of 1GB instead of 4GB:

USE mstw_db
DELETE from events


What is the file format of your hard disk? FAT32 or NTFS? In FAT32, the maximum file size is 4GB. This could be your problem. NTFS file system does not have this limitation.
__________________
Freelance Automation Programmer

Last edited by sigmadelta; November 21st, 2017 at 02:00 AM.
  Reply With Quote
Old November 21st, 2017, 01:51 AM   #10
rahilansari
Member
India

rahilansari is offline
 
Join Date: Jul 2008
Location: INDIA
Posts: 101
Ok, I will copy the current events.MYD file from directory then write this command. So basically my understandin is my events.MYD file will reset to zero bytes and start logging the events again from that point of time. If yes then it is okay for me because I have the backup file with me to see my old events in future I required.
__________________
Rahil
  Reply With Quote
Old November 21st, 2017, 02:04 AM   #11
sigmadelta
Member
Canada

sigmadelta is offline
 
Join Date: Apr 2016
Location: From Canada - Living in Bulgaria
Posts: 702
The file might not resize at all, but it will for sure overwrite existing data if all of it is deleted. I edited my answer. Please read it.
__________________
Freelance Automation Programmer
  Reply With Quote
Old November 25th, 2017, 05:16 AM   #12
rahilansari
Member
India

rahilansari is offline
 
Join Date: Jul 2008
Location: INDIA
Posts: 101
Hi Sigmadelta, the file system is NTFS!!!
__________________
Rahil
  Reply With Quote
Old November 25th, 2017, 06:58 AM   #13
sigmadelta
Member
Canada

sigmadelta is offline
 
Join Date: Apr 2016
Location: From Canada - Living in Bulgaria
Posts: 702
OK then the 4GB limitation is in MySQL.
__________________
Freelance Automation Programmer
  Reply With Quote
Old February 7th, 2018, 07:29 AM   #14
rahilansari
Member
India

rahilansari is offline
 
Join Date: Jul 2008
Location: INDIA
Posts: 101
Hi sigmadelta,

I am trying to execute delete query but it fails with an error. do I need to change something in preferences? please advise
__________________
Rahil
  Reply With Quote
Old February 7th, 2018, 09:01 AM   #15
sigmadelta
Member
Canada

sigmadelta is offline
 
Join Date: Apr 2016
Location: From Canada - Living in Bulgaria
Posts: 702
You have to make sure that applications that are accessing the database are not running.
__________________
Freelance Automation Programmer
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Citect - MySql ysn6741 LIVE PLC Questions And Answers 0 February 7th, 2014 03:45 AM


All times are GMT -5. The time now is 07:29 PM.


.