10-12-2006 09:30 AM
10-12-2006 02:43 PM
10-13-2006 06:48 AM
Thank's for the reply Scott,
It seems that TestStand might have an different behavior:
While TestStand is in the process of inserting the data to the database, we have an other application retrieving data from the database. This application usually retrieves the entire test, however sometimes the data retrieved consists of UUT Header information only.
If TestStand run it's entire insertprocess in a SQL Server transaction, this should not be possible (using default readcommitted locking). This theory is strongly supported with the issue we encounter during maxed-out MSDE (2GB limit). The SQL Server log, states that Database is full, and expand is not possible and process was terminated. However the UUT Header information remains in the database, while step and measurment data is never logged.
To support our theory, we created a testapplication. This application confirmed our worries - the UUT Header is readable before step- and measurement-data gets committed. Also we ran a trace using SQL Profiler, which showed an explicit COMMIT TRAN between Header and Step/Measurement.
Can you please confirm or disprove this behaviour?
10-13-2006 10:53 AM - edited 10-13-2006 10:53 AM
Tom -
Looking at the code <TestStand>\Components\NI\Models\TestStandModels\Database\DBLog\TSDatalink.cpp in the function CTSDatalink::LogResults, it appears to be written to use a separate transaction for the UUT result and its step results. I am not sure if there was a reason for this separation. If you have MSVC you should be able to make a change and recompile it. I have written a problem on this.
As for why an error is not surfacing, I do not know. Looking at the error logic all seems fine. We would have to try to reproduce the problem to determine if an error is being returned from the database.
Also, there is another known issue with TestStand 3.0 database logging, see Do I Get Database Logging Errors While Using Parallel or Batch Model in TestStand 3.0?
Message Edited by Scott Richardson on 10-13-2006 10:54 AM
10-13-2006 01:37 PM
10-13-2006 03:02 PM
Tom -
When I used SQL Server 2005 to log results using the INSERT schema, the following error was returned when it tried to write to the database:
An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging'
An error occurred executing a statement.
Schema: Generic Insert (NI).
Statement: STEP_RESULT.
Could not allocate space for object 'dbo.STEP_RESULT'.'PK__STEP_RESULT__7E6CC920' in database 'TestStand Insert' 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.
Description: Could not allocate space for object 'dbo.STEP_RESULT'.'PK__STEP_RESULT__7E6CC920' in database 'TestStand Insert' 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.
Number: -2147217900
NativeError: 1105
SQLState: 42000
Reported by: Microsoft SQL Native Client
Source: TSDBLog-2147217900; User-defined error code.
Step 'Log Results to Database' of sequence 'Log To Database' in 'Database.seq'
Looking at the table results, I saw that the last UUT_RESULT record had no records for steps as you found, but the error did propagate back to TestStand.
10-19-2006 07:05 AM
Hi Scott,
Sorry for late reply.
First: We base our schema on the "SQL Server Stored Proc (NI)" schema, but we have rewritten it. (So, we use stored procedures)
Second: I see you get error from the SQL server (and we don't). Could this be because we use stored procedures?
Also: We use MSDE 2000 desktop engine as local db client
Thanks.
10-20-2006 03:40 PM
Tom -
I do not have MSDE 2000. I go the same error with the stored procedure schema when the SQL Server 2005 local database had reached its max size.
10-22-2006 02:50 PM