ODBC MSSQL logging data types & lenght

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Culprit
Posts: 15
Joined: Fri Apr 28, 2006 8:35 am

ODBC MSSQL logging data types & lenght

Post by Culprit »

Hi,
I'm looking for description of data types and lenght of each macro variable to log into MS SQL over ODBC.

I know, that command to log could be max long 4096 chars.

Could someone help me?
Yoorix
Posts: 177
Joined: Wed Dec 14, 2005 8:28 am

Re: ODBC MSSQL logging data types & lenght

Post by Yoorix »

Culprit wrote:I'm looking for description of data types and lenght of each macro variable to log into MS SQL over ODBC.
Trere are no common rules and format of the table and SQL Query is not fixed. You may create any table you want and use any query you want.
Here http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
you could review all macro variables and its descriptions. What data type should you use for appropriate variable? You should choose it depends on description. If variable always returns number, you may use int or bigint. Otherwise I recommend to use varchar or datetime type. Be carefull with datetime variables. Remember about "Use fixed date & time format" option.
Culprit wrote:I know, that command to log could be max long 4096 chars.
Yes, maximum length of the query: 4096 symbols.

Regards,
Yoorix
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Many variabled do not have fixed lengths. E.g. %TestName% represents name of the test and we don't know how long names you are using for the tests.
We recommend to store the following fields/macros:
%DateTime%
%TestName%
%Status% or %StatusID%
%Reply%
%TestID%
%TestMethod%
And of course you may use other fields/variables based on your needs.

Regards
Alex
Culprit
Posts: 15
Joined: Fri Apr 28, 2006 8:35 am

Re: ODBC MSSQL logging data types & lenght

Post by Culprit »

Yoorix wrote:If variable always returns number, you may use int or bigint. Otherwise I recommend to use varchar or datetime type. Be carefull with datetime variables. Remember about "Use fixed date & time format" option.
That everything I know, I look for something what can help me. And I want not test every macrovariable which type is it.
KS-Soft wrote:Many variabled do not have fixed lengths. E.g. %TestName% represents name of the test and we don't know how long names you are using for the tests.
We recommend to store the following fields/macros:
..
..
And of course you may use other fields/variables based on your needs.
That could be the problem.
Yoorix wrote:
Culprit wrote:I know, that command to log could be max long 4096 chars.
Yes, maximum length of the query: 4096 symbols.
Will be possible to send more data over ODBC? It's limitation of HostMonitor or ODBC? Someone tell me that is limitation of Hostmonitor.

Thanks for help
John Culprit First
Yoorix
Posts: 177
Joined: Wed Dec 14, 2005 8:28 am

Re: ODBC MSSQL logging data types & lenght

Post by Yoorix »

Culprit wrote:Will be possible to send more data over ODBC? It's limitation of HostMonitor or ODBC? Someone tell me that is limitation of Hostmonitor.
In other cases you are able to send more data over ODBC. But not in this case. 4096 is a default size of the network packet used by the connection, and I think, HM uses this limitation to improve performance, when hundreds of test are logged synchronously. But of course, it is my own opinion, and it might not be true.

Regards,
Yoorix
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

That everything I know, I look for something what can help me. And I want not test every macrovariable which type is it.
If you read macro variable description, you will undersatnd what type can you use (in most cases).
Many variabled do not have fixed lengths....That could be the problem.
What exactly the problem?
Yes, maximum length of the query: 4096 symbols... Will be possible to send more data over ODBC?
Sure, HostMonitor can send more data. 4096 - limit for the query that you may specify in the Options dialog. Its more than enough to specify all necessary and odd variables.
At query execution time HostMonitor will resolve macro variables and result query may be longer than 4096 bytes. No problem.

Regards
Alex
Post Reply