Académique Documents
Professionnel Documents
Culture Documents
Contents
Contents
6 Database Management..............................................................................................................6-1
6.1 Dump and Backup.........................................................................................................................................6-2 6.2 DMS Database ..............................................................................................................................................6-2 6.2.1 FaultDB................................................................................................................................................6-2 6.2.2 LogDB .................................................................................................................................................6-3 6.2.3 PerfDB .................................................................................................................................................6-3 6.2.4 SecurityDB...........................................................................................................................................6-3 6.2.5 TopoDB................................................................................................................................................6-3 6.2.6 GnldevDB ............................................................................................................................................6-4 6.2.7 iAgentDB .............................................................................................................................................6-4 6.3 Viewing the Database Status .........................................................................................................................6-4 6.4 Expanding the Database ................................................................................................................................6-5 6.4.1 Through the N2000 System Monitor ...................................................................................................6-5 6.4.2 Expanding the Sybase Database Through the Command Line ............................................................6-6 6.4.3 Expanding the SQL sever Database Through the Command Line.......................................................6-7 6.5 Dumping Alarm Database .............................................................................................................................6-8 6.5.1 Automatic Dump of Alarm Data ..........................................................................................................6-8 6.5.2 Dumping Data Manually....................................................................................................................6-10
Issue 02 (2007-10-15)
Figures
Figures
Figure 6-1 Database information........................................................................................................................6-5 Figure 6-2 Database expansion ..........................................................................................................................6-6 Figure 6-3 Alarm dump ......................................................................................................................................6-9 Figure 6-4 Event dump.......................................................................................................................................6-9 Figure 6-5 Log dump........................................................................................................................................6-10 Figure 6-6 Dump alarm data............................................................................................................................. 6-11
ii
Issue 02 (2007-10-15)
Tables
Tables
Table 6-1 Dump and backup...............................................................................................................................6-2
Issue 02 (2007-10-15)
iii
6 Database Management
6
About This Chapter
Section 6.1 Dump and Backup 6.2 DMS Database 6.3 Viewing the Database Status 6.4 Expanding the Database 6.5 Dumping Alarm Database
Database Management
The following table lists the contents of this chapter. Describes This section describes the concepts of dump and backup, and the difference between dump and backup. This section describes the DMS database. This section describes how to check the database status. This section describes how to expand the database. This section describes how to clear the database.
Issue 02 (2007-10-15)
6-1
6 Database Management
The purpose is to view the data. The source data is deleted from the database. The dumped data cannot be restored from the file to the database. The purpose is to restore the data to the database in case of a fault. The source data is not deleted from the database. The backup data is restored to the database.
Backup
Copies data from the database into a file. When the source data is damaged, you can import the backup data into the database for restoration purpose.
6.2.1 FaultDB
The alarm data is saved in the FaultDB. The data space is recommended not to be less than 750 MB and the log space not to be less than 500 MB. The names and functions of lists in the FaultDB are shown as follows:
z z z
tbl_AlarmCfg: Records the static configuration information of alarms. tbl_CurAlm: Records current alarms. tbl_Event: Records the event information.
6-2
Issue 02 (2007-10-15)
6 Database Management
tbl_HisAlm: Rerecords the history alarms. tbl_AlmShieldCondition: Records the mask conditions of the alarms and events. Other tables: Record the internal realization information of the alarm module.
6.2.2 LogDB
The NMS user operation logs and some related data are saved in the LogDB. The data space is recommended not to be less than 150 MB and the log space not to be less than 75 MB. The names and functions of lists in the LogDB are shown as follows:
z z z z z
tbl_Log: Records the operation information of the NMS user. tbl_LogPara: Records the personal setting information of the NMS user log. tbl_Syslog: Records the Syslog operation information. tbl_SyslogServer: Records the running information of the Syslog server. Other tables: Record the internal realization information of log management.
6.2.3 PerfDB
The real-time performance data is saved in the PerfDB. The data space is recommended not to be less than 40 MB and the log space not to be less than 20 MB. The names and functions of lists in the PerfDB are shown as follows:
z z z z z
tbl_PerfTmpl: Records the information of the performance template. tbl_Perflndi: Records the information of the performance indices. tbl_IndiInTmpl: Records the performance indices and template-concerned information. tbl_MibObj: Records the information of the Management Information Base (MIB) to be accessed to view the performance indices. Other tables: Record the internal realization information of performance management.
6.2.4 SecurityDB
The security right data is saved in the SecurityDB. The data space is recommended not to be less than 80 MB and the log space not to be less than 80 MB. The names and functions of lists in the SecurityDB are shown as follows:
z z z z z
tbl_User: Records the user information. tbl_Group: Records the user group information. tbl_CmdSet: Records the operation set information. tbl_GrantRight: Records the information of the right grant. Other tables: Record the internal realization information of security management.
6.2.5 TopoDB
The topology data is saved in the TopoDB. The data space is recommended not to be less than 80 MB and the log space not to be less than 50 MB. The names and functions of lists in the TopoDB are shown as follows:
z z
tbl_Node: Records the data of the topology node. tbl_Submap: Records the data of the topology sub-map.
Issue 02 (2007-10-15)
6-3
6 Database Management
z z
tbl_Link: Records the data of the topology connection. Other tables: Record the topology internal realization information.
6.2.6 GnldevDB
The data of the third party devices is saved in the GnldevDB. The data space is recommended not to be less than 80 MB and the log space not to be less than 40 MB. The names and functions of lists in the GnldevDB are shown as follows:
z z z
tbl_DevTypeAndNodeTypeTab: Records the information of the relationship between the device type and node type. tbl_IPIfTab: Records the information of the list of device interfaces. Other tables: Record the internal realization information of third part device management.
6.2.7 iAgentDB
The northbound interface data is saved in the iAgentDB. The data space is recommended not to be less than 80 MB and the log space not to be less than 50 MB. The names and functions of lists in the iAgentDB are as follows:
z z z
tbl_Event: Records the data of information of cache. tbl_SnmpV3Para: Records the SNMP V3 parameters of the northbound interface. Other tables: Record the internal realization information of northbound interface management.
Precaution
When the database usage exceeds the alarm threshold, the alarm prompts appear as follows:
z z
The database records on the N2000 System Monitor turn red. The N2000 System Monitor service process sends alarms to the NMS and the alarms are displayed in the alarm list of the fault management.
Procedure
Step 1 Log in to the N2000 System Monitor. Step 2 Select the Database tab. The database information of the NMS server is displayed on the tab, as shown in Figure 6-1.
6-4
Issue 02 (2007-10-15)
6 Database Management
Step 3 This step is optional. Right-click the database information list. Select Refresh to refresh data of all items. ----End
Through the N2000 System Monitor Expanding the Sybase Database Through the Command Line
Precaution
z z
Before expanding the database, you need to back up the database. For operations of the backup database, see section "9 Database Backup and Restoration." The database cannot be restored to the initial configuration after being expanded. The database space cannot be expanded without any limit and a single database space cannot
Issue 02 (2007-10-15)
6-5
6 Database Management
expand more than 5000 MB once. Therefore, do not expand the data field and log field at random.
Procedure
Step 1 Log in to the N2000 System Monitor. Step 2 Select the Database tab. Select the database records to be expanded. Right-click the page. Select Expand. Step 3 The Database Expansion dialog box is displayed. Enter the size of the data space and the log space to be expanded, as shown in Figure 6-2. Figure 6-2 Database expansion
Step 4 Click OK. Step 5 The confirmation dialog box is displayed. Click OK after confirmation. Step 6 The prompt of success in expanding the database is displayed. Click OK. ----End
Procedure
Suppose that the current FaultDB data storage path is /opt/sybase/data. The path to expand the fatultDB to the new physical medium (512 MB) is /new_data/. Step 1 Log in to the N2000 System Monitor.
6-6
Issue 02 (2007-10-15)
6 Database Management
Step 2 Choose System > Stop Server in the main menu to stop all DMS processes and disconnect all database to be expanded. Step 3 Run the following commands to initialize the device.
isql>disk init name=new_fault_dev,physname=/new_data/fault_new_dev.dat, vdevno=101,size=256000 isql>disk init name=new_fault_log_dev,physname=/new_data/fault_new_log_dev.dat, vdevno=101,size=256000
z z
The names of the disk and database are defined by the user. The unit of parameters is 2 KB. The vdevno is the device number. Every database device has one and only device number. Using the isql>sp_helpdevice command, you can query the used device number. The device_number in the displayed information is the device number.
Step 5 Using the quit or exit commands, you can quit the DMS database. Step 6 At the System Monitor, choose System > Start Server to start all DMS service processes. ----End
6.4.3 Expanding the SQL sever Database Through the Command Line
Description
Expand the SQL Server database. When you perform the expansion operation on the disk where the NMS database does not exist, you need to perform the operation with the command lines.
Procedure
Step 1 Choose Start > Programs > Microsoft SQL Server > Query Analyzer and run the SQL query analyzer. Step 2 Select SQL Sever Authentication. Enter the user name and password of the database. The database query window appears. Step 3 In the database query window, input the database expansion commands as follows:
ALTER DATABASE FaultDB ADD FILE (NAME=new_fault_dev, FILENAME = D:\new_data\fault_new_dev.dat ,SIZE=512000KB, MAXSIZE = UNLIMITED, FILEGROWTH = 10%) ALTER DATABASE FaultDB ADD LOG FILE (NAME=mylogdev, FILENAME = D:\new_data\fault_new_log_dev.dat,SIZE=512000KB, MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
Step 4 Choose Tools > Execute in the main menu and run the commands in batch.
Issue 02 (2007-10-15)
6-7
6 Database Management
----End
Description
Configure the automatic dump policy of the history alarm data. Dump the history alarm data to the file in a certain period. The automatic dump policy covers the following:
z z
The default dump path is $N2000ROOT/server/dump. The name format of the dump alarm file is Alarm year month data hour minute second-No..txt, such as Alarm20070329144540-00.txt. The name format of the dump event file is Event year month data hour minute second-No..txt, such as Event20070329172833-01.txt. The dump file supports three formats as follows:
z z z
The dumped files can realize the cycle cover. When the amount of alarm data backup files exceeds default 1000, the system automatically covers the previous files to ensure that the disk space can be released.
Precaution
z z z
When the alarm database is filled, the system automatically dumps the alarms according to the full dump policy. The dumped alarm records are saved in the specified dump path and deleted from the database. The records of the dumped data cannot be queried in the Fault Browse window.
Procedure
Step 1 Log in to the DMS client and choose System > Dump Settings in the main menu. Step 2 The Dump Settings dialog box is displayed. Select the Alarm Dump tab. Configure the alarm dump conditions and the path to save the dumped files, as shown in Figure 6-3.
6-8
Issue 02 (2007-10-15)
6 Database Management
Step 3 Select the Event Dump tab. Configure the event dump conditions, as shown in Figure 6-4. Figure 6-4 Event dump
Step 4 Select the Log Dump tab. Configure the log dump conditions and the path to save files after dump, as shown in Figure 6-5.
Issue 02 (2007-10-15)
6-9
6 Database Management
Step 5 Click OK to complete the configuration of automatic dump of the alarm, event and log. ----End
Description
Dump the alarm data manually. Dump the data in the current database.
Procedure
Step 1 Log in to the DMS client and choose System > Dump Manually > Dump Alarm. Step 2 The Dump Alarm dialog box is displayed. Select the format of the file to be saved and time for dumping the alarm, as shown in Figure 6-6.
6-10
Issue 02 (2007-10-15)
6 Database Management
Step 3 This step is optional. Click Query. The amount of the dump alarms in this period of time is displayed in Records(Pieces). Step 4 Click OK. ----End
Issue 02 (2007-10-15)
6-11