星期一, 四月 30, 2007

ORACLE与SQL Server的透明网关配置

ORACLE安装时(9i)将TRANSPARENT GATEWAY FOR MSSQL选中,在ORACLE主目录\BIN中,有个tg4msql.exe程序,它是透明网关程序啦,同时在主目录中还有tgrmsql的一个目录,ORACLE_HOME\tg4msql\admin目录中的inittg4msql.ora就是需要进行配置才能在ORACLE中连接SQL。

1 打开inittg4msql.ora:
#
# HS init parameters
# xzh代表SQL服务名,pubs代表要访问的SQL数据库
#
HS_FDS_CONNECT_INFO="SERVER=xzh;DATABASE=pubs"
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
2 监听的配置oracle_home\network\admin\Listiner.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xzh)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xzh)(PORT = 1527))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = xzh.world)
(ORACLE_HOME = D:\oracle\ora92)
(SID_NAME = xzh)
)
(SID_DESC =
(GLOBAL_DBNAME = tg4msql)
(PROGRAM = tg4msql)
(SID_NAME = tg4msql)
(ORACLE_HOME = D:\oracle\ora92)
)
)
GLOBAL_DBNAME、SID_NAME可以任意,PROGRM必须指向tg4msql
3 本地服务文件的配置oracle_home\network\admin\TnsNames.ora
XZH =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xzh)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = xzh.world)
)
)

TG4MSQL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xzh)(PORT = 1527))
)
(CONNECT_DATA =
(SID = tg4msql)
)
(HS = OK)
)
使用SQL的本地服务名为TG4MSQL,可以任意写,SID必须是Listiner.ora中指定的那个SID_NAME,PORT也必须是监听中指定的PORT,主机等都要符合一致。 到此为止,我们把透明网关大致已经配置好啦,如果要访问SQL,还要使用数据库链才方便。
4 在SQL中创建登录帐号xzh口令xzh,使用可以访问PUBS数据库。
CREATE DATABASE LINK sql CONNECT TO xzh IDENTIFIED BY xzh
USING ‘TG4MSQL’
这里的USING ‘TG4MSQL’是tnsnames.ora中配置好的本地服务名,sql是我们以后要引用的数据库链名。
SQL>SELECT * FROM prices@dblink
如果有数据返回,表示我们访问SQL数据库的通道已经建成,请大胆使用吧,但对远程异构数据库不充许进行DDL操作。
SQL>CREATE TABLE test@tg4msql FRIN all_users;
*
ERROR 位于第 1 行:
ORA-02021: 不允许对远程数据库进行 DDL 操作

星期日, 四月 29, 2007

SecureCRT使用密钥登录SSH服务器

一个管理员要管理多台机器,并且服务器的密码要定期修改,尤其在有很多台服务器的情况下,这是一个艰巨的任务,但理用公私钥,就可以很轻松的维护服务器的密码问题,我们完全可以让Linux服务器的登陆认证基于公私钥而不是密码,如下以SecureCRT为工具所示:
1.使用SecureCRT创建私钥和公钥.
SecureCRT: Quick Connect -> Authentiation -> Public Key -> Properties -> Create Identity File -> DSA/RSA -> Set Passphrase -> Done这个时候在指定目录会生成两个文件,例如,私钥my_rsa和公钥my_rsa.pub
2.将公钥 my_rsa.pub 传到linux服务器,将SSH2兼容格式的公钥转换成为Openssh兼容格式
# ssh-keygen -i -f Identity.pub >> /root/.ssh/authorized_keys2
# chmod 600 /root/.ssh/authorized_keys2
3.在SecureCRT里面设置登录模式为PublicKey,并选择刚刚创建的my_rsa文件作为私钥
4.由于已经设置了密钥登录,原来的密码登录就完全可以去掉
# vi /etc/ssh/sshd_config
Protocol 2 /仅允许使用SSH2
PubkeyAuthentication yes /*启用PublicKey认证
AuthorizedKeysFile .ssh/authorized_keys2 /*PublicKey文件路径
PasswordAuthentication no /*禁止密码验证登录

以上步骤是使用SecureCRT生成的密钥对来进行登录验证的,其实也可以在服务器上使用ssh-keygen命令生成的密钥,同样在生成密钥对之后,将格式转换成SecureCRT 使用的SSH2格式

redhat linux下安装Veritas netbackup软件实录

1.安装master server
(1)运行安装程序
# /cdrom1/install

VERITAS Installation Script
Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved.

Installation Options

1 NetBackup
2 NetBackup Client Software

q To quit from this script
Choose an option [default: q]: 1

The NetBackup and Media Manager software is built for use on LINUX hardware.
Do you want to install NetBackup and Media Manager files? [y,n] (y) y

NetBackup and Media Manager are normally installed in /usr/openv.
Is it OK to install in /usr/openv? [y,n] (y) y

The Linux clients will be loaded.
Do you want to load any other NetBackup clients onto the server? [y,n] (y) n
开始安装
Reading client binaries for /usr/openv/netbackup/client/Linux
Linux/
......
+ /bin/cp ./fsanalyze /usr/openv/netbackup/bin/fsanalyze


A NetBackup Server or Enterprise Server license key is needed
for installation to continue.

Enter license key: (输入master licence)

:
NetBackup Enterprise Server Base product with the following features enabled:
Open File Backup
Remote Client Support
Robotic Library Sharing Support
Remote Media Server Support
Microsoft RSM Robotic Libraries
ADIC DAS/SDLC Robotic Libraries
IBM ATL Robotic Libraries
Fujitsu LMF Robotic Libraries
StorageTek ACS Robotic Libraries
Inline Tape Copy
has been registered.


All additional keys should be added at this time.
Do you want to add additional license keys now? [y,n] (y) n
是否增加其他licence,可以选y继续输入或选n等安装完后在管理界面上再添加


If this machine will be using a different network interface than the
default (gzdb1), the name of the preferred interface should be used
as the configured server name. If this machine will be part of a
cluster, the virtual name should be used as the configured server name.

The domainname of your server appears to be "(none)".
You may choose to use this domainname in your configured NetBackup server
name, or simply use "gzdb1" as the configured NetBackup server name.

Would you like to use "gzdb1.(none)" as the configured
name of the NetBackup server? [y,n] (y) n (选n)

Enter the name of the NetBackup server: gzdb1 (手工填写本机名,可不用域名)

Is gzdb1 the master server? [y,n] (y) (问本机是否是master server,选y)
Do you have any media servers? [y,n] (n) (问有无其他media server,暂无选n)

......
安装过程会在/etc/services增加服务
......

To change these entries modify the file /tmp/services.ov_edited.27459
and enter when ready to continue: (按回车继续)

......

Sending SIGHUP to xinetd process.

Reloading configuration: [ OK ] (系统的xinetd服务必须已启动)

......
安装过程会在/etc/rc.d增加系统启动和关闭服务脚本
......

Enter which host will store the global device database.
(default: gzdb1): (问全局库的主机,如默认显示是master server就按回车,否及手工输入)

Starting the NetBackup database manager process (bpdbm).

Do you want to create policy and schedule examples that you can view or use
when you are configuring your own policies and schedules? [y,n] (y) (问是否创建备份策略调度列表及事例,选y)

......
安装过程在创建policy and schedule
......

Do you want to start the Media Manager device daemon processes? [y,n] (y) (问是否启动Media Manager服务,选y)
Starting the Media Manager device daemon processes.

Do you want to start the NetBackup bprd process so
backups and restores can be initiated? [y,n] (y) (问备份恢复服务是否启动,选y)
Starting the NetBackup request daemon process (bprd).


Done executing NB.inst


VERITAS Installation Script
Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved.

Installation Options

1 NetBackup
2 NetBackup Client Software

q To quit from this script
Choose an option [default: q]: (安装完毕,选q退出)
(2) 编辑.bash_profile
在root目录下的.bash_profile里手工加入Veritas的命令路径,便于日常命令使用。
加入:
PATH=$PATH:$HOME/bin:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd:/usr/openv/netbackup/bin/goodies:/usr/openv
/volmgr/bin
保存退出
执行使生效:#. ./.bash_profile

执行bpps -a查看进程,应有以下进程
# bpps -a
NB Processes
------------
root 27633 1 0 11:23 pts/0 00:00:00 /usr/openv/netbackup/bin/bpdbm
root 27906 1 0 11:23 pts/0 00:00:00 /usr/openv/netbackup/bin/bprd
root 27635 27633 0 11:23 pts/0 00:00:00 /usr/openv/netbackup/bin/bpjobd


MM Processes
------------
root 27613 1 0 11:23 pts/0 00:00:00 /usr/openv/volmgr/bin/vmd

(3)编辑/usr/openv/netbackup/bp.conf文件
根据主机脚色加入以下信息
SERVER = gzdb1
SERVER = gzwebdb
SERVER = gzwebdbbak
CLIENT_NAME = gzdb1
MEDIA_SERVER = gzwebdb
MEDIA_SERVER = gzwebdbbak
......
注:SERVER--〉包括master server 和media server;
CLIENT_NAME--〉本机及要通过网络备到本机的主机;
MEDIA_SERVER--〉包括master server 和media server。

(4)安装补丁
安装以下所补丁
NB_51_4_M_280420.linux.tar
NB_CLT_51_4_M_280431.tar
NB_ORA_51_4_M_280463.linux2.4.tar
1)将文件放在一临时目录下,全部用tar接压;
2)用netbackup stop停止netbackup服务;
3)运行安装脚本;
#./Vrts_pack.install

There are 3 packs available in /data/veritas_inst:
(* denotes installed pack)

NB_51_4_M
NB_CLT_51_4_M
NB_ORA_51_4_M

Enter pack name (or q) [q]: NB_51_4_M (在列表里选择第一个补丁)

Pack NB_51_4_M requires the following pack levels(s) :
NB_CLT_51_4_M.

Pack NB_51_4_M will not be installed at this time.

Installing required pack, NB_CLT_51_4_M, now.

Pack NB_CLT_51_4_M co-requires the following pack level(s) :
NB_51_4_M.

Install pack NB_CLT_51_4_M Wed Feb 15 14:56:14 CST 2006 Rev. 1.19.4.23

Performing install of Linux/RedHat2.4 client binaries locally.

Running preinstall script.
......
安装程序会将“NB_CLT_51_4_M”一并安装
......

------------------------------------------------
Installation of pack NB_51_4_M completed Wed Feb 15 14:56:14 CST 2006 Rev. 1.19.4.23.
------------------------------------------------

There are 3 packs available in /data/veritas_inst:
(* denotes installed pack)

NB_51_4_M *
NB_CLT_51_4_M *
NB_ORA_51_4_M

Enter pack name (or q) [q]: (打*号表示已安装的补丁,master server不需安装NB_ORA_51_4_M,选q退出)

4)执行netbackup start重新启动服务。








2.安装media server
(1)运行安装程序
# /cdrom1/install


VERITAS Installation Script
Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved.

Installation Options

1 NetBackup
2 NetBackup Client Software

q To quit from this script
Choose an option [default: q]: 1

The NetBackup and Media Manager software is built for use on LINUX hardware.
Do you want to install NetBackup and Media Manager files? [y,n] (y) y

NetBackup and Media Manager are normally installed in /usr/openv.
Is it OK to install in /usr/openv? [y,n] (y) y

The Linux clients will be loaded.
Do you want to load any other NetBackup clients onto the server? [y,n] (y) n
开始安装
Reading client binaries for /usr/openv/netbackup/client/Linux
Linux/
......
+ /bin/cp ./fsanalyze /usr/openv/netbackup/bin/fsanalyze


A NetBackup Server or Enterprise Server license key is needed
for installation to continue.

Enter license key: (输入master licence)

:
NetBackup Enterprise Server Base product with the following features enabled:
Open File Backup
Remote Client Support
Robotic Library Sharing Support
Remote Media Server Support
Microsoft RSM Robotic Libraries
ADIC DAS/SDLC Robotic Libraries
IBM ATL Robotic Libraries
Fujitsu LMF Robotic Libraries
StorageTek ACS Robotic Libraries
Inline Tape Copy
has been registered.


All additional keys should be added at this time.
Do you want to add additional license keys now? [y,n] (y) n
是否增加其他licence,可以选y继续输入或选n等安装完后在管理界面上再添加


If this machine will be using a different network interface than the
default (gzwebdb), the name of the preferred interface should be used
as the configured server name. If this machine will be part of a
cluster, the virtual name should be used as the configured server name.

The domainname of your server appears to be "(none)".
You may choose to use this domainname in your configured NetBackup server
name, or simply use "gzwebdb" as the configured NetBackup server name.

Would you like to use "gzwebdb.(none)" as the configured
name of the NetBackup server? [y,n] (y) n (选n)

Enter the name of the NetBackup server: gzwebdb (手工填写本机名,可不用域名)

Is gzdb1 the master server? [y,n] (n) (问本机是否是master server,选n)

What is the fully qualified name of the master server? gzdb1 (在此输入master server的主机名,如“gzdb1”)

......
安装过程会在/etc/services增加服务
......

To change these entries modify the file /tmp/services.ov_edited.27459
and enter when ready to continue: (按回车继续)

......

Sending SIGHUP to xinetd process.

Reloading configuration: [ OK ] (系统的xinetd服务必须已启动)

......
安装过程会在/etc/rc.d增加系统启动和关闭服务脚本
......


Enter global device database host (default: gzdb1): (问全局库的主机,如默认显示是master server就按回车,否及手工输入)

Do you want to start the Media Manager device daemon processes? [y,n] (y) (问是否启动Media Manager服务,选y)
Starting the Media Manager device daemon processes.


Done executing NB.inst


VERITAS Installation Script
Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved.

Installation Options

1 NetBackup
2 NetBackup Client Software

q To quit from this script
Choose an option [default: q]: (安装完毕,选q退出)


(2)编辑.bash_profile
在root目录下的.bash_profile里手工加入Veritas的命令路径,便于日常命令使用。
加入:
PATH=$PATH:$HOME/bin:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd:/usr/openv/netbackup/bin/goodies:/usr/openv
/volmgr/bin
保存退出
执行使生效:#. ./.bash_profile

执行bpps -a查看进程,应有以下进程
# bpps -a
NB Processes
------------

MM Processes
------------
root 27613 1 0 11:23 pts/0 00:00:00 /usr/openv/volmgr/bin/vmd


(3)编辑/usr/openv/netbackup/bp.conf文件
根据主机脚色加入以下信息
SERVER = gzdb1
SERVER = gzwebdb
SERVER = gzwebdbbak
CLIENT_NAME = gzdb1
MEDIA_SERVER = gzwebdb
MEDIA_SERVER = gzwebdbbak
......
注:SERVER--〉包括master server 和media server;
CLIENT_NAME--〉本机及要通过网络备到本机的主机;
MEDIA_SERVER--〉包括master server 和media server。
(4)安装oracle agent
因为media server作为client端,需要在线备份oracle数据库,所以要安装database agent用以数据库的备份。
1) 进入加载database agent的光盘或IOS目录
cd /cdrom2
2)运新安装程序
# ./install

VERITAS Installation Script
Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved.

Installation Options
1 NetBackup Add-On Product Software
2 NetBackup Database Agent Software
q To quit from this script
Choose an option [default: q]: 2
**********
There are two ways to install database agent software.
1. Remote Installation: Loads the software on a master server with
the intent of pushing database software out to affected clients.

2. Local Installation: Loads and installs the software only to this
local machine.
**********
Do you want to do a local installation? [y,n] (n) 2
You have entered an invalid option.
Do you want to do a local installation? [y,n] (n) y

**********
NetBackup Database Agent Installation
Choose the Database Agents you wish to install
one at a time or select Install All Database Agents.

1) NetBackup for DB2
2) NetBackup for Informix
3) NetBackup for Lotus Notes
4) NetBackup for Oracle
5) NetBackup for SAP
6) NetBackup for Sybase
7) Install All Database Agents
q) Done Selecting Agents
x) Exit from this Script

Select the Oracle option if upgrading any of the
following: Oracle, Oracle on UNIX Advanced BLI Agent,
Oracle ServerFree Agent or Database Archiver.
The packages have been combined.

Choose an option: 4 (选4,安装oracle类型)

Choose an option: q (如没其他类型的数据库,默认q退出选择状态)


You have chosen to install these Database Agents:

NetBackup for Oracle

Is this list correct? [y,n] (y) (显示当前选择的database 类型,选y开始安装)

**********
Of the agents selected, the following are supported
on this platform and will be installed:

Oracle

Loading the Database Agent packages into the
/usr/openv/netbackup/dbext directory and installing.

**********

Installing NetBackup for Oracle
……安装程序在安装文件
NetBackup for Oracle installation completed.

**********

Execution of ./install_dbext is complete.

Execution of ./install is complete.

File /tmp/install_options_trace.27635 contains a trace of this install.

VERITAS Installation Script
Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved.

Installation Options

1 NetBackup Add-On Product Software
2 NetBackup Database Agent Software

q To quit from this script
Choose an option [default: q]:
退出完成安装


(5)安装补丁
安装以下所补丁
NB_51_4_M_280420.linux.tar
NB_CLT_51_4_M_280431.tar
NB_ORA_51_4_M_280463.linux2.4.tar
1)将文件放在一临时目录下,全部用tar接压;
2)用netbackup stop停止netbackup服务;
3)运行安装脚本;
#./Vrts_pack.install

There are 3 packs available in /data/veritas_inst:
(* denotes installed pack)

NB_51_4_M
NB_CLT_51_4_M
NB_ORA_51_4_M

Enter pack name (or q) [q]: NB_51_4_M (在列表里选择第一个补丁)

Pack NB_51_4_M requires the following pack levels(s) :
NB_CLT_51_4_M.

Pack NB_51_4_M will not be installed at this time.

Installing required pack, NB_CLT_51_4_M, now.

Pack NB_CLT_51_4_M co-requires the following pack level(s) :
NB_51_4_M.

Install pack NB_CLT_51_4_M Wed Feb 15 14:56:14 CST 2006 Rev. 1.19.4.23

Performing install of Linux/RedHat2.4 client binaries locally.

Running preinstall script.
......
安装程序会将“NB_CLT_51_4_M”一并安装
......

------------------------------------------------
Installation of pack NB_51_4_M completed Wed Feb 15 14:56:14 CST 2006 Rev. 1.19.4.23.
------------------------------------------------

There are 3 packs available in /data/veritas_inst:
(* denotes installed pack)

NB_51_4_M *
NB_CLT_51_4_M *
NB_ORA_51_4_M

Enter pack name (or q) [q]: NB_ORA_51_4_M (在列表里选择ORA补丁)

Install pack NB_ORA_51_4_M Wed Feb 15 14:56:14 CST 2006 Rev. 1.19.4.23


Please pick one of the following methods for installing this database pack.

1. Remote Installation: Loads the software on a master server with
the intent of pushing the pack out to affected clients.
2. Local Installation: Loads and installs the pack only to this
local machine.

Enter option (or q) [q]: 2

Saving pre-existing binaries.
Running preinstall script.
......
安装程序会将“NB_ORA_51_4_M”补丁
......

------------------------------------------------
Installation of pack NB_ORA_51_4_M completed Wed Feb 15 15:16:14 CST 2006 Rev. 1.19.4.23.
------------------------------------------------
There are 3 packs available in /data/veritas_inst:
(* denotes installed pack)

NB_51_4_M *
NB_CLT_51_4_M *
NB_ORA_51_4_M *

Enter pack name (or q) [q]: (打*号表示已安装的补丁,选q退出)

4)执行netbackup start重新启动服务。

5)用Veritas链接数据库
Veritas必须和数据库进行链接后才可以正常使用,使用veritas自带脚本(位置/usr/openv/netbackup/bin/oracle_link)进行数据库链接
,直接运行即可:
/usr/openv/netbackup/bin/oracle_link
三、配置Veritas
1.图形管理界面调用
1)用图形工具,如VNC打开master server图形界面,新建一个终端窗口。
2)运行/usr/openv/netbackup/bin/jnbSA命令出现“Netbackup Admin Console”界面。


2.配置Storage Units
在“Storage Units”处配置master server和media server的备份设备。
master server:
例(主机名为gzdb1,备份目录为/backup)
按右键选new
"Storage unit name"输入gzdb1-disk
"NerBackup media server"输入gzdb1
"Storage unit tupe"选disk
"Absolute pathname to directory"输入/backup
按"OK"退出

media server:
例(主机名为gzwebdb,备份目录为/backup)
按右键选new
"Storage unit name"输入gzwebdb-disk
"NerBackup media server"输入gzwebdb
"Storage unit tupe"选disk
"Absolute pathname to directory"输入/backup
按"OK"退出
......
如此将所有media server的主机都新建起来。


3.配置Veritas的catalog信息库备份
1)点左窗口的最上方的“gzdb1(Master Server)”->再选右边的“Configure the Catalog Backup”配置向导;
2)按提示操作选择,一直下一步直到Master server和所有的media server的备份信息目录都显示出来,按“OK”保存退出;
3)右键点左窗口的“Catalog”选“Configure the Catalog Backup”,出现配置窗口;
“Attributes”栏:“Mdia1”-〉选diak,-〉“Media density”备份目录名如输入/backup/catalog
“Schedule”栏: 选择“After each session of scheduled,user,or manual backups”
按“OK”退出


4.配置策略进行备份
建立oracle在线全备
1)新建一个策略,命名尽量能看出那台主机和备份的概要,如要对gzwebdb进行oracle全备可为:gzwebdb_ora_full;
“Attributes”栏:“Policy”选oracle,->“Policy storage unit”选要备份的主机本地的unit,如gzwebdb-disk;
“Schedules”栏:选“new”按钮->“name”定义一个名称可以策略名相同gzwebdb_ora_full,->“Frequency”选备份的频率,一日一备选
1 Days,->“Retention”选保存的时间,如保存一周选1 week;“start window”->根据需要设置备份策略启动周期的时间,保存按“OK”

“Clients”栏:按“new”手工输入备份主机名gzwebdb;
“Backup Selections”栏:按“new”手工输入备份脚本的路径,如/u01/oracle/ora920/backup/back_fulldb.sh
保存退出

2)可对策略进行手工备份,选定设定好策略,按右键选“Manual backup...”,及开始备份。备份过程状态可在窗口的“Activity Monitor
”处监控。


5.oracle备份脚本
在Veritas下设定oracle备份策略开始备份前,相应的oracle脚本需在指定的目录下存在,每个脚本可产生对应的日志文件,便于查看和差错时使用。备份脚本见附件“Veritas_ora_script.rar”,每台备份主机可根据实际情况修改使用。

Redhat下MD设备的多路径使用问题

使用MD设备;创建文件系统之后,有时候在I/O操作的时候(主要是写),会出现I/O Error,然后文件系统被remount成ReadOnly,该问题在测试及系统上线的时候多次出现,经检查,是在创建MD虚拟设备之前创建了文件系统,下面详细记录了问题出现、处理的过程,及详细的原因。
一、错误重现
以下步骤与3月11日系统迁移中的过程一致,在6920上新映射了一个5G的LUN到主机,然后重复建立MD设备、创建文件系统及cp文件的过程,最后dmesg得出了与当天相同的日志。
1、对LUN进行分区(此前已经扫描出sd设备):
[root@gddb2 ~]# ./getwwn.sh

3600015d00004d30000000000000007e5 /dev/sda
3600015d00004d30000000000000007e5 /dev/sdd
3600015d00004d300000000000000081e /dev/sdb
3600015d00004d300000000000000081e /dev/sde
3600015d000055c000000000000000a18 /dev/sdc
3600015d000055c000000000000000a18 /dev/sdf
[root@gddb2 ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 1018 5238597 83 Linux
[root@gddb2 ~]# fdisk -l /dev/sde

Disk /dev/sde: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes

Device Boot Start End Blocks Id System
/dev/sde1 1 1018 5238597 83 Linux
――――由于sdb和sde是同一个LUN的不同路径,所以对sdb进行分区就可以了
2、在sdb1上创建ext3文件系统
[root@gddb2 ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.35 (28-Feb-2004)
max_blocks 1341080576, rsv_groups = 40927, rsv_gdb = 319
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
655360 inodes, 1309649 blocks
65482 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1342177280
40 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
inode.i_blocks = 20424, i_size = 4243456
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

3、创建MD虚拟设备:
[root@gddb2 ~]# mdadm -C /dev/md3 -l multipath -n 2 /dev/sdb1 /dev/sde1
mdadm: /dev/sdb1 appears to contain an ext2fs file system
size=5238596K mtime=Thu Jan 1 08:00:00 1970
mdadm: /dev/sde1 appears to contain an ext2fs file system
size=5238596K mtime=Thu Jan 1 08:00:00 1970
Continue creating array? y
mdadm: array /dev/md3 started.

4、加载文件系统,并做cp操作:
[root@gddb2 ~]# mount /dev/md3 /md3/
[root@gddb2 ~]# cp /data/tablespace/* /md3/
cp: writing `/md3/mtamail21.dbf': No space left on device
cp: writing `/md3/mtamail22.dbf': No space left on device
cp: writing `/md3/mtamail23.dbf': No space left on device
cp: writing `/md3/mtamail31.dbf': No space left on device
cp: writing `/md3/mtamail32.dbf': No space left on device
cp: writing `/md3/mtamail33.dbf': No space left on device
cp: writing `/md3/mtamanager01.dbf': No space left on device
5、以上的cp命令只是报了文件系统空间满的错,但是没有报I/O错,再看看系统的日志dmesg:
[root@gddb2 ~]# dmesg
……(省略若干无关内容)
md: export_rdev(sdb1)
md: bind
md: bind
multipath: array md3 active with 2 out of 2 IO paths
kjournald starting. Commit interval 5 seconds
EXT3 FS on md3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
SELinux: initialized (dev md3, type ext3), uses xattr
attempt to access beyond end of device
md3: rw=1, want=10477064, limit=10477056
printk: 7 messages suppressed.
Buffer I/O error on device md3, logical block 1309632
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477072, limit=10477056
Buffer I/O error on device md3, logical block 1309633
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477080, limit=10477056
Buffer I/O error on device md3, logical block 1309634
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477088, limit=10477056
Buffer I/O error on device md3, logical block 1309635
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477096, limit=10477056
Buffer I/O error on device md3, logical block 1309636
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477104, limit=10477056
Buffer I/O error on device md3, logical block 1309637
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477112, limit=10477056
Buffer I/O error on device md3, logical block 1309638
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477120, limit=10477056
Buffer I/O error on device md3, logical block 1309639
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477128, limit=10477056
Buffer I/O error on device md3, logical block 1309640
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477136, limit=10477056
Buffer I/O error on device md3, logical block 1309641
lost page write due to I/O error on md3
attempt to access beyond end of device
md3: rw=1, want=10477144, limit=10477056
attempt to access beyond end of device
md3: rw=1, want=10477152, limit=10477056
attempt to access beyond end of device
md3: rw=1, want=10477160, limit=10477056
attempt to access beyond end of device
md3: rw=1, want=10477168, limit=10477056
attempt to access beyond end of device
md3: rw=1, want=10477176, limit=10477056
attempt to access beyond end of device
md3: rw=1, want=10477184, limit=10477056
attempt to access beyond end of device
md3: rw=1, want=10477192, limit=10477056
可见与3月11日系统迁移的时候报错一致。
二、错误原因分析
这一次主要的报错信息意义分析:
attempt to access beyond end of device
md1: rw=1, want=419424776, limit=419424768
Buffer I/O error on device md1, logical block 52428096
大致意思是:尝试访问超过设备结尾的块,第3行提示访问的逻辑块为52428096。
而md1设备的最大逻辑块是52428119:
[root@gddb2 tablespace]# dumpe2fs /dev/md1
dumpe2fs 1.35 (28-Feb-2004)
Filesystem volume name:
Last mounted on:
Filesystem UUID: 76ee30b6-aac9-484a-8b76-5b76a7c31253
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode filetype needs_recovery sparse_super large_file
Default mount options: (none)
Filesystem state: clean with errors
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 26214400
Block count: 52428119
Reserved block count: 2621405
Free blocks: 38174314
Free inodes: 26214307
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Wed Mar 1 18:34:53 2006
Last mount time: Mon Mar 13 16:48:43 2006
Last write time: Mon Mar 13 16:48:43 2006
Mount count: 8
Maximum mount count: 32
Last checked: Wed Mar 1 18:34:53 2006
Check interval: 15552000 (6 months)
Next check after: Mon Aug 28 18:34:53 2006
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: f96d19fa-fb5c-43e4-a6d7-410470ecfc0d
Journal backup: inode blocks
可见,是在临近文件系统结尾的20多个逻辑块出了问题。而实际上这20多个逻辑块
md1设备上是不存在的;原因是先创建ext3文件系统,而没有给md设备预留superblock空间(md设备需要在物理设备尾部部分空间保存md multipath信息,见附);在创建md设备之后,物理设备的尾部分被md的superblock占用了几k到几M的空间(通常为64K),但文件系统并不知情,仍然按原来(创建md设备前)空间结构填写inode的bitmap;inode指针错位,导致最后几个逻辑块“悬空”,写的时候就会报类似“attempt to access beyond end of device”的错误。
以第一节里面的5G的LUN为例,如果在创建了md设备之后再创建ext3文件系统,则文件系统的逻辑块会比原来(创建ext3文件系统后创建md设备)少若干(几十个):
[root@gddb2 ~]# umount /md3/
[root@gddb2 ~]# dumpe2fs /dev/sdb1>sdb1
[root@gddb2 ~]# mkfs.ext3 /dev/md3
mke2fs 1.35 (28-Feb-2004)
max_blocks 1341063168, rsv_groups = 40926, rsv_gdb = 319
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
655360 inodes, 1309632 blocks
65481 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1342177280
40 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
inode.i_blocks = 20424, i_size = 4243456
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@gddb2 ~]# dumpe2fs >md3
dumpe2fs 1.35 (28-Feb-2004)
Usage: dumpe2fs [-bfhixV] [-ob superblock] [-oB blocksize] device
[root@gddb2 ~]# dumpe2fs /dev/md3>md3
dumpe2fs 1.35 (28-Feb-2004)
[root@gddb2 ~]# diff md3 sdb1more
3c3
<> Filesystem UUID: 48a10ffb-d7ef-41d5-9ef6-a277f0c191f3
12,14c12,14
<> Block count: 1309649
> Reserved block count: 65482
> Free blocks: 1278313
23c23
<> Filesystem created: Mon Mar 13 18:07:59 2006
25c25
<> Last write time: Mon Mar 13 18:07:59 2006
27,28c27,28
<> Maximum mount count: 37
> Last checked: Mon Mar 13 18:07:59 2006
30c30
<> Next check after: Sat Sep 9 18:07:59 2006
37c37
<> Directory Hash Seed: 51a94659-8e0d-468d-955c-b239aef0abff
283c283
< Group 39: (Blocks 1277952-1309631)
对比可见,两种方式下创建的文件系统刚好差了1309649-1309632=17个逻辑块;由于md会保留最后的64K空间作为superblock,md3的blocksize是4096(4K),被占用的逻辑块就为:64K/4K=16个,与上面的结果相似;而在第一部分的测试中,开始报错的逻辑块刚好是1309632 (Buffer I/O error on device md3, logical block 1309632),印证了创建了md虚拟设备后的实际块设备大小(1309632个逻辑块)。

三、解决方法及建议:
在对LUN进行分区、创建md虚拟设备之后创建ext3文件系统。

星期六, 四月 28, 2007

Changing the Database Name use DBNEWID Utility

Ensure that you have a recoverable whole database backup.
Ensure that the target database is mounted but not open, and that it was shut down consistently prior to mounting.
For example:


SQL> select name from v$database;
NAME
---------
DBA
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 26286964 bytes
Fixed Size 453492 bytes
Variable Size 20971520 bytes
Database Buffers 4194304 bytes
Redo Buffers 667648 bytes
Database mounted.

Invoke the utility on the command line, specifying a valid user with the SYSDBA privilege. You must specify both the DBNAME and SETNAME parameters. This example changes the name to DBA2:
C:\>nid target=sys/sys dbname=dba2 setname=yes
DBNEWID: Release 9.2.0.3.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
Connected to database DBA (DBID=976473392)
Control Files in database:
C:\ORACLASS\ORADATA\U01\CTRL01.CTL
The following datafiles are read-only:
C:\ORACLASS\ORADATA\U01\QUERYDATA01.DBF (6)
These files must be writable by this utility.
Change database name of database DBA to DBA2? (Y/[N]) => y
Proceeding with operation
Changing database name from DBA to DBA2
Control File C:\ORACLASS\ORADATA\U01\CTRL01.CTL - modified
Datafile C:\ORACLASS\ORADATA\U01\SYSTEM01.DBF - wrote new name
Datafile C:\ORACLASS\ORADATA\U02\UNDOTBS.DBF - wrote new name
Datafile C:\ORACLASS\ORADATA\U03\USERS01.DBF - wrote new name
Datafile C:\ORACLASS\ORADATA\U03\INDX01.DBF - wrote new name
Datafile C:\ORACLASS\ORADATA\U02\SAMPLE01.DBF - wrote new name
Datafile C:\ORACLASS\ORADATA\U01\QUERYDATA01.DBF - wrote new name
Datafile C:\TBS1.DBF - wrote new name
Datafile C:\ORACLASS\ORADATA\U02\TEMP01.DBF - wrote new name
Control File C:\ORACLASS\ORADATA\U01\CTRL01.CTL - wrote new name
Database name changed to DBA2.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID - Completed succesfully.

Set the DB_NAME initialization parameter in the initialization parameter file to the new database name.Shut down the database. Create a new password file
C:\>sqlplus /nolog
SQL*Plus: Release 9.2.0.3.0 - Production on Thu Feb 5 23:46:37 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba;
Connected.
SQL> alter system set db_name=DBA2 SCOPE=SPFILE;
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
C:\>orapwd file=D:\oracle\ora92\database\PWDDBA.ORA password=sys entries=20
Start up the database
SQL> STARTUP

rename the global database name
SQL> select * from global_name;

GLOBAL_NAME
-----------------------------------
DBA.WORLD

SQL> alter database rename global_name to dba2.world

SQL> select * from global_name;

GLOBAL_NAME
----------------------------------------
DBA2.WORLD

平台数据库群集的一些想法

为了提高公司现有数据库的安全性、高可用性和稳定性,我们从6月初就着手进行了一系列的Oracle数据库群集的安装测试工作,测试中用到的操作系统版本包括 RedHat4,RedHat3,数据库版本包括 Oracle 10g,Oracle 9i,至于Shared Storage(共享存储),公司目前采用的是Storage Area Storage(SAN),利用两台Sun Storage6920做同步复制、两台SW4100光纤交换机和主机2块HBA卡组成了SAN的存储架构。而数据库集群的安装主要考虑如下几个关键因素:Oracle Version、Shared Storage、Oracle Cluster File System。
方案一 :Oracle9i+ocfs2+ RedHat4.0 (2.6.9-34.ELsmp) 3节点,采用BENCHMARK进行压力模拟测试,发现当模拟用户为30时,数据库就由于不明原因而崩溃。按照以往经验推断,这可能是OCFS2和Oracle9i结合的一个bug。
方案二 :Oracle10g+OCFS2+ RedHat4.0 (2.6.9-34.ELsmp) 2节点,数据库都能够平稳的运行,采用BENCHMARK进行压力模拟测试,分别采用了OLTP、DSS和Scabale Hardware类别,并发用户最大采用了250,数据库能够平稳的运行。
方案三 :Oracle9i+GFS+RedHat3.0 3节点,数据库能够进行平稳的运行,采用BENCHMARK进行压力模拟测试,以TPC-C是在线事务处理(OLTP)的基准程序,并发用户最大采用了100,数据库能够平稳的运行。但并发用户超过100,客户端不能够正常连接数据库。
方案四:Oracle9i+RAW+RedHat4.0 2节点,数据库能够进行平稳的运行,采用BENCHMARK进行压力模拟测试,以TPC-C 在线事务处理(OLTP)的基准程序,并发用户最大采用了250,数据库能够平稳的运行。
经过以上测试比较,Oracle10g+OCFS2+ RedHat4.0 和 Oracle9i+RAW+RedHat4.0 数据库可以稳定运行并且都提供了较高的性能,但考虑到平台以及安全架构的问题 Oracle9i+RAW+RedHat4.0的方案较佳。

如何处理Oracle数据库碎片

1 、碎片是如何产生的
--当生成一个数据库时,它会分成称为表空间( Tablespace )的多个逻辑段( Segment ),如系统( System )表空间 , 临时( Temporary )表空间等。一个表空间可以包含多个数据范围( Extent )和一个或多个自由范围块,即自由空间( Free Space )。
表空间、段、范围、自由空间的逻辑关系如下:
当表空间中生成一个段时,将从表空间有效自由空间中为这个段的初始范围分配空间。在这些初始范围充满数据时,段会请求增加另一个范围。这样的扩展过程会一直继续下去,直到达到最大的范围值,或者在表空间中已经没有自由空间用于下一个范围。最理想的状态就是一个段的数据可被存在单一的一个范围中。这样,所有的数据存储时靠近段内其它数据,并且寻找数据可少用一些指针。但是一个段包含多个范围的情况是大量存在的,没有任何措施可以保证这些范围是相邻存储的,如图〈 1 〉。当要满足一个空间要求时,数据库不再合并相邻的自由范围(除非别无选择),而是寻找表空间中最大的自由范围来使用。这样将逐渐形成越来越多的离散的、分隔的、较小的自由空间,即碎片。例如:
2 、碎片对系统的影响
随着时间推移,基于数据库的应用系统的广泛使用,产生的碎片会越来越多,将对数据库有以下两点主要影响:
( 1 )导致系统性能减弱
如上所述,当要满足一个空间要求时,数据库将首先查找当前最大的自由范围,而 " 最大 " 自由范围逐渐变小,要找到一个足够大的自由范围已变得越来越困难,从而导致表空间中的速度障碍,使数据库的空间分配愈发远离理想状态;
( 2 )浪费大量的表空间
尽管有一部分自由范围(如表空间的 pctincrease 为非 0 )将会被 SMON (系统监控)后台进程周期性地合并,但始终有一部分自由范围无法得以自动合并,浪费了大量的表空间。
3 、自由范围的碎片计算
由于自由空间碎片是由几部分组成,如范围数量、最大范围尺寸等,我们可用 FSFI--Free Space Fragmentation Index (自由空间碎片索引)值来直观体现: FSFI=100*SQRT(max(extent)/sum(extents))*1/SQRT(SQRT(count(extents)))
可以看出, FSFI 的最大可能值为 100 (一个理想的单文件表空间)。随着范围的增加, FSFI 值缓慢下降,而随着最大范围尺寸的减少, FSFI 值会迅速下降。
下面的脚本可以用来计算 FSFI 值:

rem FSFI Value Compute
rem fsfi.sql
column FSFI format 999,99
select tablespace_name,sqrt(max(blocks)/sum(blocks))*
(100/sqrt(sqrt(count(blocks)))) FSFI
from dba_free_space
group by tablespace_name order by 1;
spool fsfi.rep;
/
spool off; e_name order by 1;

比如,在某数据库运行脚本 fsfi.sql, 得到以下 FSFI 值:
TABLESPACE_NAME FSFI
---------------------------------
RBS 74.06
SYSTEM 100.00
TEMP 22.82
TOOLS 75.79
USERS 100.00
USER_TOOLS 100.00
YDCX_DATA 47.34
YDCX_IDX 57.19
YDJF_DATA 33.80
YDJF_IDX 75.55
统计出了数据库的 FSFI 值,就可以把它作为一个可比参数。在一个有着足够有效自由空间,且 FSFI值超过 30 的表空间中,很少会遇见有效自由空间的问题。当一个空间将要接近可比参数时,就需要做碎片整理了。
4 、自由范围的碎片整理
( 1 )表空间的 pctincrease 值为非 0
可以将表空间的缺省存储参数 pctincrease 改为非 0 。一般将其设为 1 ,如:
alter tablespace temp
default storage(pctincrease 1);
这样 SMON 便会将自由范围自动合并。也可以手工合并自由范围:
alter tablespace temp coalesce;
5 、段的碎片整理
我们知道,段由范围组成。在有些情况下,有必要对段的碎片进行整理。要查看段的有关信息,可查看数据字典 dba_segments ,范围的信息可查看数据字典 dba_extents 。如果段的碎片过多,将其数据压缩到一个范围的最简单方法便是用正确的存储参数将这个段重建,然后将旧表中的数据插入到新表,同时删除旧表。这个过程可以用 Import/Export (输入 / 输出)工具来完成。
Export ()命令有一个(压缩)标志,这个标志在读表时会引发 Export 确定该表所分配的物理空间量,它会向输出转储文件写入一个新的初始化存储参数 -- 等于全部所分配空间。若这个表关闭, 则使用 Import ()工具重新生成。这样,它的数据会放入一个新的、较大的初始段中。例如:
exp user/password file=exp.dmp compress=Y grants=Y indexes=Y
tables=(table1,table2);
若输出成功,则从库中删除已输出的表,然后从输出转储文件中输入表:
imp user/password file=exp.dmp commit=Y buffer=64000 full=Y
这种方法可用于整个数据库。
以上简单分析了 Oracle 数据库碎片的产生、计算方法及整理,仅供参考。数据库的性能优化是一项技术含量高,同时又需要有足够耐心、认真细致的工作

SUN SE6920性能测试报告

SUN SE6920性能测试报告


为了更好的了解SE6920的性能,由SUN原厂提供VDBENCH存储专业测试软件,对SE6920存储的不同划分RAID5和RAID1及本地盘进行性能测试。
测试数值并不意味存储的绝对性能,存储的性能在不同的处理平台具有不同的效果及差异,在相对高性能的主机上如高配置的小型机上性能会更佳。根据目前用户实际情况和主机环境,连接存储的数据库主机都是HPDL580 PCServer平台,主机配置相同,因此选用其中一台主机作测试用机。
在测试主机上分5个测试实例,分别对存储的RAID5和RAID1的随机访问和连续访问以及本地盘的随机访问进行测试。测试数值又分别用2G、4G、8G的读写大小和8K、16K、32K、64K的数据块的组合测试,尽可能详细的体现存储的综合表现。在数据库的应用环境中数据实际都是随机访问的,对SE6920的随机/连续访问测试只是提供对比,以供参考。


测试信息
测试软件
Vdbench 存储测试软件
测试软件提供
SUN
测试环境
测试机: HP DL580 PCServer使用两块Qlogic 2340HBA卡; IP:10.98.25.7

第一台SUN SE6920 划分RAID5 x 4 可用空间:2.9 T 测试LUN Size:20G 分散读写,系统设备:/dev/sdd

第二台SUN SE6920 划分RAID1 x 4 可用空间:1.7 T 测试LUN Size:20G 分散读写,系统设备:/dev/sdc

DL 580测试机本地硬盘x4;RAID5; 系统设备:/dev/cciss/c0d0p5


以下是对存储及本地盘的测试实例记录信息,每项测试均取平均值,如要每项测试的详细结果和过程信息见每项测试的附件。

测试实例1 DL580使用单路径连接SE6920,使用/dev/sdd,RAID5 测试时间150秒,报告间隔5秒。随机访问。
序号
测试对象
大小
块大小
测试结果(主要参数平均 值)
备注




读写/秒
I/O rate
响应时间毫秒

1
设备
2048M
8K
47M/sec
5975
2.673

2
设备
2048M
16K
53M/sec
3340
4.729

3
设备
2048M
32K
68M/sec
2166
7.379

4
设备
2048M
64K
123M/sec
1975
8.093

5
设备
4096M
8K
36M/sec
4634
3.447

6
设备
4096M
16K
52M/sec
3350
4.770

7
设备
4096M
32K
50M/sec
1596
10.022

8
设备
4096M
64K
87M/sec
1389
11.514

9
设备
8192M
8K
31M/sec
4022
3.973

10
设备
8192M
16K
42M/sec
2725
5.867

11
设备
8192M
32K
54M/sec
1721
9.294

12
设备
8192M
64K
70M/sec
1124
14.227

测试实例2 DL580使用单路径连接SE6920,使用/dev/sdd,RAID5 测试时间150秒,报告间隔5秒。顺序访问。
序号
测试对象
大小
块大小
测试结果(主要参数值)
备注




读写/秒
I/O rate
响应时间毫秒

1
设备
2048M
8K
43M/sec
5467
2.921

2
设备
2048M
16K
54M/sec
3436
4.651

3
设备
2048M
32K
66M/sec
2118
7.547

4
设备
2048M
64K
79M/sec
1256
12.734

5
设备
4096M
8K
43M/sec
5562
2.870

6
设备
4096M
16K
47M/sec
2976
5.369

7
设备
4096M
32K
62M/sec
1991
8.031

8
设备
4096M
64K
78M/sec
1243
12.861

9
设备
8192M
8K
43M/sec
5535
2.885

10
设备
8192M
16K
51M/sec
3275
4.879

11
设备
8192M
32K
55M/sec
1746
9.156

12
设备
8192M
64K
73M/sec
1168
13.687

测试实例3 DL580使用单路径连接,使用/dev/sdc,RAID1 测试时间150秒,报告间隔5秒。随机访问。
序号
测试对象
大小
块大小
测试结果(主要参数值)
备注




读写/秒
I/O rate
响应时间毫秒

1
设备
2048M
8K
46M/sec
5875
2.718

2
设备
2048M
16K
63M/sec
4052
3.943

3
设备
2048M
32K
75M/sec
2404
6.647

4
设备
2048M
64K
81M/sec
1300
12.278

5
设备
4096M
8K
38M/sec
4924
3.244

6
设备
4096M
16K
47M/sec
3029
5.276

7
设备
4096M
32K
54M/sec
1730
9.244

8
设备
4096M
64K
61M/sec
986.
16.213

9
设备
8192M
8K
33M/sec
4276
3.736

10
设备
8192M
16K
41M/sec
2601
6.146

11
设备
8192M
32K
46M/sec
1484
10.774

12
设备
8192M
64K
52M/sec
840
19.080

测试实例4 DL580使用单路径连接,使用/dev/sdc,RAID1 测试时间150秒,报告间隔5秒。顺序访问。
序号
测试对象
大小
块大小
测试结果(主要参数值)
备注




读写/秒
I/O rate
响应时间毫秒

1
设备
2048M
8K
37M/sec
4815
3.317

2
设备
2048M
16K
47M/sec
2996
5.335

3
设备
2048M
32K
59M/sec
1893
8.443

4
设备
2048M
64K
61M/sec
971
16.471

5
设备
4096M
8K
36M/sec
4603
3.468

6
设备
4096M
16K
44M/sec
2818
5.672

7
设备
4096M
32K
50M/sec
1601
9.987

8
设备
4096M
64K
59M/sec
948
16.859

9
设备
8192M
8K
32M/sec
4103
3.893

10
设备
8192M
16K
43M/sec
2725
5.863

11
设备
8192M
32K
49M/sec
1565
10.214

12
设备
8192M
64K
55M/sec
886
18.048

测试实例5 DL580测试本地磁盘,使用/dev/cciss/c0d0p5,RAID5 测试时间150秒,报告间隔5秒。随机访问。
序号
测试对象
大小
块大小
测试结果(主要参数值)
备注




读写/秒
I/O rate
响应时间毫秒

1
设备
2048M
8K
12M/sec
1587
10.076

2
设备
2048M
16K
13M/sec
807
19.783

3
设备
2048M
32K
24M/sec
780
20.500

4
设备
2048M
64K
33M/sec
531
30.100

5
设备
4096M
8K
9M/sec
1092
14.639

6
设备
4096M
16K
9M/sec
590
27.103

7
设备
4096M
32K
14M/sec
449
35.627

8
设备
4096M
64K
23M/sec
367
43.641

9
设备
8192M
8K
7M/sec
958
16.684

10
设备
8192M
16K
7M/sec
450
35.495

11
设备
8192M
32K
11M/sec
351
45.585

12
设备
8192M
64K
19M/sec
296
54.001


附件:见“测试日志”目录;
其中:测试实例1 à a01-a12.html
测试实例2 à b01-b12.html
测试实例3 à c01-c12.html
测试实例4 à d01-d12.html
测试实例5 à e01-e12.html



测试结果表现值图表:

图表一 SE6920RAID5和RAID1随机访问/连续访问表现图 读写MB/秒(参考)
图表一
由图表一可以看出在较大的读写和数据块时,RAID5和RAID1的连续读写的性能会有小幅度的提升。注:数值越高性能越优。

图表二 SE6920RAID5和RAID1随机访问/连续访问表现图 响应时间/毫秒(参考)
图表二

由图表二可以看出RAID5和RAID1都在读写容量和数据块小时随机访问稍小,而增大时顺序访问比随机访问的响应时间要略小,特别在8G时。注:数值越低性能越优。
以上两表作为顺序访问和随机访问的对比参考,实际应用环境以随机访问为主。

SE6920RAID5、RAID1和本地盘(RAID5)随机访问表现图 读写MB/秒
图表三 柱形图:
图表三 注:数值越高性能越优

图表四 折线图:
图表四 注:数值越高性能越优

总结:
由图表三和四看出SE6920的RAID5和RAID1的读写性能都高于本地盘(RAID5)。SE6920的RAID5和RAID1比较接近,RAID5在8GB的时候和所有64K都比RAID1快,特别是在2G+64K读写时远远超出RAID1和本地盘。SE6920RAID5和RAID1在此测试平台主机上读写性能综合差异接近,但RAID1牺牲较多的阵列使用容量。
SE6920RAID5、RAID1和本地盘(RAID5)随机访问表现图 响应时间/毫秒
图表五 柱形图:
图表五 注:数值越低性能越优

图表六 折线图:
图表六 注:数值越低性能越优

总结:
存储性能并不意味着只是读写速度有多快,性能体现在一个综合体系中。存储性能一个很重要的指标是响应时间,这决定在多主机多用户并发访问存储时的反应速度,响应时间越短就能保持在一定的读写速度的同时允许更多用户的并发访问。在图表五和六可以看出SE6920无论是RAID5和RAID1的响应时间都远远低于本地盘。
第二项测试
在系统上用操作系统常规命令测试读写性能,用DD及CP命令分别对SE6920存储和本地盘作读写测试。
2.1基于文件系统的测试
测试信息
测试软件
系统的dd、cp命令
测试软件提供
SUN
测试环境
测试机: HP DL580 PCServer使用两块Qlogic 2340HBA卡; IP:10.98.26.56

第一台SUN SE6920 划分RAID5 x 4 可用空间:2.9 T 测试LUN Size:200G 分散读写,系统设备:/dev/sdd 测试文件大小:10G ;读写次数:3次

第二台SUN SE6920 划分RAID1 x 4 可用空间:1.7 T 测试LUN Size:200G 分散读写,系统设备:/dev/sdc 测试文件大小:10G ;读写次数:3次

DL 580测试机本地硬盘x4;RAID5; 系统设备:/dev/cciss/c0d0p5 测试文件大小:10G ;读写次数:3次

以下是对存储及本地盘的测试实例记录信息,每项测试均取平均值,如要每项测试的详细结果和过程信息见每项测试的附件。

测试实例6 DL580使用系统命令DD,对SE6920 RAID5 、RAID1和本地盘(RAID5) dd 块大小:102400k
序号
测试对象
大小
读/写
测试结果(主要参数值)




第一次
第二次
第三次
平均数
1
RAID5
10G

76M/s
85M/s
83M/s
81M/s


3G/5G/5G

26M/s
29M/s
31M/s
29M/s
2
RIAD1
10G

46M/s
39M/s
41M/s
42M/s


3G/5G/5G

25M/s
21M/s
25M/s
24M/s
3
本地盘(RAID5)
10G

43M/s
28M/s
42M/s
38M/s


3G/5G/5G

106M/s
75M/s
104M/s
95M/s

测试实例7 DL580使用系统命令CP,对SE6920 RAID5 、RAID1和本地盘(RAID5)
序号
测试对象
文件大小
测试结果(主要参数值)



第一次
第二次
平均数
1
RAID5
5G
16M/s
17M/s
16.5M/s
2
RIAD1
5G
13M/s
12M/s
12.5M/s
3
本地盘(RAID5)
5G
28M/s
28M/s
28M/s

测试结果表现值图表:

图表七 系统命令DD对SE6920 RAID5 、RAID1和本地盘(RAID5)读写M/s
图表七


图表八 系统命令CP对SE6920 RAID5 、RAID1和本地盘(RAID5)读写M/s
图表八




2.2 基于裸设备的测试
测试信息
测试软件
系统的dd命令
测试软件提供
/
测试环境
测试机: HP DL580 PCServer使用两块Qlogic 2340HBA卡; IP:10.98.26.56

一台SUN SE6920 划分RAID5 x 2 可用空间:2.9 T 系统设备:通过系统raw命令映射存储和本地设备为/dev/raw/raw1 测试大小:1G/2G/4G ;并发DD

DL 580测试机本地硬盘x4;RAID5; 系统设备:通过系统raw命令映射存储和本地设备为/dev/raw/raw2 测试大小:1G/2G/4G


以下是对存储及本地盘的测试实例记录信息,每项测试均取平均值。

测试实例8 DL580使用系统命令DD,对SE6920 RAID5 、RAID1和本地盘(RAID5) dd 块大小:102400k
序号
测试对象
大小
读/写
测试结果(主要参数值)




第一次
第二次
平均数
1
SE6920 RAID5
单个DD

64M/s
68M/s
66M/s


并发2个DD

54+54M/s
/
54M/s x2


单个DD

60M/s
60M/s
60M/s


并发2个DD

46+46M/s
/
46M/s x2


并发3个DD

35+35+35M/s
/
35M/s x3
2
本地盘(RAID5)
单个DD

71M/s
87M/s
79M/s


并发2个DD

46+44M/s
/
45M/s x2


单个DD

28M/s
25M/s
26.5M/s


并发2个DD

14+14M/s
/
14M/s x2


并发3个DD

12+12+10M/s
/
11M/s x3




测试结果表现值图表:

图表九 系统命令DD对SE6920 RAID5 和本地盘(RAID5)读写M/s


图表九

在对裸设备读写时单个DD进程读SE6920与本地盘比较接近,但在多个DD进程并发读时SE6920有所增长,且增长比例明显快于本地盘的并发读,本地盘并发与单线程增长不明显。用单个DD进程做写操作时,在SE6920阵列上DD写比本地盘要快出约三倍,而且多个DD进程并发写时,SE6920阵列远远高于本地盘的并发写速度。SE6920在越多并发写时性能会有所提升,但本地盘无论单个DD和多个DD并发性写能比较平均。
本地盘DD性能在单个和多并发读写时总体性能变化比较平均,而在SE6920阵列上多个DD进程并发时总体读写性能会比单个DD读写进程有成倍增长,且越多并发时对单个DD的读写性能影响较小,而本地盘越多并发时会造成单个DD进程的读写有较大的性能下降。
另外,在裸设备下使用DD进行读写操作的结果要优于文件系统下使用DD,由于Linux文件系统特性,块大小受限于文件系统的块大小最大为4K,SE6920存储segment size一般设为64K,在主机文件系统缓存对存储读写时会受其影响。而裸设备不受文件系统得限制,测试读写时可指定块大小,能较好的发挥存储的读写性能。
由于Linux文件系统必须为buffer文件系统,无法作为直接IO进行读写,因此通过文件系统进行测试并不能准确判断存储系统性能。而裸设备的读写是直接IO没有文件系统的buffer,能直接反映存储系统的性能。因此就存储本身而言,在足够压力下(多用户多线程)SE6920的写性能是本机阵列卡的3倍以上,读性能也优于本机阵列卡。

redhat linux下Rman脚本备份参考

#!/bin/sh
echo "-----------------------------satrt-----------------------------";date
#set environment variable
ORACLE_BASE=/u01/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/ora920;export ORACLE_HOME
ORACLE_SID=gd; export ORACLE_SID
ORACLE_NLS=$ORACLE_HOME/ocommon/nls/admin/data; export ORACLE_NLS
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK; export NLS_LANG
PATH=$ORACLE_HOME/bin:$PATH;export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib; export LD_LIBRARY_PATH
NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'; export NLS_DATE_FORMAT

#backup start
$ORACLE_HOME/bin/rman target /
connect catalog rman/rman@rman
#delete noprompt obsolete;

sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
backup database include current controlfile;
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
backup archivelog all delete input;

#list backup;
delete noprompt obsolete;
exit;
EOF


echo "------------------------------end------------------------------";date

sqlldr使用参考

++++++sqlldr语法++++++++
sqlldr userid=inside/insidepwd@10.98.18.250 direct=true control=F:\CAINFO\cainfo.ctl log=F:\CAINFO\cainfo.log
++++++控制文件cainfo.ctl+++++++
load data
infile 'F:\CAINFO\import.csv'
replace
into table t_mailbox_corp
fields terminated by ','
trailing nullcols
(MAILBOX_NAME,
REG_CODE
)

通过sql语句导出excel格式的文件

set linesize 200
set term off verify off feedback off pagesize 999
set markup html on entmap ON spool on preformat off
spool tables.xls
@get_tables.sql
spool off
exit

redhat linux下自动启动Oracle脚本

# oracle database startup script
# chkconfig: 2345 10 90
# description: starts and stops the Oracle database
# Since this script runs from root
# the ORA_HOME and ORA_OWNER must be set
# "su -" to the oracle owner account to be sure the
# environment is set

ORA_HOME=/u01/oracle/ora920
ORA_OWNER=oracle

case "$1" in
'start')
ulimit -u 16384
/bin/su - $ORA_OWNER -c "lsnrctl start LISTENER"
/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
#/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/agentctl start"
#/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/oemctl start oms"
# create /var/lock/subsys/oracle to make sure the oracle stop command runs
touch /var/lock/subsys/oracle
;;
'stop')
/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/oemctl stop oms sysman/oracle"
#/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/agentctl stop"
/bin/su - $ORA_OWNER -c "lsnrctl stop LISTENER"
/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac

Ads3中sga如何突破1.7G/4G的限制

一 内存在4G以内的方法(比ads2.1操作简单一些)
#cd /home/oracle/9.2.0.4/rdbms/lib
#genksms -s 0x15000000 > ksms.s 必须root,需要有oracle环境变量
$make -f ins_rdbms.mk ksms.o 必须oracle用户
$make -f ins_rdbms.mk ioracle

通过这种方法,ads3上oracle9.2.0.4的sga可以达到2.6G左右,在4G的机器上也算是比较合理的配置,oracle10.1.0.1的sga照此方法也可以达到2.6G左右吧;genksms中的0x15000000可以提高到0x18000000,不过对sga的提高没有多大用处。

二 内存在8G以内的方法
9.2.0.4在安装时shmmax设置成2147483648即可,安装后用方法一可以将sga提高到2.6G左右,但无法突破4G的限制,只有使用very large memory参数啦,创建fpile,然后删除spfile,showdown数据库。
initsid.ora中添加
*.use_indirect_data_buffers=true
*.db_block_buffers=500000

然后重启动数据库,sga将达到4.5g左右,加上pga的1g,oracle将要使用的内存大约在6g以内,基本上算比较合理的配置啦;但oracle10.1.0.1使用该方法无效,如果谁找到了如何配置的请告诉我。
在8g内存的系统中,当db_block_buffers>520000时,就会报ORA-27102: out of memory
及Linux Error: 28: No space left on devic错误,如果你有解决办法,也请你告诉我;目前找不到将ads3上oracle10.1.0的sga突破4g的限制。

redhat下安装veritas master server实录

Last login: Tue Feb 28 14:25:01 2006 from 10.98.19.34
[root@gddb1 ~]# Last login: Tue Feb 28 15:36:12 2006 from 10.98.19.210
[root@mstsvr ~]# su - oracle
[oracle@mstsvr ~]$ vncserver

New 'mstsvr:3 (oracle)' desktop is mstsvr:3

Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/mstsvr:3.log
[oracle@mstsvr ~]$ cd /temp

[root@mstsvr tmp]# ./orainstRoot.sh
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /u01/oracle/oraInventory to dba.
[root@mstsvr tmp]# cd /u01/oracle/ora920/
[root@mstsvr ora920]# ./root.sh
Running Oracle9 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/ora920

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

\nCreating /etc/oratab file...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@mstsvr ora920]# vncserver -kill :1

Can't find file /root/.vnc/mstsvr:1.pid
You'll have to kill the Xvnc process manually

[root@mstsvr ora920]# vncserver -kill :12

Can't find file /root/.vnc/mstsvr:2.pid
You'll have to kill the Xvnc process manually

[root@mstsvr ora920]# cd /orasetup/
[root@mstsvr orasetup]# cd Disk1/
[root@mstsvr Disk1]# cd /u01/orqacle/ora920/
[root@mstsvr ora920]# ./root.sh
Running Oracle9 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/ora920

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:

Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@mstsvr ora920]# ./root.sh
Running Oracle9 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/ora920

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@mstsvr ora920]# cd /data
[root@mstsvr data]# ll
_[00mtotal 16
drwx------ 2 root root 16384 Feb 22 22:06 _[01;34mlost+found_[00m
[root@mstsvr data]# ll
_[00mtotal 16
drwx------ 2 root root 16384 Feb 22 22:06 _[01;34mlost+found_[00m
[m[root@mstsvr data]# mkdir rman
[root@mstsvr data]# cdcd /u01/oracle/admin/prman/pfile/
[root@mstsvr pfile]# cd /home/oracle/9.2.0.4/rdbms/lib
-bash: cd: /home/oracle/9.2.0.4/rdbms/lib: No such file or directory
[root@mstsvr pfile]# cd /home/oracle/9.2.0.4/rdbms/lib___________
[root@mstsvr pfile]# cd /home/oracle/9.2.0.4_/rdbms/lib____________/rdbms/lib____________/rdbms/lib____________/rdbms/lib____________/rdbms/lib____________/rdbms/lib____________/rdbms/lib___________o/rdbms/lib__________r/rdbms/lib__________a/rdbms/lib__________9/rdbms/lib__________`/rdbms/lib___________/rdbms/lib___________*/rdbms/lib__________
-bash: cd: /home/oracle/ora9*/rdbms/lib: No such file or directory
[root@mstsvr pfile]# cd /home/oracle/ora9*/rdbms/libu01/oracle/ora920/rdbms/lib
[root@mstsvr lib]# su - oracle
[oracle@mstsvr ~]$ su
Password:
[root@mstsvr oracle]# cd /u01/oracle/ora920/drdbms/lib
[root@mstsvr lib]# ehcho $ORACLE_BASE
/u01/oracle
[root@mstsvr lib]# echo $ORACLE_BASEHOME
/u01/oracle/ora920
[root@mstsvr lib]# echo $ORACLE_HOMESID
rman
[root@mstsvr lib]# genksms -s 0x15000000 > ksms.s
[root@mstsvr lib]# exit
exit
[oracle@mstsvr ~]$ cd /u01/oracle/ora920/rdbms/lib
[oracle@mstsvr lib]$ make -f ins_rdbms.mk ksms.o
[oracle@mstsvr lib]$ make -f ins_rdbms.mk ioracle
- Linking Oracle
rm -f /u01/oracle/ora920/rdbms/lib/oracle
gcc -o /u01/oracle/ora920/rdbms/lib/oracle -L/u01/oracle/ora920/rdbms/lib/ -L/u01/oracle/ora920/lib/ -L/u01/oracle/ora920/lib/stubs/ -Wl,-E `test -f /u01/oracle/ora920/rdbms/lib/skgaioi.o && echo /u01/oracle/ora920/rdbms/lib/skgaioi.o` /u01/oracle/ora920/rdbms/lib/opimai.o /u01/oracle/ora920/rdbms/lib/ssoraed.o /u01/oracle/ora920/rdbms/lib/ttcsoi.o /u01/oracle/ora920/lib/nautab.o /u01/oracle/ora920/lib/naeet.o /u01/oracle/ora920/lib/naect.o /u01/oracle/ora920/lib/naedhs.o /u01/oracle/ora920/rdbms/lib/config.o -lserver9 -lodm9 -lskgxp9 -lskgxn9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 /u01/oracle/ora920/rdbms/lib/defopt.o -lknlopt `if /usr/bin/ar tv /u01/oracle/ora920/rdbms/lib/libknlopt.a grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap9" ; fi` -lslax9 -lpls9 -lplp9 -lserver9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lknlopt -lslax9 -lpls9 -lplp9 -ljox9 -lserver9 -locijdbcst9 -lwwg9 `cat /u01/oracle/ora920/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /u01/oracle/ora920/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lmm -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /u01/oracle/ora920/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /u01/oracle/ora920/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -ltrace9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `if /usr/bin/ar tv /u01/oracle/ora920/rdbms/lib/libknlopt.a grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo9"; fi` -lctxc9 -lctx9 -lzx9 -lgx9 -lctx9 -lzx9 -lgx9 -lordimt9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lsnls9 -lunls9 -lxsd9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /u01/oracle/ora920/lib/sysliblist` -Wl,-rpath,/u01/oracle/ora920/lib:/lib/i686:/lib:/usr/lib -lm `cat /u01/oracle/ora920/lib/sysliblist` -ldl -lm `test -f /u01/oracle/ora920/rdbms/lib/skgaioi.o && echo -laio`
mv -f /u01/oracle/ora920/bin/oracle /u01/oracle/ora920/bin/oracleO
mv /u01/oracle/ora920/rdbms/lib/oracle /u01/oracle/ora920/bin/oracle
chmod 6751 /u01/oracle/ora920/bin/oracle
[oracle@mstsvr lib]$ exit
logout
[root@mstsvr lib]# cd /data
[root@mstsvr data]# ll
_[00mtotal 24
drwx------ 2 root root 16384 Feb 22 22:06 _[01;34mlost+found_[00m
drwxr-xr-x 2 root root 4096 Feb 28 16:01 _[01;34mrman_[00m
[root@mstsvr data]# chown -R oracle.dba rman
[root@mstsvr data]# cd rman
[root@mstsvr rman]# ll
_[00mtotal 0
[root@mstsvr rman]# mkdir archive
[root@mstsvr rman]# chown -R oracle.dba rman
[root@mstsvr rman]# ll
_[00mtotal 8
drwxr-xr-x 2 oracle dba 4096 Feb 28 16:06 _[01;34marchive_[00m
[root@mstsvr rman]# cd ..
[root@mstsvr data]# ll
_[00mtotal 24
drwx------ 2 root root 16384 Feb 22 22:06 _[01;34mlost+found_[00m
drwxr-xr-x 3 oracle dba 4096 Feb 28 16:06 _[01;34mrman_[00m
[root@mstsvr pfile]# su - oracle

[oracle@mstsvr ~]$ orapwd file=/u01/oracle/ora920/dbs/orapwrman entries=10 password=sys$^^^mstsvr
[oracle@mstsvr ~]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.7.0 - Production on Tue Feb 28 16:09:29 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn / as sysdba;
Connected to an idle instance.
SQL> startup pfile='/u01/oracle/admin/rman/pfile/init.ora' nomount;
SQL> CREATE DATABASE rman
2 LOGFILE
3 GROUP 1 ('/data/rman/log01_01.log') SIZE 50M,
4 GROUP 2 ('/data/rman/log02_01.log') SIZE 50M,
5 GROUP 3 ('/data/rman/log03_01.log') SIZE 50M,
6 GROUP 4 ('/data/rman/log04_01.log') SIZE 50M,
7 GROUP 5 ('/data/rman/log05_01.log') SIZE 50M
8 DATAFILE '/data/rman/system01.dbf' SIZE 300M
9 AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
10 extent management local
11 DEFAULT TEMPORARY TABLESPACE temp
12 TEMPFILE '/data/rman/temp01.dbf' SIZE 1000M
13 AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
14 UNDO TABLESPACE UNDOTBS1
15 datafile '/data/rman/undotbs01.dbf' SIZE 2000M
16 AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
17 CHARACTER SET ZHS16GBK
18 NATIONAL CHARACTER SET AL16UTF16
19 ;

Database created.

SQL> @$ORACLE_HOME/rdbms/admin/catalog.sql
SQL> @$ORACLE_HOME/rdbms/admin/catclust.sql
SQL> alter user system identified by system;
User altered.
SQL> conn system/system
Connected.
SQL> @?/sqlplus/admin/pupbld.sql
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production

[oracle@mstsvr ~]$ sqlplus /nolog
SQL> conn / as sysdba;
Connected.
SQL> create spfile from pfile='/u01/oracle/ora920/admin/rman/pfile/init.ora';
File created.
SQL> shutdown immediate;
SQL> startup
SQL> alter system set log_archive_format='arch_%t_%s.arc' scope=spfile;
System altered.
SQL> alter system set log_archive_dest_1='location=/data/rman/archive';
System altered.
SQL> alter system set log_archive_start=ture scope=spfile;
System altered.
SQL> shutdow immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /data/rman/archive
Oldest online log sequence 2
Next log sequence to archive 6
Current log sequence 6
SQL> alter system archive log current;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> host
[oracle@mstsvr ~]$ vncserver

New 'mstsvr:1 (oracle)' desktop is mstsvr:1

Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/mstsvr:1.log

[oracle@mstsvr ~]$ lsnrctl

LSNRCTL for Linux: Version 9.2.0.7.0 - Production on 28-FEB-2006 16:31:01

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status
LSNRCTL> stop
LSNRCTL> start
LSNRCTL> exit
[[oracle@mstsvr ~]$ lsnrctl

LSNRCTL for Linux: Version 9.2.0.7.0 - Production on 28-FEB-2006 16:34:21

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mstsvr)(PORT=1521)))
The command completed successfully
LSNRCTL> start
LSNRCTL> status
LSNRCTL> exit
[oracle@mstsvr ~]$ exit
exit
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
[oracle@mstsvr ~]$ exit

[root@mstsvr pfile]# ./getcd
[root@mstsvr ~]# ./getwwn.sh

3600015d00004d30000000000000007a1 /dev/sda
3600015d00004d30000000000000007a1 /dev/sdd
3600015d000055c0000000000000009ca /dev/sdb
3600015d000055c0000000000000009ca /dev/sde
3600c0ff0000000000923b917215b6105 /dev/sdc
3600c0ff0000000000923b917215b6105 /dev/sdf

[root@mstsvr /]# mkdir md1
[root@mstsvr /]# mkdir md1
[root@mstsvr /]# mkdir md2
[root@mstsvr ~]# ./getwwn.sh

3600015d00004d30000000000000007a1 /dev/sda
3600015d00004d30000000000000007a1 /dev/sdd
3600015d000055c0000000000000009ca /dev/sdb
3600015d000055c0000000000000009ca /dev/sde
3600c0ff0000000000923b917215b6105 /dev/sdc
3600c0ff0000000000923b917215b6105 /dev/sdf
[root@mstsvr ~]# mdadm -C /dev/md1 -l multipath -n2 /dev/sd1 /dev/sda1 /dev/sdd1
mdadm: /dev/sda1 appears to contain an ext2fs file system
size=209712384K mtime=Thu Jan 1 07:00:00 1970
mdadm: /dev/sda1 appears to be part of a raid array:
level=-4 devices=2 ctime=Tue Feb 28 09:26:08 2006
mdadm: /dev/sdd1 appears to contain an ext2fs file system
size=209712384K mtime=Thu Jan 1 07:00:00 1970
mdadm: /dev/sdd1 appears to be part of a raid array:
level=-4 devices=2 ctime=Tue Feb 28 09:26:08 2006
Continue creating array? y
mdadm: array /dev/md1 started.
[root@mstsvr ~]# mount /dev/md1 /md1

[root@mstsvr md1]# mdamd -D /dev/md1
-bash: mdamd: command not found
[root@mstsvr md1]# mdamd -D /dev/md1
/dev/md1:
Version : 00.90.01
Creation Time : Tue Feb 28 16:46:15 2006
Raid Level : multipath
Array Size : 209712384 (199.100 GiB 214.75 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Tue Feb 28 16:46:15 2006
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0


Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 49 1 active sync /dev/sdd1
UUID : 0160bc6d:b89cad5e:f5b27cb6:a6963aa2
Events : 0.1
[root@mstsvr md1]# su - oracle
[oracle@mstsvr ~]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.7.0 - Production on Tue Feb 28 16:47:15 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn / as sysdba;
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
[oracle@mstsvr ~]$ vi /etc/fstab
[root@mstsvr data]# cp -r rman/ /md1
[root@mstsvr data]# cd /md1
[root@mstsvr md1]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 20641788 10515288 9077860 54% /
/dev/cciss/c0d0p5 94545132 2726052 87016452 4% /data
none 2075220 0 2075220 0% /dev/shm
/dev/cciss/c0d0p2 90709056 2642888 83458328 4% /u01
/dev/md1 206421944 2726048 193210280 2% /md1
[root@mstsvr md1]# umount /data
[root@mstsvr md1]# cd /
[root@mstsvr /]# mount /dev/md1 /data
[root@mstsvr /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 20641788 10515284 9077864 54% /
none 2075220 0 2075220 0% /dev/shm
/dev/cciss/c0d0p2 90709056 2642888 83458328 4% /u01
/dev/md1 206421944 2726048 193210280 2% /md1
/dev/md1 206421944 2726048 193210280 2% /data
[root@mstsvr /]# umonumount /md1
[root@mstsvr /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 20641788 10515284 9077864 54% /
none 2075220 0 2075220 0% /dev/shm
/dev/cciss/c0d0p2 90709056 2642888 83458328 4% /u01
/dev/md1 206421944 2726048 193210280 2% /data
[root@mstsvr /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p1 20G 11G 8.7G 54% /
none 2.0G 0 2.0G 0% /dev/shm
/dev/cciss/c0d0p2 87G 2.6G 80G 4% /u01
/dev/md1 197G 2.6G 185G 2% /data
[root@mstsvr /]# cd /data
[root@mstsvr data]# chown -R oracle.dba rman/
[root@mstsvr data]# cd rman/
[root@mstsvr rman]# cd archive/

[root@mstsvr archive]# cd ..
[root@mstsvr ~]# su - oracle
[oracle@mstsvr ~]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.7.0 - Production on Tue Feb 28 16:55:51 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba;
Connected to an idle instance.
SQL> startup
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production

[oracle@mstsvr ~]$ lsnrctl

LSNRCTL for Linux: Version 9.2.0.7.0 - Production on 28-FEB-2006 16:56:25

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status
LSNRCTL> start
LSNRCTL> exit
[oracle@mstsvr ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.7.0 - Production on Tue Feb 28 16:56:42 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn / as sysdba;
Connected.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /data/rman/archive
Oldest online log sequence 7
Next log sequence to archive 11
Current log sequence 11
SQL> alter system switch logfile;
System altered.
SQL> alter system archive log current;
System altered.
SQL> archive log list;
[root@mstsvr bdump]# ./getwwn.sh _____________ll_su - oracle
[oracle@mstsvr ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.7.0 - Production on Tue Feb 28 17:06:15 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba;
Connected.
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.

SQL> /
System altered.

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /data/rman/archive
Oldest online log sequence 12
Next log sequence to archive 16
Current log sequence 16
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
[oracle@mstsvr ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p1 20G 11G 8.7G 54% /
none 2.0G 0 2.0G 0% /dev/shm
/dev/cciss/c0d0p2 87G 2.6G 80G 4% /u01
/dev/md1 197G 2.6G 185G 2% /data
[oracle@mstsvr ~]$ exit
logout
[root@mstsvr bdump]# cd /
[root@mstsvr /]# cd veritas-soft/

[root@mstsvr veritas-soft]# mount -o loop NB51_Linux_05_11.iso /veritas
[root@mstsvr veritas-soft]# cd /veritas
[root@mstsvr veritas]# ll
_[00mtotal 20
drwxr-xr-x 2 root daemon 2048 May 12 2004 _[01;34mDoc_[00m
-r-x------ 1 root daemon 13655 May 12 2004 _[01;32minstall_[00m
dr-x------ 4 root daemon 2048 May 12 2004 _[01;34mlinux_[00m
drwxr-xr-x 4 root daemon 2048 May 12 2004 _[01;34mNBClients_[00m
[root@mstsvr veritas]# ./install

VERITAS Installation Script
Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved.

Installation Options

1 NetBackup
2 NetBackup Client Software

q To quit from this script
Choose an option [default: q]: 1

The NetBackup and Media Manager software is built for use on LINUX hardware.

NetBackup is currently at release level 5.1.
This package will install release level 5.1.

No server update is needed.
Do you want to install NetBackup and Media Manager? [y,n] (y) y
NetBackup and Media Manager will be updated to release level 5.1.

The Linux clients will be loaded.
Do you want to load any other NetBackup clients onto the server? [y,n] (y) y

Choose the Platform Client Options you wish to install.

Linux must be installed

Platform Client Options
-----------------------
1. ALPHA
2. HP9000
3. HP-UX-IA64
4. INTEL
5. Linux
6. Linux-IA64
7. MACINTOSH
8. RS6000
9. SCO
10. SGI
11. Solaris
12. All UNIX client platforms
q. quit selecting

Linux
Enter Choice(s) [1 - 12] 5
Linux Linux
Enter Choice(s) [1 - 12] q

You have chosen to install:
Linux
Is this the list you wish to use? [y,n] (y) y

Reading client binaries for /usr/openv/netbackup/client/Linux
Linux/
.............................
usr/openv/volmgr/bin/tpreq
usr/openv/volmgr/bin/tpunmount
usr/openv/volmgr/bin/tpclean
Installing NB-Java.
/bin/tar: Read 8192 bytes from -
+ /bin/cp ./nbj.conf /usr/openv/java
+ /bin/cp ./fsanalyze /usr/openv/netbackup/bin/fsanalyze

NetBackup Enterprise Server is the active NetBackup.
Do you want to continue the installation
with the current active NetBackup license key? [y,n] (y) y

All additional keys should be added at this time.
Do you want to add additional license keys now? [y,n] (y) DRXL-4XZW-P6NC-NCXN-PNPR-C6PR-6P4O-4P6R-3P

Do you want to add additional license keys now? [y,n] (y) N
License Key Utility
-------------------

A) Add a License Key
D) Delete a License Key
F) List Active License Keys
L) List Registered License Keys
H) Help
q) Quit License Key Utility

Enter a letter: q

Installing NetBackup Enterprise Server version: 5.1


If this machine will be using a different network interface than the
default (mstsvr), the name of the preferred interface should be used
as the configured server name. If this machine will be part of a
cluster, the virtual name should be used as the configured server name.

The domainname of your server appears to be "(none)".
You may choose to use this domainname in your configured NetBackup server
name, or simply use "mstsvr" as the configured NetBackup server name.

Would you like to use "mstsvr.(none)" as the configured
name of the NetBackup server? [y,n] (y) n

Enter the name of the NetBackup server: mstsvr

Is mstsvr the master server? [y,n] (y) y
Do you have any media servers? [y,n] (n) n

Linking /usr/lib/X11/app-defaults/XNB --> /usr/openv/netbackup/bin/XNB


Checking /etc/services for the needed NetBackup and Media Manager services.

Copying original /etc/services file to /etc/services.NBU_022806.17:28:51
Editing /etc/services to update NetBackup and Media Manager services.

/etc/services will be updated to add the following entries for NetBackup/Media Manager.

bpjobd 13723/tcp bpjobd
nbdbd 13784/tcp nbdbd
visd 9284/tcp visd
vmd 13701/tcp vmd
acsd 13702/tcp acsd
tl8cd 13705/tcp tl8cd
tldcd 13711/tcp tldcd
ts8d 13709/tcp ts8d
odld 13706/tcp odld
tl4d 13713/tcp tl4d
tsdd 13714/tcp tsdd
tshd 13715/tcp tshd
tlmd 13716/tcp tlmd
tlhcd 13717/tcp tlhcd
lmfcd 13718/tcp lmfcd
rsmd 13719/tcp rsmd

To change these entries modify the file /tmp/services.ov_edited.26921
and enter when ready to continue:

/etc/services has been updated to contain NetBackup and Media Manager services.

WARNING: ypwhich: can't get local yp domain: Local domain name not set

WARNING: ypcat: can't get local yp domain: Local domain name not set

Sending SIGHUP to xinetd process.

Reloading configuration: _[60G[ _[0;32mOK_[0;39m ]

To make NetBackup start up automatically when
the system is restarted, the netbackup script found in
/usr/openv/netbackup/bin/goodies has been placed in /etc/rc.d/init.d,
with links to it placed in the /etc/rc.d/rc2.d directory.


To make NetBackup start up automatically when
the system is restarted, the netbackup script found in
/usr/openv/netbackup/bin/goodies has been placed in /etc/rc.d/init.d,
with links to it placed in the /etc/rc.d/rc3.d directory.


To make NetBackup start up automatically when
the system is restarted, the netbackup script found in
/usr/openv/netbackup/bin/goodies has been placed in /etc/rc.d/init.d,
with links to it placed in the /etc/rc.d/rc5.d directory.


To make NetBackup shut down automatically when
the system is restarted, the netbackup script found in
/usr/openv/netbackup/bin/goodies has been placed in /etc/rc.d/init.d,
with links to it placed in the /etc/rc.d/rc0.d directory.


To make NetBackup shut down automatically when
the system is restarted, the netbackup script found in
/usr/openv/netbackup/bin/goodies has been placed in /etc/rc.d/init.d,
with links to it placed in the /etc/rc.d/rc6.d directory.



In order for device discovery and auto-configuration to work properly in a
NetBackup Enterprise environment, particularly where peripherals are
connected to multiple servers, one host must serve as the repository for
global device database information.

Enter which host will store the global device database.
(default: mstsvr): mstsvr

Starting the NetBackup database manager process (bpdbm).

Do you want to create policy and schedule examples that you can view or use
when you are configuring your own policies and schedules? [y,n] (y) y
... creating policy template_normal
... creating schedules for policy template_normal
... creating policy template_weekend
... creating schedules for policy template_weekend
Done creating example policies and schedules.
Creating Directive Set for LotusNotes
Creating Directive Set for MS_Exchange_5.x
Creating Directive Set for MS_Exchange_Mailbox
Creating Directive Set for MS_Exchange_2000
Creating Directive Set for MS_Exchange_SRS
Creating Directive Set for MS_Exchange_Public_Folders
Creating Directive Set for MS_Exchange_KMS
Creating Directive Set for MS_SharePoint_Server
Creating Directive Set for MS_SharePoint_Workspaces
Creating Template Set for Oracle_RMAN
Creating Template Set for Oracle_XML_Export
Creating Template Set for DB2
Creating Directive Set for Windows2000
Creating Directive Set for Windows2003


Policy conversion summary:
Number of original policies: 2
Number of non-snapshot policies skipped: 2
Number of policies not needing conversion: 0
Number of policies converted to
'auto' snapshot method: 0
Number of policies converted: 0
Number of new policies created due to
multiple clients in a policy that had
different snapshot method configurations: 0


Do you want to start the Media Manager device daemon processes? [y,n] (y) y
Starting the Media Manager device daemon processes.

Do you want to start the NetBackup bprd process so
backups and restores can be initiated? [y,n] (y) y
Starting the NetBackup request daemon process (bprd).


Done executing NB.inst


VERITAS Installation Script
Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved.

Installation Options

1 NetBackup
2 NetBackup Client Software

q To quit from this script
Choose an option [default: q]: q

A trace of the install can be found in /tmp/install_trace.25651
That file can be deleted after you are sure the install was successful.
artup programs

PATH=$PATH:$HOME/bin:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd:/usr/openv/netbackup/bin/goodies:/usr/openv/volmgr/bin

export PATH
unset USERNAME
[root@mstsvr ~]# bpp
bppficorr bpplconvert bpplinclude bppllist bpplschedrep bpplvalid bpps
bpplclients bppldelete bpplinfo bpplsched bpplschedwin bppolicynew
[root@mstsvr ~]# bppq
bppficorr bpplconvert bpplinclude bppllist bpplschedrep bpplvalid bpps
bpplclients bppldelete bpplinfo bpplsched bpplschedwin bppolicynew
[root@mstsvr ~]# bpps -a
NB Processes
------------
root 27083 1 0 17:29 ? 00:00:00 /usr/openv/netbackup/bin/bpdbm
root 27357 1 0 17:29 ? 00:00:00 /usr/openv/netbackup/bin/bprd
root 27085 27083 0 17:29 ? 00:00:00 /usr/openv/netbackup/bin/bpjobd


MM Processes
------------
root 27063 1 0 17:28 ? 00:00:00 /usr/openv/volmgr/bin/vmd
[root@mstsvr ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 20641788 10774332 8818816 55% /
none 2075220 0 2075220 0% /dev/shm
/dev/cciss/c0d0p2 90709056 2642920 83458296 4% /u01
/dev/md1 206421944 2726124 193210204 2% /data
/veritas-soft/NB51_Linux_05_11.iso
587628 587628 0 100% /veritas
[root@mstsvr ~]# umount v/veritas
[root@mstsvr ~]# ll
_[00mtotal 112
-rw-r--r-- 1 root root 1333 Feb 22 14:29 _[00manaconda-ks.cfg_[00m
drwxr-xr-x 2 root root 4096 Feb 22 14:42 _[01;34mDesktop_[00m
-rwxr-xr-x 1 root root 593 Feb 27 11:05 _[01;32mgetwwn.sh_[00m
-rw-r--r-- 1 root root 53792 Feb 22 14:29 _[00minstall.log_[00m
-rw-r--r-- 1 root root 9252 Feb 22 14:29 _[00minstall.log.syslog_[00m
-rw-r--r-- 1 root root 523 Feb 28 16:45 _[00mwwn_[00m
[root@mstsvr ~]# cd /veritas
veritas/ veritas-soft/
[root@mstsvr ~]# cd /veritas-soft/
[root@mstsvr veritas-soft]# ll
_[00mtotal 953012
drwxr-xr-x 2 root root 4096 Feb 28 14:40 _[01;34mmp4_[00m
-rw-r--r-- 1 root root 602075136 Feb 28 14:41 _[00mNB51_Linux_05_11.iso_[00m
-rw-r--r-- 1 root root 372830208 Feb 28 14:41 _[00mNB51_UOption_051.iso_[00m
[root@mstsvr veritas-soft]# cd ..
[root@mstsvr veritas-soft]# cd mp4
[root@mstsvr mp4]# ./Vrts_pack.install
There are 3 packs available in /veritas-soft/mp4:
(* denotes installed pack)

NB_51_4_M
NB_CLT_51_4_M
NB_ORA_51_4_M

Enter pack name (or q) [q]: NB_51_4_M



Pack NB_51_4_M requires the following pack levels(s) :
NB_CLT_51_4_M.

Pack NB_51_4_M will not be installed at this time.

Installing required pack, NB_CLT_51_4_M, now.


Pack NB_CLT_51_4_M co-requires the following pack level(s) :
NB_51_4_M.

Install pack NB_CLT_51_4_M Tue Feb 28 17:40:25 CST 2006 Rev. 1.19.4.23
Can not install pack when NetBackup daemons are running.
Do you want to kill all NetBackup daemons? (y/n) [n] y

Looking for NetBackup processes that need to be terminated.
Suspending or cancelling jobs...
Stopping bprd...
Stopping bpdbm...

Looking for Media Manager processes that need to be terminated.
Stopping vmd...
Pack install will continue.

Performing install of Linux/RedHat2.4 client binaries locally.

Running preinstall script.


Running postinstall script.
See /usr/openv/pack/pack.history for more details.
/veritas-soft/mp4/VrtsNB_CLT_51_4_M.postinstall: Running. Hardware/OS Type=Linux/RedHat2.4
/veritas-soft/mp4/VrtsNB_CLT_51_4_M.postinstall: Installing Linux/RedHat2.4 client binaries locally.
...............................
------------------------------------------------
Installation of pack NB_CLT_51_4_M completed Tue Feb 28 17:40:25 CST 2006 Rev. 1.19.4.23.
------------------------------------------------
Installing required pack, NB_51_4_M, now.


Install pack NB_51_4_M Tue Feb 28 17:40:25 CST 2006 Rev. 1.19.4.23


Running preinstall script.
See /usr/openv/pack/pack.history for more details.
/veritas-soft/mp4/VrtsNB_51_4_M.preinstall: Running. Hardware/OS Type=Linux/RedHat2.4

Saving pre-existing binaries.
Saved binaries successfully.

Extracting files out of /veritas-soft/mp4/VrtsNB_51_4_M.linux.tar.Z.


Tar extraction successful.
See /usr/openv/pack/pack.history for more details.

Running postinstall script.
See /usr/openv/pack/pack.history for more details.
/veritas-soft/mp4/VrtsNB_51_4_M.postinstall: Running. Hardware/OS Type=Linux/RedHat2.4
------------------------------------------------
Installation of pack NB_51_4_M completed Tue Feb 28 17:40:25 CST 2006 Rev. 1.19.4.23.
------------------------------------------------

There are 3 packs available in /veritas-soft/mp4:
(* denotes installed pack)

NB_51_4_M *
NB_CLT_51_4_M *
NB_ORA_51_4_M

Enter pack name (or q) [q]: q

[root@mstsvr mp4]# bpps -a
NB Processes
------------
root 29790 1 0 17:43 pts/4 00:00:00 /usr/openv/netbackup/bin/bprd
root 29803 1 0 17:43 pts/4 00:00:00 /usr/openv/netbackup/bin/bpdbm
root 29829 29803 0 17:43 pts/4 00:00:00 /usr/openv/netbackup/bin/bpjobd


MM Processes
------------
root 29786 1 0 17:43 pts/4 00:00:00 vmd

[root@mstsvr mp4]# service netbackup stop
stopping the NetBackup request daemon
stopping the NetBackup database daemon
stopping the Media Manager volume daemon
[root@mstsvr mp4]# service netbackup stopart
Rebuilding device nodes.
Media Manager daemons started.
NetBackup request daemon started.

No Entries in the Drive Database
[root@mstsvr mp4]# bpps -a
NB Processes
------------
root 30217 1 0 17:53 pts/4 00:00:00 /usr/openv/netbackup/bin/bprd
root 30243 1 0 17:53 pts/4 00:00:00 /usr/openv/netbackup/bin/bpdbm
root 30258 30243 0 17:53 pts/4 00:00:00 /usr/openv/netbackup/bin/bpjobd


MM Processes
------------
root 30213 1 0 17:53 pts/4 00:00:00 vmd

[root@mstsvr mp4]# service netbackup start

stopping the NetBackup request daemon
stopping the NetBackup database daemon
stopping the Media Manager volume daemon
[root@mstsvr mp4]# service netbackup start
Rebuilding device nodes.
Media Manager daemons started.
NetBackup request daemon started.

No Entries in the Drive Database
[root@mstsvr mp4]# bpps -a
NB Processes
------------
root 31201 1 0 18:11 pts/4 00:00:00 /usr/openv/netbackup/bin/bprd
root 31218 1 0 18:11 pts/4 00:00:00 /usr/openv/netbackup/bin/bpdbm
root 31242 31218 0 18:11 pts/4 00:00:00 /usr/openv/netbackup/bin/bpjobd


MM Processes
------------
root 31198 1 0 18:11 pts/4 00:00:00 vmd
[root@mstsvr mp4]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 mstsvr localhost.localdomain localhost
10.98.26.56 mstsvr
10.98.26.6 gddbsvr1
10.98.26.7 gddbsvr2
10.98.26.8 gdcen
10.98.19.34 datacenter

Oracle9i RAC归档设置

(1)停止所有的node
srvctl stop database -d rac
(2)修改参数文件/data/initrac.ora
*.log_archive_start=true
*.cluster_database=false
*.log_archive_dest='LOCATION=/data/rac/archive'
*.log_archive_format='arch_%t_%s.arc'
(3)在其中一个实例上作如下操作
srvctl start instance -d rac -i rac1 -o pfile=/data/initrac.ora mount
startup mount;
alter database archivelog;
alter database open;
修改参数文件/data/initrac.ora
*.cluster_database=true
关闭此节点
shutdown immediate;
(6)启动所有节点
srvctl start database -d rac -o pfile=/data/initrac.ora
srvctl start database -d rac -o spfile=/data/spfilerac.ora(不支持)

createdb.sql脚本

oracle9i创库脚本

CREATE DATABASE rmanLOGFILE
GROUP 1 ('/data/rman/log01_01.log') SIZE 50M,
GROUP 2 ('/data/rman/log02_01.log') SIZE 50M,
GROUP 3 ('/data/rman/log03_01.log') SIZE 50M,
GROUP 4 ('/data/rman/log04_01.log') SIZE 50M,
GROUP 5 ('/data/rman/log05_01.log') SIZE 50M
DATAFILE '/data/rman/system01.dbf' SIZE 300M AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
extent management localDEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/data/rman/temp01.dbf' SIZE 1000M
AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
UNDO TABLESPACE UNDOTBS1 datafile '/data/rman/undotbs01.dbf' SIZE 2000M AUTOEXTEND ON NEXT 10M
MAXSIZE 32767M
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16;

oracle10g创库脚本

CREATE DATABASE itownetLOGFILE
GROUP 1 ('/data_disk/itownet/log01_01.log') SIZE 50M,
GROUP 2 ('/data_disk/itownet/log02_01.log') SIZE 50M,
GROUP 3 ('/data_disk/itownet/log03_01.log') SIZE 50M
DATAFILE '/data_disk/itownet/system01.dbf' SIZE 300M REUSE
AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
sysaux datafile '/data_disk/itownet/sysaux01.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/data_disk/itownet/temp01.dbf' SIZE 1000M
AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
UNDO TABLESPACE UNDOTBS1 datafile '/data_disk/itownet/undotbs01.dbf' SIZE 2000M AUTOEXTEND ON NEXT 10M MAXSIZE 32767M
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16;