Problems connecting linux to MSSQL 2005

Started by SteveK, March 15, 2010, 12:58:27 PM

Previous topic - Next topic

SteveK

Hi All,

I have been trying to install netxms on debian linux connecting to MSSQL 2005. I can init the database, however when I start netxms deamon, I get the following error:
"Your database has format version 0, but server is compiled for version 99"

Quote[15-Mar-2010 15:59:44] Log file opened
[15-Mar-2010 15:59:44] Platform subagent "/usr/local/lib/libnsm_linux.so" successfully loaded
[15-Mar-2010 15:59:44] Database driver "libnxddr_odbc.so" loaded and initialized successfully
[15-Mar-2010 15:59:44] Your database has format version 0, but server is compiled for version 99

These are the things that I tried:


  • Create new db and user using server sql server management studio. I Could connect to db using isql odbc in linux, and was able to init db using "nxdbmgr init /usr/local/share/netxms/sql/dbinit_mssql.sql", and can query db OK, but netxmsd does not start.

  • Since the above failed, I'd thought I'd install windows version on a windows PC so the windows GUI can install and init the db. When this install finished, I stopped the services on the windows install and connect the linux install to this newly created db, and I get the same error as above.

When I run "nxdbmgr check" I get the following error:
Quote"Unable to determine database syntax"


This is my config file.
QuoteConfiguration file for NetXMS server
#
DBDriver = libnxddr_odbc.so
DBServer = netxms
DBLogin = netxms
DBPassword = PaSsWd
LogFile = /var/log/netxmsd
LogFailedSQLQueries = yes

I have been trying for a while now to get this to work, and would appreciate any insights on this.

Regards   

jdl

Hi,

Did you do the following while installing your server?


  • Configuring root access to mysql: /usr/bin/mysqladmin -u root password <password_1>
  • Configuring mysql for netxms:


    • mysql -u root -p mysql
    • CREATE DATABASE netxms;
    • GRANT ALL ON netxms.* TO netxms IDENTFIED by '<password_2';
    • \q
  • Modify server configuration file (default is /etc/netxmsd.conf). It should look the following way:


    • DBDriver = /usr/local/lib/libnxddr_mysql.so
    • DBServer = localhost
    • DBName = netxms
    • DBLogin = root
    • DBPassword = <password_1>
    • LogFile = /var/log/netxmsd.log
    • LogFailedSQLQueries = yes

Cheers,
Jdamien

SteveK

Hi Jdamien,

Thanks for your reply,

QuoteConfiguring root access to mysql:

Is mysql required for microsoft sql server? I didn't install mysql, as I am using ODBC to connect to database. My configure script contained "--with-odbc", and I installed unix odbc package and not mysql as per installation guide

Kind Regards,
Steve..



Victor Kirhenshtein

Hi!

Do you use FreeTDS ODBC driver for connecting to MS SQL server? It has known problem with UCS-2 encoding, which is used by NetXMS by default. Try to add the following line to your netxmsd.conf:


DBDrvParams = unicode=false


Best regards,
Victor

SteveK

Hi Victor,

That worked!!

Your help was greatly appreciated.

Thank you.
Steve...