Unable to connect to database

Started by Davie, December 18, 2014, 12:12:07 PM

Previous topic - Next topic

Davie

hi support,
am new to netXMS i have installed it in our Ms windows 2008 server 2008, i have read and diagnosed
but it has not worked up to now. see the attached error


c:\netxms\bin\netxmsd


C:\>c:\netxms\bin\netxmsd -D3
Using configuration file "C:\NetXMS\etc\netxmsd.conf"
[18-Dec-2014 12:51:57.034] Debug callback set for DB library
[18-Dec-2014 12:51:57.037] Database driver "mssql.ddr" loaded and initialized su
ccessfully
[18-Dec-2014 12:53:59.957] Unable to establish connection with database ([Micros
oft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connec
tion to SQL Server [2]. )
NetXMS Core initialization failed

C:\>



"Unable to connect to database:[Microsoft][SQL Server Native Client 10.0]
Named Pipes Provider:Could not open a connection to SQL Server".


Victor Kirhenshtein

Hi,

open SQL Server Configuration Manager, choose SQL Server Network Configuration > Protocols for {instance} and ensure Named Pipes is enabled. Alternatively, try to enable TCP/IP and change DBServer parameter to IP address of SQL server.

Best regards,
Victor

Toepfe

Hi Everybody,

I'm new in this Forum and would like to take a look at NetXMS.

Unfortunately I'm not able to get it to work under Windows 7 with MS SQL Express 2008 R2 SP2 (both 64-bit on the same pc). I would like to create a new database within the installation process and get the message:

"Unable to connect to database: [Microsoft][SQL Server Native Client 10.0][SQL Server]Fehler bei der Anmeldung für den Benutzer 'sa'."

I'm able to connect to the SQL instance with sqlcmd via user 'sa'. Named pipes and TCP/IP are enabled as recommended by Victor. I have tried it with Netxms v. 1.2.17-x64 and 2.0-M4-x64, with the same problem.

Did anyone here run Netxms with MS SQL Server under Windows and was able to install it with the standard installation process of Netxms?

Bye
Heimo


Toepfe

#3
OK I did it myself  ;-)

Connect to database instance via sqlcmd and user sa

sqlcmd -S localhost\SQLEXPRESS -U sa

And put in the following commands:

1> create database netxms_db
2> go
1> use netxms_db
2> go
1> create login netxms with password = 'YourFavoritePassword'
2> go
1> create user netxms for login netxms;
2> go
1> grant alter to netxms;
2> go
1> grant control to netxms;
2> go

After that you are able to choose above existing database while installation (use "initialize database"!) and the Configuration Wizard works without problems (in my case).

The question is, why Netxms offer the option to create a new database inside MS SQL while installation although this is not working?!

Would save a lot of time if this would be mentioned in a How To or in the documentation of the installation.

Bye
Heimo




rrosko

Initial post is over two years old, but it helped me get NetXMS installed on a brand new Win 2008 R2 VM.

I reset all passwords, created a db or not. Nothing mattered.

The only difference was following Toepfe's post from 5/12/15 which walked me through the exact steps needed after 2 plus days trying everything else.

NetXMS just doesn't work in Windows with that installer hooked into configuring the db.

Not a good first impression of NetXMS, we'll see how the rest of this eval goes

drakerex

7 years later.... and this still works.

Windows Server 2022 Std. with Microsoft SQL 2019 Std.

Windows (x64) NetXMS 4.0.2092.

(1) Install SQL First
(2) Set named pipes in sql config
(3) Launch a cmd and run the commands listed by Toepfe
(4) Run the windows netxms installer with making your db name match your created db (mine was just netxms)

Settings for install were....

Database Type = Microsoft SQL
Database Server = YOURSERVERNAMEONLY
Database Name = netxms (or whatever you named your db in the commands above)
Login Name = sa
Password = (your sa password, if you use sa)
No check in the box for Create database and database user before initialization