Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Luiz A. Camilo

#31
General Support / Upgrade database from 2.21 to 2.22 error
September 04, 2008, 11:38:53 PM
I was trying to upgrade to the newest version, and when upgrading the database, I get an error ...

C:\NetXMS\bin>nxdbmgr upgrade -t
NetXMS Database Manager Version 0.2.22

Configuration file OK
Upgrading database...
Upgrading from version 80 to 81
>>> SELECT item_id,schedule FROM dci_schedules
>>> DELETE FROM dci_schedules
>>> ALTER TABLE dci_schedules ADD schedule_id integer not null
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
ALTER TABLE dci_schedules ADD schedule_id integer not null
Rolling back last stage due to upgrade errors...
Database upgrade failed

When trying to execute the same command from Query analyzer, I get this error back :

ALTER TABLE only allows columns to be added that can contain nulls or have a DEFAULT definition specified. Column 'schedule_id' cannot be added to table 'dci_schedules' because it does not allow nulls and does not specify a DEFAULT definition.

I need ideas ...
#32
General Support / Re: Instalation Move to Production
August 15, 2008, 11:55:29 PM
Ok, here goes the solution under credits of our It Manager Marcelo Ramos :

When you install netxms, on the database creation screen, it asks you for a credential. This credential, somehow is passed as paramenter when creating the SQL tables, and if you take a look on that, it creates as "username.tablename".
EX: netxms.acl
      netxms.actions
      netxms.address_lists

And the correct would be :
      dbo.acl
      dbo.actions
      dbo.address_lists

At least it was done on my case. And we made a SQL script to correct it
First run this script and select the output as "text" (not as grid) to generate the final script.

--*************************************************************************************
SELECT 'EXEC sp_changeobjectowner ''' + TABLE_SCHEMA + '.' + TABLE_NAME + ''', dbo'
FROM INFORMATION_SCHEMA.TABLES
WHERE
OBJECTPROPERTY(OBJECT_ID(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)), 'IsMSShipped') = 0
AND TABLE_TYPE = 'BASE TABLE'
GO
--*************************************************************************************

The output would be something like this :

EXEC sp_changeobjectowner 'netxms.acl', dbo
EXEC sp_changeobjectowner 'netxms.actions', dbo
EXEC sp_changeobjectowner 'netxms.address_lists', dbo
EXEC sp_changeobjectowner 'netxms.agent_configs', dbo
EXEC sp_changeobjectowner 'netxms.agent_pkg', dbo
EXEC sp_changeobjectowner 'netxms.alarm_change_log', dbo
EXEC sp_changeobjectowner 'netxms.alarm_grops', dbo
EXEC sp_changeobjectowner 'netxms.alarm_group_map', dbo
...
... I cuted the middle
...
EXEC sp_changeobjectowner 'netxms.user_profiles', dbo
EXEC sp_changeobjectowner 'netxms.users', dbo
EXEC sp_changeobjectowner 'netxms.vpn_connector_networks', dbo
EXEC sp_changeobjectowner 'netxms.vpn_connectors', dbo
EXEC sp_changeobjectowner 'netxms.zone_ip_addr_list', dbo
EXEC sp_changeobjectowner 'netxms.zones', dbo

All you have to do is copy all lines generated, and run them on netxms database.

After that, All my configuration, data, objects, everything is working perfectly as on the test environment.
I hope it helps someone else.

Thanks for all guys that helped me on this issue.




#33
General Support / Re: Instalation Move to Production
August 05, 2008, 05:04:43 PM
I tryed to run those commands, and they run successfully, seems that SQL is having a problem when I restore the database on the production server. it brings up the security for the database, but it´s not linked to the user from the SQL server.
Example, I cannot delete the user from the database, because it says that it´s hieriting objects. even running your command, it´s still complaining about the user still has objects linked.
When I try to create the same user, it says that the user already exists. I cannot change the roles of that user, or anything.
I tryed to create a new different user, but seems that the restored database still have some stuff linked to the old one.
Well, I´m working on the backup and restore on W2k SQL Server. I doubt that SQL 2k5 wouldn´t have those weird errors.
PS: This is a fresh instalation of SQL 2k, with Sp4 ... I don´t understand ....
#34
General Support / Re: Instalation Move to Production
August 04, 2008, 03:13:34 PM
Using a backup and restore, SQL seems weird.
It´s logging the following events on the eventviewer:

Event Type:   Error
Event Source:   NetXMSCore
Event Category:   None
Event ID:   43
Date:      8/4/2008
Time:      9:03:54 AM
User:      N/A
Computer:   SERVERNAME
Description:
SQL query failed (Query = "SELECT var_value FROM config WHERE var_name='DBFormatVersion'"): General SQL Server error: Check messages from the SQL Server.

Event Type:   Error
Event Source:   NetXMSCore
Event Category:   None
Event ID:   63
Date:      8/4/2008
Time:      9:03:54 AM
User:      N/A
Computer:   SERVERNAME
Description:
Your database has format version 0, but server is compiled for version 80

You´re right, there´s some problem with the schema.
I´m still working to find out and move the database without problems.
I´m loging everything here, in case it helps someont in the future.

#35
General Support / Re: Instalation Move to Production
August 01, 2008, 05:29:09 PM
Then I´ll try to run a Backup database and restore it to the production server.
Let´s see if it works ..

Thanks for your timely help !
#36
General Support / Re: Instalation Move to Production
August 01, 2008, 02:32:13 PM
First of all, I copied my database from a SQL Server to another, and created a user for netxms and gave him a SA permissions on SQL Server 2k.

After the new instalation, it pops me up the configuration wizard. I cheched to use an existing database and checked to initialize it. I typed the database name, user and password. At the end of this wizard it gave me a "success" message.

using nxdbmgr.exe check it pass everything. no errors.
on netxmsd.conf file, everything is like the old one. it just changed the DBServer = databasename\instance

My SQL Database has around 800Mb, and I´m able to conect on Netxms console but it´s like a new instalation. I have only the local machine on the object explorer.

On SQL Activity monitor I can see a conection from the user that I configured to use the database. So seems that the service is conected and using the database.

Bellow follow a log from when I tried to reindex the database looking for errors ..

C:\NetXMS\bin>nxdbmgr reindex
NetXMS Database Manager Version 0.2.21

Configuration file OK
Reindexing table raw_dci_values by (item_id)...
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
CREATE INDEX idx_raw_dci_values_item_id ON raw_dci_values(item_id)
Reindexing table event_log by (event_timestamp)...
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
CREATE INDEX idx_event_log_event_timestamp ON event_log(event_timestamp)
Reindexing table thresholds by (item_id)...
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
CREATE INDEX idx_thresholds_item_id ON thresholds(item_id)
Reindexing table thresholds by (sequence_number)...
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
CREATE INDEX idx_thresholds_sequence ON thresholds(sequence_number)
Reindexing table alarm_change_log by (alarm_id)...
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
CREATE INDEX idx_alarm_change_log_alarm_id ON alarm_change_log(alarm_id)
Reindexing table alarm_notes by (alarm_id)...
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
CREATE INDEX idx_alarm_notes_alarm_id ON alarm_notes(alarm_id)
Reindexing table syslog by (msg_timestamp)...
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
CREATE INDEX idx_syslog_msg_timestamp ON syslog(msg_timestamp)
Reindexing table snmp_trap_log by (trap_timestamp)...
Reindexing table address_lists by (list_type)...
SQL query failed (General SQL Server error: Check messages from the SQL Server.)
:
CREATE INDEX idx_address_lists_list_type ON address_lists(list_type)
Database reindexing complete.
#37
General Support / Instalation Move to Production
August 01, 2008, 04:47:41 AM

Hello there,

I was testing Netxms, and now I need to move it to production.
I´m Using the same SQL Server, and Database.
I made a fresh instalation and conected to the same database. But It didn´t work. My objects are missing ... What do I have to copy to move everything from a server to another ?

My test environment was using the latest version, so I didn´t have to make any upgrade. I´m just moving.

Any ideas ?
#38
General Support / Re: NETXMS lost all MAC addresses
March 27, 2008, 06:40:11 PM
I upgraded this morning to v2.20 on server and on 1 client.
Only upgrading the server didn´t solve the problem. MAC addresses were still 00.00.00.00....

I had to upgrade the NETXMSclient on the machine reporting blank MAC address. And worked fine.
Seems to be a problem on the client, because even if you manually try to pool "Status", "Configuration" or the new option "interface names" doesn´t work.
Also, the network interface were appearing as "lan0" and after solving the problem, it detected as "local area connection"

I hope these information help you on next releases.

PS: I´m still with the problem on SNMP devices. I´ll take look and try to find out an answer.

Thanks !
#39
Using Filemon, I found out that the nxav.exe is trying to access the following path :
C:\Documents and Settings\<user>\Application Data\nxav-00000E04
And is getting "path not found"

I could notice that this folder is only created when the nxav.exe is running. if you close the Alarm Viewer, this folder is deleted. There´s all the icons inside this folder, but I don´t know why the executable isn´t finding it.

Just FYI .
#40
General Support / Re: NETXMS lost all MAC addresses
March 27, 2008, 04:28:53 PM
I don´t know why, but the NTXMSserver wasn´t connecting to the NETXMSclient.
I reinstalled the client and pooled the configuration.

Well, it worked with the workstations. what about the SNMP devices ? routers doesn´t have a client.
still working on it.
#41
General Support / NETXMS lost all MAC addresses
March 27, 2008, 02:09:36 PM
Hello there,

I´m using V.2.19 with Netxms client on monitored servers.
After a specific date, I noticed that Netxms server isn´t collecting any client DCI. only client status.
I noticed then that all my Mac addresses for the nics under each node were gone.
the problem can be simply solved deleting the node and adding it again. but this way I loose my history because it creates another object ID.

Have anybody ever had a problem like this ?

Right now I´m seeing the tables from the database, looking for the field where it stores tme MAC addresses, I guess if I change it there, it will work again.

Anyway, if anyone have a better idea, please post .
#42

Cool, thanks.
#43
General Support / Netxms Alarm Viewer icons not displayed
February 25, 2008, 07:55:10 PM

Hello there,

I´m using the 2.19 version for Windows.
When I open the alarm viewer on a desktop that has only installed the Agent, it displays me everything, less the icons in front of each iten in the columns Severity and State.
The images are like a square with a red cross inside.
I guess it´s a permission issue, but i´m an administrator on both machines.

Can someone help me ?