0

I created a system which need node-red as back end, and grafana as front end, and use sql server as database. And i realized when DMS (Database Management System) will lock the database for one session. so i cannot use insert(node red), AND Select(grafana) at the same time. the connection will be closed if i do that. What should i do to this case?

I tried to change time refresh interval in the grafana time setting. i used 1 second inject in node red, and i use 10 second in grafana. basicly the connection was stable until grafana action / 10 second.

I expect the grafana and the node red can work with mssql server at the same interval time.

1 Answers1

0

Use SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED before your Select queries.

Milad
  • 117
  • 1
  • 8
  • Hi, i already test that query. it works with 7 flow, if i add more flow with same function. sometimes connection will closed again. But thankyou for your solution. do more solution to make this more stable without closed statement? – Muhammad Yusuf Malik Jul 18 '19 at 06:36
  • @MuhammadYusufMalik Hi, your welcome, best way is optimizing your crud queries and if you use BEGIN TRAN statement you must be careful about using that – Milad Mar 08 '20 at 08:35