На рассмотрении

is it possible to run SQL command on irpro server start?

Tanapol E. 5 лет назад в Tips and Tricks обновлен Vladimir Ovchinnikov (expert) 5 лет назад 7

is it possible to run SQL command on irpro server start?

I would like to run 




to clear out zero value in IR Main database

На рассмотрении


Do you want to query the system database? We strongly recommend that you do not remove something from the system database script from the server project. You have the right to do with your database whatever you see fit, but in case of wrong actions, you risk to bring iRidium server inoperable.


Yes i want to clear zero value on some tag in tag history

Because it writes down zero value when server was restart

We understand, do it at your own risk. If the database is damaged and you do not have a backup, the iRidium server will not be able to start. In this case, stop the iRidium server, delete the broken database and start again. The database will be created again automatically, with empty values.


I will take a risk

But which command i should use for open system database? 


I mean JS command like this

mybase = new SQL();
   mybase.Open('WHICH FILE SHOULD I oPEN HERE', true);

var systembase = IR.GetDatabase();

var result = systembase.Request('DELETE FROM INTEGER_TAG_HISTORY WHERE VALUE = 0;');

//The system database is read-only. Therefore, this code may not work in future releases.

Сервис поддержки клиентов работает на платформе UserEcho