Hi all,
I am very new on using HM.
I wanna do a POC on using a SQL DB to store de logs.
I have a test machine (XP) with HM and RCC installed + SQL express 2008.
I have created a DB called hm.
I have a setup an ODBC object (dsn system) and tested it : test is ok.
Then I HostMonitor I open the options window and go to primary logs. I choose DB and provide my odbc object name.
When I click on test I receive a message "Return Code 4294967295 [Microsoft][ODBC SQL Server Driver][SQL Server]Invalied object name 'hm'
providing a login password doesn't change the message.
Any clue ?
Thanks.
ODBC connection
Hi all,
I found the reason was that I had to create myself the table and each of its field myself.
Macro variable Field type
%DateTime% datetime or timestamp
Insert into test (eventtime, testname, status, reply, testid, testmethod) VALUES ('%DateTime%', '%TestName%', '%Status%', '%Reply%', %TestID%, '%TestMethod%')
I have tried datime and time stamp and it gives me a different error so I beleive the error is there.
But I can't find an other format for this field.
Do you have an idea where I am wrong?
thanks.
I found the reason was that I had to create myself the table and each of its field myself.
Altough after doing this I still have an error messageOf course an appropriate database table has to be created before you start using the ODBC logging.
It apparently concerns the eventtime column that I have defined as datetime as recommended :string or binary data would be truncated
Macro variable Field type
%DateTime% datetime or timestamp
Insert into test (eventtime, testname, status, reply, testid, testmethod) VALUES ('%DateTime%', '%TestName%', '%Status%', '%Reply%', %TestID%, '%TestMethod%')
I have tried datime and time stamp and it gives me a different error so I beleive the error is there.
But I can't find an other format for this field.
Do you have an idea where I am wrong?
thanks.
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
We do not specify exect field sizes/types and SQL queries for table creation, because ODBC can be used with different databas engines (MSSQL, MySQL, Oracle, even text/csv files).The documentation only says CHAR so I had selected this in SqlExpress. However the default size was 10 I have increased it and it was then ok.
I haven't seen this info in the doc.
Also it depends on HostMontor configuration and planned table/database sizes.
You are welcome.Thanks.