您好,欢迎来到画鸵萌宠网。
搜索
您的当前位置:首页OMCR高级培训教材-chp5-OMC管理

OMCR高级培训教材-chp5-OMC管理

来源:画鸵萌宠网
OMCR 高级用户培训 第五章 OMCR数据库管理

第五章 OMCR数据库管理

1、 informix 目录结构

1.1 system processor 上的目录结构

1.2 MMI processor上的目录结构

东方通信系统工程部技术支持中心 5-1

OMCR 高级用户培训 第五章 OMCR数据库管理

2、 数据库的应用软件

2.1 omc_db_maint

omc_db_maint脚本位于OMC_SYS上/$OMC_TOP/current/sbin目录下,是用来对OMC PM数据库中的统计数据进行卸载和删除,并报告数据库的磁盘空间的使用情况。

Omc_db_maint的功能如下:

1. 如果OMC软件正在运行中,omc_db_maint会将PM parser从PM数据

库disconnect.

2. Omc_db_maint自动调用db_pm_maint将前一天的统计数据和当前PM

的配置数据从PM数据库卸载备份。 3. 压缩从PM数据库卸载下来的数据。

4. 自动执行db_pm_maint删除PM上超过delete_flags(一般为5天)以上

的统计数据。

5. 如果OMC软件正在运行中,omc_db_maint会将EM,LM自动从PM

数据库上disconnect。

6. 执行omc_db_ckspace,报告数据库磁盘空间的使用情况。 7. 生成一个日志文件,报告omc_db_maint执行的情况。 8. 重新连接PM parser和EM,LM应用程序。

2.2 onmonitor

onmonitor是一个用来对数据库管理的应用软件。以下是以informix用户身份登入的onmonitor的用户界面:

INFORMIX-OnLine: Status Parameters Dbspaces Mode Force-Ckpt ... Status menu to view INFORMIX-OnLine.

-----------------------------On-Line------- Press CTRL-W for Help. --------

onmonitor应用程序可以友好的菜单的形式来完成informix数据库大部分的管理工作。

2.3 db_disconnect

db_disconnect用来使OMC应用软件和PM数据库建立连接或撤消连接。相应的OMC应用软件主要有parser,EM_LM,pmproxy。

Parser :如果disconnect,parser进程将不对从NE upload上 来的raw stats进

行数据分析。

EM_LM :如果disconnect,Event management list manager将不允许显示和修

改Event subscription的属性。EM进程继续运行。

Pmproxy :这个进程完成MIB DB和PM DB的数据通信。

db_disconnect的主要应用如下:

1.与parser进程的连接建立和撤消:

/usr/gsm/current/sbin/db_disconnetc disconnect parser /usr/gsm/current/sbin/db_disconnetc connect parser

东方通信系统工程部技术支持中心 5-2

OMCR 高级用户培训 第五章 OMCR数据库管理

2.与EM_LM进程的连接建立和撤消:

/usr/gsm/current/sbin/db_disconnect disconnect em /usr/gsm/current/sbin/db_disconnect connect em 3.与pmproxy进程的连接建立和撤消:

/usr/gsm/current/sbin/db_disconnect disconnect pmproxy /usr/gsm/current/sbin/db_disconnect connect pmproxy

2.4 db_pm_maint

db_pm_maint主要用来对PM上的统计数据的卸载和删除以保证新上来的统计数据有足够的磁盘空间。

db_pm_maint的功能如下:

 将过期的老的PM统计数据卸载到一个ASCII文件。  将当前的PM配置文件卸载到一个ASCII文件。  将过期的老的PM统计数据从数据库中删除。

db_pm_maint的常用命令:

db_pm_maint [-r{}] [-c] [-d] [-n]

-r :保留regular统计数据db_pm_maint的的天数。 :卸载的regular统计数据的范围。 [ -c ] : 卸载PM配置文件 [ -d ] : 删除PM统计数据

[ -n ] :不对数据库做unload,只在有[ -d ]时有效。

1. 卸载的regular统计数据中超过7天的数据 db_pm_maint –r 7

2. 卸载的regular统计数据中超过7天的数据及PM配置文件 db_pm_maint –r 7 –c

3. 同2,并将统计数据中超过7天的数据删除

db_pm_maint –r 7 –c –d

4. 同3,不卸载的regular统计数据

db_pm_maint –r 7 –c –d –n 5. 只卸载昨天的统计数据

db_pm_maint –r 1 1

6. 卸载昨天和前天的统计数据

db_pm_maint –r 1 2

2.5 omc_db_ckspace

omc_db_ckspace通常作为omc_db_maint中的一部分自动执行,显示root dbspace的磁盘空间和数据库table的使用情况,不单独使用。omc_db_ckspace执行的结果将由omc_db_maint写到一个日志文件omc_db_maint.yy.mm.dd,输出结果如下:

东方通信系统工程部技术支持中心 5-3

OMCR 高级用户培训 第五章 OMCR数据库管理

TIME Running omc_db_ckspace: 15/06/1999 02:45:11

DBSpace: all dbspaces

DBS Pages Allocated: 309981

DBS Pages Used: 216946

DBS Pages Free: 93035

OMC Database space used has reached 69.9869%

specified DBMS_MAX_SPACE_USED 80%

TBLSpace

TBS Pages Allocated: 207513

TBS Pages Used: 2837

TBS Pages Free: 204676

TIME Reconnecting Applications: 15/06/1999 02:45:17

2.6 omc_db_view_log

omc_db_view_log脚本允许用户像在UNIX中的tail –f一样对INFORMIX-ONLINE中的消息日志进行查看,它还可以允许设置查看的时间间隔。

Omc_db_view_log的命令如下:

/usr/gsm/current/sbin/omc_db_view_log [sleep-time]

3、 OMC数据库的关启

OMCR采用INFORMIX Online 7.13作为OMC DB和MIB DB的数据库引擎,因此OMC数据库的关启与Online7.1的关启是相同的。Online7系统的运行状态有online(连机),quiescent(单用户),offline(离线)。三种状态的切换如下:

东方通信系统工程部技术支持中心 5-4

OMCR 高级用户培训 第五章 OMCR数据库管理

onmode -s oninit -s onmode -m oninit -i

4、 onconfig应用

OMC上数据库的环境设置参数文件为onconfig,分别位于OMC DB和MIB DB的/$INFORMIXDIR/etc下面。Onconfig文件中的环境设置参数可以通过onmonitor菜单中的PARAMETERS/INITIALISE来修改。Onconfig文件中的各项参数定义及通常配置如下所示:

onmode -k quiescent offline #************************************************************************** # # INFORMIX SOFTWARE, INC. #

# Title: onconfig.std

# Description: INFORMIX-OnLine Configuration Parameters #

#**************************************************************************

# Root Dbspace Configuration

ROOTNAME rootdbs # Root dbspace name

ROOTPATH /dev/mib_db # Path for device containing root dbspace ROOTOFFSET 4 # Offset of root dbspace into device (Kbytes) ROOTSIZE 400000 # Size of root dbspace (Kbytes)

# Disk Mirroring Configuration Parameters

MIRROR 1 # Mirroring flag (Yes = 1, No = 0)

online 东方通信系统工程部技术支持中心 5-5

OMCR 高级用户培训 第五章 OMCR数据库管理

MIRRORPATH # Path for device containing mirrored root MIRROROFFSET 0 # Offset into mirrored device (Kbytes)

# Physical Log Configuration

PHYSDBS rootdbs # Location (dbspace) of physical log PHYSFILE 12600 # Physical log file size (Kbytes)

# Logical Log Configuration

LOGFILES 8 # Number of logical log files LOGSIZE 4000 # Logical log size (Kbytes)

# Diagnostics

MSGPATH /usr/informix/online.log # System message log file path CONSOLE /usr/informix/online.log # System console message path ALARMPROGRAM # Alarm program path

# System Archive Tape Device

TAPEDEV /dev/rmt/0 # Tape device path

TAPEBLK 96 # Tape block size (Kbytes)

TAPESIZE 2000000 # Maximum amount of data to put on tape (Kbytes)

# Log Archive Tape Device

LTAPEDEV /dev/null # Log tape device path

LTAPEBLK 16 # Log tape block size (Kbytes)

LTAPESIZE 10240 # Max amount of data to put on log tape (Kbytes)

# Optical

STAGEBLOB # INFORMIX-OnLine/Optical staging area

# System Configuration

SERVERNUM 0 # Unique id corresponding to a OnLine instance DBSERVERNAME omc_mib # Name of default database server DBSERVERALIASES omc_mib1 # List of alternate dbservernames

NETTYPE ipcshm,1,20,CPU # Override sqlhosts nettype parameters NETTYPE tlitcp,1,10,NET # Override sqlhosts nettype parameters

DEADLOCK_TIMEOUT 60 # Max time to wait of lock in distributed env. RESIDENT 0 # Forced residency flag (Yes = 1, No = 0)

MULTIPROCESSOR 0 # 0 for single-processor, 1 for multi-processor NUMCPUVPS 1 # Number of user (cpu) vps

SINGLE_CPU_VP 1 # If non-zero, limit number of cpu vps to one

NOAGE 1 # Process aging

AFF_SPROC 0 # Affinity start processor

东方通信系统工程部技术支持中心 5-6

OMCR 高级用户培训 第五章 OMCR数据库管理

AFF_NPROCS 0 # Affinity number of processors

# Shared Memory Parameters

LOCKS 10000 # Maximum number of locks

BUFFERS 2000 # Maximum number of shared buffers NUMAIOVPS 1 # Number of IO vps

PHYSBUFF 128 # Physical log buffer size (Kbytes) LOGBUFF 512 # Logical log buffer size (Kbytes) LOGSMAX 16 # Maximum number of logical log files CLEANERS 2 # Number of buffer cleaner processes SHMBASE 0xa000000 # Shared memory base address

SHMVIRTSIZE 32000 # initial virtual shared memory segment size SHMADD 8192 # Size of new shared memory segments (Kbytes) SHMTOTAL 0 # Total shared memory (Kbytes). 0=>unlimited CKPTINTVL 300 # Check point interval (in sec) LRUS 8 # Number of LRU queues

LRU_MAX_DIRTY 10 # LRU percent dirty begin cleaning limit LRU_MIN_DIRTY 5 # LRU percent dirty end cleaning limit

LTXHWM 50 # Long transaction high water mark percentage LTXEHWM 60 # Long transaction high water mark (exclusive) TXTIMEOUT 0x12c # Transaction timeout (in sec) STACKSIZE 32 # Stack size (Kbytes)

# System Page Size

# BUFFSIZE - OnLine no longer supports this configuration parameter. # To determine the page size used by OnLine on your platform # see the last line of output from the command, 'onstat -b'.

# Recovery Variables # OFF_RECVRY_THREADS:

# Number of parallel worker threads during fast recovery or an offline restore. # ON_RECVRY_THREADS:

# Number of parallel worker threads during an online restore.

OFF_RECVRY_THREADS 10 # Default number of offline worker threads ON_RECVRY_THREADS 1 # Default number of online worker threads

# Data Replication Variables

# DRAUTO: 0 manual, 1 retain type, 2 reverse type

DRAUTO 0 # DR automatic switchover

DRINTERVAL 30 # DR max time between DR buffer flushes (in sec) DRTIMEOUT 30 # DR network timeout (in sec) DRLOSTFOUND /dev/null # DR lost+found file path

# Read Ahead Variables

RA_PAGES 50 # Number of pages to attempt to read ahead RA_THRESHOLD 20 # Number of pages left before next group

# DBSPACETEMP:

东方通信系统工程部技术支持中心 5-7

OMCR 高级用户培训 第五章 OMCR数据库管理

# OnLine equivalent of DBTEMP for SE. This is the list of dbspaces # that the OnLine SQL Engine will use to create temp tables etc.

# If specified it must be a colon separated list of dbspaces that exist # when the OnLine system is brought online. If not specified, or if # all dbspaces specified are invalid, various ad hoc queries will create # temporary files in /tmp instead.

DBSPACETEMP tempdbs # Default temp dbspaces

# DUMP*:

# The following parameters control the type of diagnostics information which # is preserved when an unanticipated error condition (assertion failure) occurs # during OnLine operations.

# For DUMPSHMEM, DUMPGCORE and DUMPCORE 1 means Yes, 0 means No.

DUMPDIR /tmp # Preserve diagnostics in this directory DUMPSHMEM 0 # Dump a copy of shared memory DUMPGCORE 0 # Dump a core image using 'gcore'

DUMPCORE 0 # Dump a core image (Warning:this aborts OnLine) DUMPCNT 1 # Number of shared memory or gcore dumps for # a single user's session

# ADT*

# The following parameters control the type and level of secure auditing # present in the OnLine system. By default, ADTMODE is 0 and auditing # is disabled

FILLFACTOR 90 # Fill factor for building indexes

# method for OnLine to use when determining current time

USEOSTIME 1 # 0: use internal time(fast), 1: get time from

OS(slow)

# Parallel Database Queries (pdq)

PDQPRIORITY 0 # Degree of parallelism: 0 ... 100, # OFF => 0, LOW => 1, HIGH => 100 MAX_PDQPRIORITY 100 # Maximum allowed pdqpriority

DS_MAX_QUERIES 2 # Maximum number of decision support queries DS_TOTAL_MEMORY 10000 # Decision support memory (Kbytes)

DS_MAX_SCANS 10 # Maximum number of decision support scans DATASKIP off # List of dbspaces to skip

# OPTCOMPIND

# 0 => Nested loop joins will be preferred (where # possible) over sortmerge joins and hash joins. # 1 => If the transaction isolation mode is not

# \"repeatable read\# below. Otherwise it behaves as in (0) above. # 2 => Use costs regardless of the transaction isolation # mode. Nested loop joins are not necessarily

东方通信系统工程部技术支持中心 5-8

OMCR 高级用户培训 第五章 OMCR数据库管理

# preferred. Optimizer bases its decision purely # on costs.

OPTCOMPIND 0 # To hint the optimizer

ONDBSPACEDOWN 0 # Dbspace down option: 0 = CONTINUE, 1 = ABORT, 2

= WAIT

LBU_PRESERVE 0 # Preserve last log for log backup OPCACHEMAX 0 # Maximum optical cache size (Kbytes)

5、 数据库的备份

数据库的备份是指将数据库的系统信息及用户数据存储到后备存储区。 Ontape –s –L Archive 共可以分0级、1级、2级三个等级。 0级:全备份,对所有数据作一个copy。

1级:增量备份,将系统自最近一次0级备份以来所有的变化备份出来。 2级:增量备份,将系统自最近一次0级或1级备份以来所有的变化备份

出来。

经验:0级,一月一次。 1级,一周一次。 2级,一天一次。

备份的过程:

1. 以informix用户的身份登录到omc db 或mib db所在的主机 上。 2. cd /usr/informix/bin 3. setenv TERM vt100 4. onmonitor

在onmonitor的menu下选择archive/tape parameters

Press ESC to change tape parameters.

Press Interrupt to return to the Archive menu. Press F2 or CTRL-F for field level help

MODIFYING TAPE PARAMETERS

Tape Device [/dev/rmt/0 ] Block Size [ 96] Kbytes Tape Size [ 2000000] Kbytes Log Tape Device [/dev/null ] Block Size [ 16] Kbytes Tape Size [ 10240] Kbytes

确信Tape Device设置为/dev/rmt/0,在MIB processor上Tape Block Size

设为96kb,在System Processor上Tape Block Size设为kb。 5. 把磁带的写保护打开,放入磁带机。 6. ontape –s –L 0

7. dd if=/dev/rmt/0 of=/dev/null bs=96k(在MIB上) dd if=/dev/rmt/0 of=/dev/null bs=k(在SYS上)

8. 如果成功,把磁带写保护,在磁带上写上备份日期、备份命令、备份内容和备份人,妥善放置;如果发现有问题,重复步骤6。

东方通信系统工程部技术支持中心 5-9

OMCR 高级用户培训 第五章 OMCR数据库管理

6. 数据库的恢复

OMCR数据库的恢复的操作步骤如下:

1.确信数据库onconfig文件中的环境设置参数是否正确。

2.用db_disconnect将OMC应用程序和OMC的数据库disconnect. 3.用onmode -k将OMC的数据库置为offline模式。

4.将最近备份的0极,1级和2级磁带放在磁带机中,用onmonitor 或ontape

–r将数据库restore。

5.用oninit –I将OMC数据库返回到online模式。

东方通信系统工程部技术支持中心 5-10

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo8.com 版权所有 湘ICP备2023022238号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务