netxms with oracle 10+ backend

Started by andrey--k, February 14, 2014, 12:56:00 AM

Previous topic - Next topic

andrey--k

Can someone create detailed, step-by-step instruction to configure netxms with oracle database as backend?

I have spend all day without any progress.  :(

Victor Kirhenshtein

Hi!

There should not be much differences with any other database. What operating system and installer you are using? Is there any specific error you stuck with?

Best regards,
Victor

Percy

hi,
i am also facing the same Problem.
Percy

Victor Kirhenshtein

And what exactly this problem is?

Best regards,
Victor

andrey--k

Firstly - I can not find oracle.ddr file.
I have tried to setup via unixodbc, but I stuck on its configs :(

Victor Kirhenshtein

Hi!

I assume you are not on Windows :) We don't have binary distribution for Oracle driver yet - if you need Oracle support, you have to built NetXMS from sources. I recommend using Oracle InstantClient instead of full client. Instruction is following:

1. Download instantclient-basic and instantclient-sdk archives from http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html and unpack both into same directory. I usually unpack them inside /opt - then you'll get something like /opt/instantclient_11_2
2. Configure NetXMS sources as usual, and add --with-oracle=/opt/instantclient_11_2
3. Do make and make install as usual
4. In netxmsd.conf, set DBServer as //oracle_server_ip//oracle_sid (DBName is ignored by oracle.ddr server).

Now you should be able to initialize database with nxdbmgr and start server.

Best regards,
Victor

andrey--k

checkinstall fails with next error:

make[3]: Entering directory `/opt/netxms-1.2.11'
if test "xyes" = "xyes"; then LD_LIBRARY_PATH="/usr/local/lib:" /usr/local/bin/nxmibc -d /usr/local/share/netxms/mibs -o /usr/local/share/netxms/mibs/netxms.mib; fi
/bin/bash: /usr/local/bin/nxmibc: No such file or directory

Victor Kirhenshtein

What is checkinstall?

Best regards,
Victor

andrey--k

checkinstall - debian utility which does make install and creates deb package

andrey--k

just tried make install - finished without errors

Victor Kirhenshtein

Looks like checkinstall cannot handle it correctly. make install supposed to install nxmibc and after that post installation hook is called which will compile MIBs using just installed nxmibc.

Best regards,
Victor

Percy

hi Victor,

i am using NetXMS 1.2.11 with Postgres as Backend database. it is  working Properly. now i have another test machine with Oracle as Backend Database but netxms is not able to connect to the Oracle Database. it shows the error message like

Unable to Connect to database : ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA


Machine Details
OS- Windows Server 2008 r2 64 Arch,
RAM - 16GB,
Database - Oracle 11g
NetXMS 1.2.11

Thanks
Percy


Victor Kirhenshtein

Hi!

Seems that you've made a mistake in configuration. Please provide your netxmsd.conf and Oracle server parameters (address and service name). Also, what Oracle client you are using?

Best regards,
Victor

Percy

hi victor,
Sorry for the late reply . i have attached the netxmsd.conf, tnsnames.ora, Listener.ora file.
when i start Server Configuration Wizard to select the Data base Engine i selct the Oracle than Create new database become disable.
in case of Postgresql netxms create its database names Netxms_db and its required schema. why in case of oracle create new database become Disable.

thank you
Percy

Victor Kirhenshtein

For Oracle you have to create database user manually (and this will create schema) and choose "existing database" option.

If you are using InstantClient you should specify Oracle connection string in DBServer parameter in form //server_ip/service_name

To do initialization manually, follow these steps:

1. Connect to Oracle server with sqlplus as sysdba:


C:\Source\NetXMS\x64\debug>sqlplus sys/admin@//192.168.64.3 as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 19 11:41:37 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL>


2. Create user and grant necessary rights:


SQL> create user netxms identified by netxms;

User created.

SQL> grant create session to netxms;

Grant succeeded.

SQL> grant resource to netxms;

Grant succeeded.

SQL> grant create view to netxms;

Grant succeeded.

SQL>


3. Set correct values in netxmsd.conf. In my case it will be


DBDriver = oracle.ddr
DBServer = //192.168.64.3/XE

DBLogin = netxms
DBPassword = netxms


4. Initialize database:


C:\Source\NetXMS\x64\debug>nxdbmgr init ..\..\sql\dbinit_oracle.sql
NetXMS Database Manager Version 1.2.12 Build 7861

Initializing database...
Database initialized successfully

C:\Source\NetXMS\x64\debug>


Also, it seems that initialization script shipped with NetXMS installer may contain errors and database initialization will fail with "cannot insert NULL" error. In that case, please use attached initialization script.

Best regards,
Victor