Learn how to troubleshoot FactoryLink DBLog and Database not logging issue.
When you check your Run-time Manager, the DBLog Task button has a red background with the following error message.
You check your database tables in the Microsoft SQL Server Management Studio and some database tables are populating and some are not. Your disk space is enough and you know you a large RAM.
Checking your log file (in the directory FLAPP/FLNAME/shared/FLUSER/log) shows a bunch of error message as such shown below.
17/10/28 00:00:00 : continued from od171028.log
00:00:30 : SQLERROR: Can’t execute SQL statement:
INSERT INTO WellSite10Table (FLTIME, FTEMP, PRESS1, OUTLETTEMP, INLETTEMP, SUCTTEMPR, FIREDET, DISCHCYLA, DISCHCYLB, COOLTEMP1, SUCT, DISCHA, DISCHB, GASDETA1, SPEED, SPAREA, RECYCLEVLV, ESDVLV) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) for task DBLOG due to error:
(SQLExecute) [Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate space for object ‘dbo.D119G2_CMP’ in database ‘D_CHN’ because the ‘PRIMARY’ filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. 37000(1105)
You make sure that your field in the correct and exist in the database (using Microsoft SQL Management Studio); FLTIME, FTEMP, PRESS1, OUTLETTEMP, INLETTEMP, SUCTTEMPR, FIREDET, DISCHCYLA, DISCHCYLB, COOLTEMP1, SUCT, DISCHA, DISCHB, GASDETA1, SPEED, SPAREA, RECYCLEVLV, ESDVLV. Normally all the field exist but just in case someone manually deleted it…. some how.
The next error message is about “filegroup” and “auto growth”, which is the the topic of our article for today. It clearly says that you need to fudge your file space allocation as you database table has grown too big.
Lets resize these SQL database table parameters.
Launch the Microsoft SQL Server Management Studio, and log in accordingly.
Right-click on the database you want to size the “auto growth”. and select “Properties” from the context menu; as shown below. For our example, our database name is “TESTEE”.
Note that the space available for our example database (called TESTEE) is only 0.58MB (left). The “Space Available” is referring to the allocated database file size. Depending on how often our application is populating the database tables, this might not be enough. For example, for an automation application (in particular, oil and gas), if we are populating 100kb record (row) in a table per second and if there are 10 tables per database in this database (of our example database called TESTEE), it is definitely not going to be enough. Hence, you will notice that some records get populated while others get dropped (never made it to the database table). That is when you see that you historical trend in the FactoryLink loosing database in some of your timeline
Lets resize our “auto growth”.
Click “File” (from the top left-hand side of the popup window), followed by the epsilon (..) button; as shown below.
The next pop-up window will allow you to size the “File Growth” (in percentage or in specific file size). You can also specify the “Maximum File Size” of the database.
Another important property of the database sizing is “Filegroup”. You can assign multiple files for database storage.