在Oracle上备份和恢复 Remedy ARS数据库

Why ARS system need full backup and restore
众所周知Remedy ARS上运行的所有程序代码都是在数据库中存储的,几乎所有的程序代码和相关数据都是存储在后端的数据库里的。基于这种特性,我们可以很方便地从数据库层面实现对ARS系统的备份和恢复。所谓基于数据库的备份和恢复就是指数据库的全库导入和导出。在这方面Oracle做的很好,他所提供的imp和exp命令行工具能很好的完成此项任务。

When you may backup BMC Remedy ARS system Database
Remedy ARS系统数据库全备份可能会发生在下面的几个时间点:
-
在安装过程中,Remedy ITSM套件的安装都是从ARS开始一个模块一个模块增加安装的,可以在安装每个新模块之前,做一个数据库备份,用于安装失败情况下的现场恢复
-
在系统上线前,当系统需要做升级/代码更新等等大规模操作之前可以考虑做一次数据库的导出备份
-
在做系统迁移的情况下,我们甚至可以生产库迁移到开发机上进行问题的重现,或者代码的修改,或者测试,完成之后再导回生产系统(如果生产系统再次期间处于维护状态的话)
How-to
下面是我总结的相关操作步骤参考。
备份ARSystem数据库
exp aradmin/ar#admin@itil file=c:\before-patch7.dmp log=c:\exp.log compress=n statistics=none
参数解释:
aradmin/ar#admin 是ARS系统默认的用户名和口令
@itil 是ARSystem数据库所在的数据库实例名
file=c:\before-patch7.dmp log=c:\exp.log 是导出的数据库文件和日志文件路径
删除ARAdmin用户数据
drop user aradmin cascade;
创建和授权ARAdmin用户
CREATE USER ARADMIN
IDENTIFIED BY ar#admin#
DEFAULT TABLESPACE ARSYSTEM
TEMPORARY TABLESPACE ARTMPSPC
PROFILE DEFAULT
ACCOUNT UNLOCK;
GRANT ARADMINROLE TO ARADMIN;
ALTER USER ARADMIN DEFAULT ROLE ALL;
ALTER USER ARADMIN QUOTA UNLIMITED ON ARSYSTEM;
导入备份的数据文件
imp ARAdmin/AR#Admin@ars file=c:\CMDB2010-12-13_13.dmp log=c:\imp.log fromuser=ARAdmin touser=ARAdmin ignore=y
Credit to:以上操作步骤由神州太岳工程师李成旗协助编写和测试.
14Feb2011
图书推荐《服务建模:原理与应用》

Learn how to use service modelling to streamline and optimize processes!
Information about customer needs, the technical composition of services, and service performance are fundamental to effective service management. Service modelling is a structured approach to utilizing this information to improve the way services are delivered. Consistent application of service modelling provides the automation of processes and timely access to information.
Service Modelling presents a comprehensive, up-to-date overview of the topic, presented in the context both of business processes, and of requirements stemming from the need to manage network resources. Vilho Räisänen delivers a justification for service modelling, and explains state-of-the-art concepts, frameworks and standards in detail.
Service Modelling:
- Provides a complete and illustrated overview of state-of-the-art concepts for service modelling, covering requirements and frameworks.
- Includes industry initiatives, conceptual frameworks, and the work of standardisation bodies.
- Discusses different modelling approaches, and the positioning of modelling of services in service management and in the wider operational context.
- Sets the modelling framework in the context of business drivers and modelling paradigms.
- Illustrates principles with real-world use cases, providing both fixed Internet and mobile network examples.
- Relates concepts to the work of TeleManagement Forum, giving practical examples throughout.
Service Modelling: Principles and Applications is an invaluable guide to service modelling for telecommunications and data communications professionals, including vendors, operators, consultants, training organizations, service and content providers, system architects and engineers for IP-based services. Educational organizations, advanced undergraduate and graduate students on telecommunications and networking courses will also find this text invaluable.
本书的已经翻译为中文版本,本书中包含了针对电信行业的实例模型和介绍,图书内容介绍如下:
《服务建模:原理与应用》主要内容简介:服务技术的发展,不仅彻底改变了人们原有的生活方式,更从本质上促进了当代社会经济发展方式的转变。《服务建模: 原理与应用》以服务建模为主题,共分4部分:第1部分介绍了服务建模所需解决的问题,第2部分分析了实际应用中的服务建模框架,第3部分列举了使用服务建模的案例,第4部分则对《服务建模:原理与应用》的中心内容进行了总结,并提出了未来服务建模值得研究的一些领域。
《服务建模:原理与应用》可作为高校信息技术、管理和经济类相关学科电子服务方向的教学用书。也可以作为现代服务企业进行服务建模方面研究的工具书或参考书。
12Feb2011
在64位Windows上安装ARS7.5
.png)
刚才终于把ARS装上了。费了我两天的力气终于搞定了。错误其实很简单的,现象很多人都见过,ARS在安装完所有的文件后,在系统中建完ARS的服务以后,会继续启动服务,才能做最后的程序文件导入的相关操作。
错误的现象是:在启动服务的时,安装程序一直停止在“Starting Remedy ARS services….”的屏幕,去arerror日志里面可以看到无法连接到SQL数据库的错误。
我的安装错误的原因其实很简单:
- 如果是64为的Windows操作系统,默认的安装路径是C:\Program Files (x86)\目录
- Oracle客户端没有正确的安装
解决的方法如下:
- 修改ars默认的安装路径,尽量把它放在一个较短的而且没有特殊字符的路径里,如D:\bmc\
- ARS 7.5 sp6支持的Oracle客户端是32位的,如果你在64位OS上安装的是64位的Oracle数据+客户端(sqlplus),那么默认的这个64为的客户端是不能用的,需要安装一个62位的客户端,而且需要时10g的,此版本也不支持11g的客户端;另外在安装32位的oracle客户端的时候最好也不要在路径中有特殊字符如符号和下划线之类的
ARS7.5本身是32位的可支持程序,所以它所需要的JDK和Oracle都需要是32位的版本。如果你安装的是7.6.04,就不需要考虑32位的问题,由于它本身就是64位的程序了,所以JDK和Oracle都需要使用相应的64为的程序。
11Feb2011
BMC Atrium CMDB CI数据迁移
.png)
在不同的CMDB服务器之间做数据迁移之前一定要注意两点:1)保持两边的CDM相同;2)先导入CI数据在导入CI相关的关系数据。另外就是每个类导入完毕之后要做数据完整性和正确性的抽检。以下使用的工具是cmdbdriver,该命令初始化和一般性的参数介绍请参考相关文档。
CI数据导出示例
Command: xexpdt
XEXPORT DATA
Export instance data from all classes? (F):
Classes to export data from:
Class and its subclasses, From namespace (1,2) (1):
Namespace (): BMC.CORE
Class name (): BMC_ComputerSystem
Dataset ID (): BMC.ASSET
Filename for exported data: C:\DEMO\cs-ci
Exporting Class BMC_ComputerSystem
i=0: namespaceName = BMC.CORE, className = BMC_ComputerSystemExported without errorsExporting Class BMC_MainframeExporti
ng Class BMC_PrinterExporting Class BMC_StorageSubsystem
CMDBExportData results
ReturnCode: OK
Status List : 0 items
到相应目录下面找到导出的文件,导出的结果至少是两个文件一个是META_FILE其他的才是CI数据文件。
关系数据导出示例
Command: xexpdt
XEXPORT DATA
Export instance data from all classes? (F):
Classes to export data from:
Class and its subclasses, From namespace (1,2) (1):
Namespace (): BMC.CORE
Class name (): BMC_Dependency
Dataset ID (): BMC.ASSET
Filename for exported data: C:\DEMO\REL-DEP.XML
Exporting Class BMC_Dependency
i=0: namespaceName = BMC.CORE, className = BMC_DependencyExported without errorsExporting Class BMC_AccountOnSystemExpor
ting Class BMC_HostedAccessPointExporting Class BMC_HostedServiceExporting Class BMC_InventoryBulkItemsExporting Class B
MC_InventoryComputerSystemsExporting Class BMC_InventoryEquipmentExporting Class BMC_InventorySystemComponents
CMDBExportData results
ReturnCode: OK
Status List : 0 items
到相应目录下面找到导出的文件,导出的结果至少是两个文件一个是META_FILE其他的才是CI数据文件。
导入数据示例
Command: impdt
IMPORT INSTANCE DATA
Handle duplicate Instance Ids:
(Error/New ID for Dup/Merge/New ID for All) (1-4) (1): 3
Filename containing import data: c:\demo\cs-ci_0_0 (导入包含CI数据的文件)
CMDBImportData results
ReturnCode: OK
Status List : 0 items
Total items Processed : 2
Items Imported successfully : 2
Items for which Import failed : 0
Command: impdt
IMPORT INSTANCE DATA
Handle duplicate Instance Ids:
(Error/New ID for Dup/Merge/New ID for All) (1-4) (1): 3
Filename containing import data: c:\demo\REL-DEP.XML_0_0 (导入包含关系数据的文件)
CMDBImportData results
ReturnCode: OK
Status List : 0 items
Total items Processed : 1
Items Imported successfully : 1
Items for which Import failed : 0
导入完毕之后使用Remedy User到相应的表格中查找,确认导入的数据是否正确。
12Jan2011
BMC Atrium CMDB 类定义迁移
.png)
当对CDM做了定制,并且要在不同的服务器直接做类的迁移的时候,需要把定制过的类都导出,然后在目标机上导入。可以使用的CMDB自带的命令行cmdbdriver工具。
cmdbdriver.exe能支持的参数
Options:
-u<USER>
-a<AUTHORSTRING>
-p<PASSWORD>
-l<LOCALE>
-s<SERVER>
-x<INPUTFILE_FULLPATH>
-t<PORT_NUMBER>
-q<QUIET_MODE_NUMBER>
登录CMDBdriver 实例: cmdbdriver -u Demo -p bmc@XXX -s atriumcmdb -t 9988
登录之后在运行另外用于初始化的两个命令 init 和log
Command: init
INITIALIZATION
CMDBInitialization results
ReturnCode: OK
Status List : 0 items
Command: log
Control record:
Authentication string () :
User name () : Demo
Password () : **********
Locale[.charSet] () :
TimeZone () :
Server () : atriumcmdb
导出类定义的方法实例
Command: xexpdf
XEXPORT DEFINITION
Export all classes? (F):
Classes to export:
Class and its subclasses, From namespace (1,2) (1):
Namespace (): BMC.CORE
Class name (): BMC_ComputerSystem
Export all attributes with classes? (T):
Filename for exported data: c:\demo\BMC_ComputerSystem.xml
CMDBXExportDef results
ReturnCode: OK
Status List : 0 items
使用文本编辑器查看c:\demo\BMC_ComputerSystem.xml的导出结果
导入类定义的方法:
Command: impdf
DEFINITION IMPORT
Import Item List:
Number of import items (0):
Import option : Create/Overwrite (1-2) (1): 2
Filename containing import data: c:\demo\cs.xml
CMDBImportDef results
ReturnCode: OK
Status List : 0 items
使用Remedy User,用Demo登录,把语言切换到英文,然后在查BMC_ComputerSystem表达,在custom 2 ~n的tab页面里面查看哪些导入的属性。或者使用class manager查看确认导入是否成功。
12Jan2011



