HPUX11.23_oracle10g_servicesguard(自己)

合集下载

HP-UX下安装Oracle数据库经验总结

HP-UX下安装Oracle数据库经验总结

最近陆续接触了一些HP-UX 上Oracle 数据库的安装,相比较AIX 和linux 而言,HP-UX个人感觉还是相对复杂一些。

尤其如果没有SA 的配合,在缺少补丁(很多补丁没有账号根本拿不到)或者涉及到serviceguard 的配置(和hacmp 比较)都会让人很头疼。

这里只是简单罗列下HP-UX 下安装Oracle 数据库的过程和步骤,同时把自己在安装时候遇到的一些问题拿出来分享一下,希望能对遇到同样问题的朋友有所帮助。

安装步骤:1.检查硬件要求1 2 3 4 5 # /usr/contrib/bin/machinfo | grep -i Memory# /usr/sbin/swapinfo -a# /bin/getconf KERNEL_BITS# bdf /tmp# bdf此处需要注意的就是内存至少大于1G ;SWAP 一般安装oracle 建议为:Available RAM Swap Space RequiredBetween 1024 MB and 2048 MB 1.5 times the size of RAMBetween 2049 MB and 8192 MB Equal to the size of RAMMore than 8192 MB 0.75 times the size of RAM/tmp 空间一般建议至少设置500M 往上,一般都设置为几个G ,我就曾经遇到过/tmp 空间设置过小安装检测通不过的问题,而HP-UX 扩文件系统相比较AIX 来说比较麻烦,所以为了安全起见(没有SA 配合),通过在Oracle 用户环境变量设置tmp 和tmpdir 来解决。

通过bdf 命令检查硬盘空间,一般来说生产环境下软件目录和数据目录划分都会满足要求,Oracle 官方文档建议如下:Installation Type Requirem ent for Software Files (GB)Enterprise Edition 6.89Standard Edition 6.09Custom (maximum) 6.89Installation Type Disk Space for Data Files (GB)Enterprise Edition 1.69Standard Edition 1.48Custom (maximum) 1.812.检查安装Oracle 软件要求1 2 3 # uname -a 注:Oracle11g 支持HP-UX 11i v2 (11.23) HP-UX 11i v3 (11.31) # /usr/sbin/swlist -l level | more# /usr/sbin/swlist -l patch | more需要以下补丁,如果安装了HP 补丁集,下面这些补丁应该是存在的PHCO_41479 (or later) 11.31 diskowner(1M) cumulative patchPHKL_38038 vm cumulative patchPHKL_38938 11.31 SCSI cumulative I/O patchPHKL_40941 Scheduler patch : post wait hangPHSS_36354 11.31 assembler patchPHSS_37042 11.31 hppac (packed decimal)PHSS_37959 Libcl patch for alternate stack issue fix(QXCR1000818011)PHSS_39094 11.31 linker + fdp cumulative patchPHSS_39100 11.31 Math Library Cumulative PatchPHSS_39102 11.31 Integrity Unwind LibraryPHSS_38141 11.31 aC++ Runtime官方文档建议:For HPIA 11.23 (Mar '07 Patch bundle for HP-UX 11iV2- B.11.23.0703):Mar '07 Patch bundle for HP-UX 11iV2 (B.11.23.0703)PHKL_35478: s700_800 11.23 shmget(2) cumulative patchPHCO_36673: s700_800 11.23 libc cumulative patchPHKL_36853: s700_800 11.23 pstat patchPHSS_37958: 11.23 Libcl patchFor HPIA 11.31:PHKL_35900: 11.31 evacd performance, kvaddr leak panicPHKL_36248: 11.31 esctl cumulative patchPHKL_36249: 11.31 esdisk cumulative patchPHKL_35936: 11.31 call to read(2) or write(2) may incorrectly return -1 PHKL_38038: ABORT CORRUPTION HANG OTHER PANICPHSS_37959: 11.31 Libcl patch注:此处需要注意,如果缺少部分补丁,安装过程中会出现很多问题,有些补丁比如PHCO_41479会导致提示INS-30060错误提示并退出安装,下面会详细描述。

Oracle 10g server x86 平台下的安装说明

Oracle    10g     server  x86  平台下的安装说明

说明:solaris系统安装依照现有版本SUN Solaris 操作系统安装说明书进行。

没有显示的说明项选择默认即可。

Oracle的安装1查看系统信息smc命令查看内存2 进入超级用户用文本编辑器打开/etc/system文件(具体数据参照9i sun 工作站安装中的配置)3增加dba组然后再增加oracle用户,属于dba组,出示路径/export/home/oracle4用reboot重新启动5进入oracle用户编辑.profile文件(内容同2)再次用vi查看system和。

Profile6然后开始安装oracle ,在对应路径下执行./runInstaller 注意I大写7如果配置的正确的话会出现export /home/oracle下安装选择高级安装8出现欢迎使用界面,单击“下一步”;9出现“指定Inventory目录和身份证明”界面,指定Inventory完整的路径为/export/home/oracle/oraInventory10 身份证明,下一步11 主目录详细信息名称更改ORACLE_HOME12下一步出现两个警告是下一步13 创建数据库14 数据库配置选择高级15 概要选择安装16数据库模板定制数据库17 数据库标示下一步18 关系选项默认19 所有账号同意口令ytdf00020 存储选项文件系统21 所有数据库文件公共为止/export /home/oracle/oradata22 恢复配置下一步23初始化参数连接模式选择共享服务器下一步24 数据存储界面最终结果如上图所示要删除一个user 建立两个user_data his_data 更改一个temp_data25创建数据库和生成数据库脚本26确认创建按退出27 执行配置脚本以root用户(su)执行./root .shhe ./*****.sh 28安装结束退出29配置监听和网络服务netmgrNetmgr net服务名为dbs1 服务名orcl如果是双服务器的话dbs1a 此时主机名可以使ip30 执行优化alter system set dml_locks=20000 scope=spfilealter system set remot_login _passwordfile=NONE scope=spfile31 重启oracle服务32severpara.ini 文件更改33 induview用户登录执行脚本alter user system temporary tablespace temp_data;alter user system default tablespace user_data;@$ORACLE_HOME/rdbms/admin/catproc.sql @$ORACLE_HOME/rdbms/admin/caths.sql connect system/manager@$ORACLE_HOME/sqlplus/admin/pupbld.sqlconnect / as sysdba;create user xopens identified by ytdf000default tablespace user_datatemporary tablespace temp_data; grant dba to xopens;create user xopenssa identified by assnepox default tablespace user_datatemporary tablespace temp_data;grant select any table to xopenssa;grant create session to xopenssa;connect xopens/ytdf000;drop table df8002msg;create table df8002msg(数据库名char(12) not null,段名char(12) not null,日期int not null,剩余空间number(10) not null,描述char(100) null);grant select on df8002msg to public;create synonym xopens.table_keys for er_cons_columns; grant select on table_keys to public;create synonym xopens.tables for er_tables;grant select on tables to public;其中可能存在的问题:1)connect system/manager此处manager要改为ytdf000。

Oracle10gRAC在HP-UX(Itanium) 11.23上的安装手册

Oracle10gRAC在HP-UX(Itanium) 11.23上的安装手册

Oracle10gRAC在HP-UX(Itanium) 11.23上的安装手册一、安装概述Oracle10gRAC的软件版本号为10.2.0.1,补丁版本号为10.2.0.2。

HP-UX(Itanium)操作系统版本号为11.23。

Oracle10g的安装介质为三个tar文件:clusterware.tar、database.tar和p10202_HPUX-IA64.tar。

请联系工程部陈晓静获取上面的要求在两台库服务器上都需要满足,如果有不满足的,请让厂方工程师协助解决。

2、网络需求两个光纤网口,用于连光纤交换机和阵列连接。

至少三个,最好四个千兆网口(电口、光口均可),用于外网连接和心跳连接。

建议将机器主板上的内置网卡用于心跳连接,将PCI插槽上的外接网卡用于外网连接。

为了满足OracleRAC中vip的需求,需要将连接外网的两个网口使用ServiceGuard技术配置成一个主备方式的网口,vip的地址需要和这个网口配置在同一个网段。

如果有四个网口,建议将剩余的两个网口也使用ServiceGuard技术配置成一个主备方式的网口,用于心跳连接。

Oracle建议心跳使用单独的交换机连接,或者使用交换机上一个单独的vlan连接,避免使用交叉线直接连接。

1以下是网络连接示例图,请让厂方工程师照此配置:假设机器名为his01和his02,每台机器有四个网口和两个光纤口。

其中lan0和lan3两个网口配置成主备方式的网口,配置170.101.1的公共网段地址,lan0为主网口,lan3为备网口。

lan0和lan3分别接在公网的两台交换机A和B 上,两台公网交换机之间通过级联线连接。

lan1和lan2两个网口配置成主备方式的网口,配置10.0.0的私有网段地址,lan1为主网口,lan2为备网口。

接在一台单独交换机上。

Oracle的vip地址配置到170.101.1的网段上。

注意:● Oracle的vip地址不需要额外设置,只需要将vip的地址加入到hosts文件即可。

HP-UX下Oracle10G的安装

HP-UX下Oracle10G的安装

一.ORACLE 10G Installation作为root用户的工作配置内核参数用root用户登陆# sam -> system administrator manager -> kernel configuration ->configurable parameters修改以下参数10gr2安装在11.31没打补丁就用了,我们就打了个网卡的补丁(解决需要重启才能激活网卡的bug)安装oracle的时候调了下参数优化操作系统参数:sam ->kernel->tunable参数优化后的值原来的值ksi_alloc_max (nproc*8)executable_stack 0max_thread_proc 1024maxdsiz 1073741824 bytes maxdsiz_64bit 2147483648 bytes maxssiz 134217728 bytes 8388608 maxssiz_64bit 1073741824 268435456 maxswapchunks 16384* 无此参数maxuprc ((nproc*9)/10)+1 bug 6995956 256msgmap (msgtql+2) 无此参数msgmni (nproc) 512 msgseg 32767 无此参数msgtql (nproc) (b25293-01) 1024 ncsize (35648+1024) * 8976nfile (15*nproc+2048) 无此参数nflocks (nproc) (b25293-01) 4096 ninode (8*nproc+2048) 8192 nkthread (((nproc*7)/4)+16)nproc 4096semmap (semmni+2)* 无此参数semmns (nproc*2) 4096 semmni (nproc) (b25293-01) 2048 semmnu (nproc-4) 256 semvmx 32767shmmax 28574008000 28574008 Kbytesshmmni 512 400shmseg 120vps_ceiling 64 16* maxswapchunks, semmap, and vx_ncsize are obsolete on 11.23 pa-risc and ipf and no longer need to be setset ncsize = (ninode+1024)创建Oracle10g所需要的磁盘空间创建2个文件系统,一个用来安装oracle,不小于4G,可以取名为/oracle/SID(文件系统类型为vxfs),另一个用来存放oracle的安装文件,也不小于3G(根据安装的类型所定,EE 2GB, SE 2.5GB, Custom2.5GB),取名为/oradata,同时保证/tmp目录有多于400M的空闲空间创建dba组和oracle用户用root用户登陆#sam -> system administrator manager -> accounts for users and groups -> groups -> actions -> add输入group name为dba,然后确定#sam -> system administrator manager -> accounts for users and groups -> users -> actions -> add 输入login name为oracle,home directory为/oracle/SID/primary group name为dba,确定,输入密码并确认cd /oracle/SID 后修改.profile文件的权限,使oracle用户可以读写设置Oracle的环境变量#su – oracle 用oracle用户登陆$vi .profile 修改参数文件在文件的最后加入以下参数#oracle enviroment#oracle enviromentORACLE_BASE=/oracle/MCSORACLE_HOME=$ORACLE_BASE/10.2.0ORACLE_SID=MCSORACLE_TERM=vt100export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_TERMTNS_ADMIN=$ORACLE_HOME/network/adminexport TNS_ADMINNLS_LANG=american_america.AL32UTF8export NLS_LANGORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/dataexport ORA_NLS33SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib; export SHLIB_PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib; exportLD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibCLASSPATH=$ORACLE_HOME/JRE/lib:$ORACLE_HOME/JRE/lib/rt.jar:$CLASSPATHexport CLASSPATH#set shell search pathsPATH=/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/local/bin:$ORACLE_HOME/binexport PATH安装系统的补丁[下载需要的补丁后,进行安装(swlist –s /tmp/PHSS***)]修改系统的bug [root 用户]执行以下命令#cd /usr/lib#ln –s /usr/lib/libX11.3 libX11.sl#ln –s /usr/lib/libXIE.2 libXIE.sl#ln –s /usr/lib/libXext.3 libXext.sl#ln –s /usr/lib/libXhp11.3 libXhp11.sl#ln –s /usr/lib/libXi.3 libXi.sl#ln –s /usr/lib/libXm.4 libXm.sl#ln –s /usr/lib/libXp.2 libXp.sl#ln –s /usr/lib/libXt.3 libXt.sl#ln –s /usr/lib/libXtst.2 libXtst.sl安装oracle安装xmanager,并用oracle用户登陆到服务器,并启动终端,在终端输入$DISPLAY=Your PC IP:0.0$export DISPLAY$/oracd/Disk1/runInstaller然后就出现了universal installer在11.31上安装要加一个参数的,因为10g默认不支持11.31的./runInstaller -ignoreSysPrereqs●如果选择Basic Installation,将按照默认的方式安装软件并创建数据库●如果选择Advanced Installation,则可以按照个人的方式进行设定(在这里我们选择此项)●选择企业版安装,大概需要2.53GB的空间(此次选择此项为例) ●选择标准版安装,大概需要2.53GB的空间●选择自定义安装,可以进行选择性安装●在Product Languages中选择添加语言后,然后点击Next●在Path中填写软件安装的路径●查看如上log中的信息,如下Checking operating system requirements ...Expected result: One of 11.11,11.23Actual Result: 11.11Check complete. The overall result of this check is: Passed=============================================================== Checking operating system package requirements ...Check complete. The overall result of this check is: Not executed <<<<OUI-11108: Packages information not specified.Recommendation: Install the required packages before continuing with the installation.=============================================================== Checking recommended operating system patchesChecking for PHNE_31097; found PHNE_31097. PassedChecking for PHSS_31221; found PHSS_31221. PassedChecking for PHSS_32508; found Not found. F ailed <<<<Checking for PHSS_32509; found Not found. F ailed <<<<Checking for PHSS_32510; found Not found. F ailed <<<<Checking for PHSS_30970; found PHSS_30970. PassedChecking for PHSS_32731; found Not found. F ailed <<<<Checking for PHCO_31312; found PHCO_31312. PassedChecking for PHCO_30275; found PHCO_30275. PassedChecking for PHNE_28923; found PHNE_28923. PassedCheck complete. The overall result of this check is: Failed <<<<Problem: Some recommended patches are missing (see above).Recommendation: You may actually have installed patches which have obsoleted these, in which case you can successfully continue with the install. If you have not, it is recommended that you do not continue. Refer to the readme to find out how to get the missing patches.===============================================================Checking kernel parametersChecking for ksi_alloc_max=32768; found ksi_alloc_max=33600. PassedChecking for max_thread_proc=256; found max_thread_proc=3000. PassedChecking for maxdsiz=1073741824; found maxdsiz=1073741824. PassedChecking for maxdsiz_64bit=2147483648; found maxdsiz_64bit=17179869184. PassedChecking for maxssiz=134217728; found maxssiz=134217728. PassedChecking for maxssiz_64bit=1073741824; found maxssiz_64bit=1073741824. PassedChecking for maxswapchunks=16384; found maxswapchunks=16384. PassedChecking for maxuprc=3687; found maxuprc=4096. P assedChecking for msgmap=4098; found msgmap=4202. PassedChecking for msgmni=4096; found msgmni=4200. PassedChecking for msgseg=32767; found msgseg=32767. P assedChecking for msgtql=4096; found msgtql=4200. PassedChecking for ncsize=34816; found ncsize=35840. PassedChecking for nfile=63488; found nfile=65536. PassedChecking for nflocks=4096; found nflocks=8192. PassedChecking for ninode=34816; found ninode=34816. PassedChecking for nkthread=7184; found nkthread=10000. PassedChecking for nproc=4096; found nproc=4200. PassedChecking for semmap=4098; found semmap=8194. PassedChecking for semmni=4096; found semmni=8192. PassedChecking for semmns=8192; found semmns=16384. PassedChecking for semmnu=4092; found semmnu=4092. PassedChecking for semvmx=32767; found semvmx=32767. PassedChecking for shmmax=1073741824; found shmmax=17179869184. Passed Checking for shmmni=512; found shmmni=512. PassedChecking for shmseg=120; found shmseg=200. PassedChecking for vps_ceiling=64; found vps_ceiling=64. PassedCheck complete. The overall result of this check is: Passed=============================================================== Validating ORACLE_BASE location (if set) ...Check complete. The overall result of this check is: Passed=============================================================== Checking Oracle Home path for spaces...Check complete. The overall result of this check is: Passed=============================================================== Checking for proper system clean-up....Check complete. The overall result of this check is: Passed=============================================================== Checking for Oracle Home incompatibilities ....Check complete. The overall result of this check is: Failed <<<<Problem: Oracle Database 10g Release 2 can only be installed in a new Oracle Home Recommendation: Choose a new Oracle Home for installing this product.问题原因:PHSS_32508 需要安装s700_800 11.X HP aC++ Compiler (A.03.63)编译器附:Pro*C/C++, Oracle C++ Call Interface , Oracle XMLDeveloper's Kit (XDK)这些应用需要此编译器PHSS_32509 需要安装s700_800 11.X ANSI C compiler B.11.11.12编译器附:PL/SQL,Pro*C/C++, Oracle Call Interface, Oracle C++ CallInterface ,Oracle XML Developer's Kit (XDK)这些应用需要此编译器PHSS_32510 安装s700_800 11.X HP aC++ Compiler (A.03.63),s700_800 11.X ANSI C compiler B.11.11.12编译器附:PL/SQL,Pro*C/C++, Oracle Call Interface, Oracle C++ CallInterface ,Oracle XML Developer's Kit (XDK)这些应用需要此编译器PHSS_32731 需要安装s700_800 11.11 Serviceguard A.11.16.00 解决办法:上诉软件包为收费软件,如果需要上诉服务,则需要安装上诉软件包后,安装相应patch,然后重新进行检测;如果不需要上诉服务,则不许安装上诉patches,不影响数据库的运行。

如何完全卸载Oracle 10g

如何完全卸载Oracle 10g

如何卸载Oracle 10g关键字: 如何卸载oracle 10g软件环境:1、Windows XP + Oracle 10g2、Oracle安装路径为:d:\Oracle实现方法:1、开始->设置->控制面板->管理工具->服务停止所有Oracle服务;2、开始->程序->Oracle – OraDb10g_home1>Oracle Installation Products-> Universal Installer 卸装所有Oracle产品,但Universal Installer本身不能被删除;3、运行regedit,选择HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE,按del键删除这个入口;4、运行regedit,选择HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services,滚动这个列表,删除所有Oracle入口;5、运行refedit,选择HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Applica tion,删除所有Oracle入口;6、开始->设置->控制面板->系统->高级->环境变量,删除环境变量CLASSPATH和PATH中有关Oracle的设定;7、从桌面上、STARTUP(启动)组、程序菜单中,删除所有有关Oracle的组和图标;8、删除c:\Program Files\Oracle目录;9、重新启动计算机,重起后才能完全删除Oracle所在目录;10、删除与Oracle有关的文件,选择Oracle所在的缺省目录C:\Oracle,删除这个入口目录及所有子目录,并从Windows XP目录(一般为d:\WINDOWS)下删除以下文件ORACLE.INI、oradim73.INI、oradim80.INI、oraodbc.ini等等;11、WIN.INI文件中若有[ORACLE]的标记段,删除该段;12、如有必要,删除所有Oracle相关的ODBC的DSN;13、到事件查看器中,删除Oracle相关的日志说明:如果有个别DLL文件无法删除的情况,则不用理会,重新启动,开始新的安装,安装时,选择一个新的目录,则,安装完毕并重新启动后,原来的目录及文件就可以删除掉了。

Oracle10g客户端安装与配置说明

Oracle10g客户端安装与配置说明

Oracle10g客户端安装与配置说明一、Oracle客户端安装将oracle10g客户端虚拟光盘插入虚拟光驱中,系统自动弹出Oracle10g安装界面,选择开始安装。

1)出现【安装】界面,单击[开始安装]按钮。

如下图所示:(图示安装)2)出现【DOS】界面,等待片刻。

如下图所示:(图示 DOS)3)出现【欢迎使用】界面,单击[下一步]按钮。

如下图所示:(图示欢迎使用)4)出现【选择安装类型】界面,此处以选择‘管理员’选项安装为例,单击[下一步]按钮。

如下图所示:5)出现【安装目录】界面,选择安装路径,单击[安装]按钮。

如下图所示:(图示安装目录)6)出现【产品特定的先决条件检查】界面,检测是否符合安装条件,单击[下一步]按钮。

如下图所示:7)出现【概要】界面,单击[下一步]按钮。

如下图所示:8)出现【安装】界面,单击[下一步]按钮。

如下图所示:(图示安装)9)出现【本地服务配置】界面,暂时先不配置,单击[取消]按钮即可,若要配置,操作见Oracle客户端配置。

如下图所示:(图示本地服务配置)10)出现【安装结束】界面,单击[退出]按钮即可完成安装。

如下图所示:(图示安装结束)二、Oracle客户端配置1)单击“开始→程序→Oracle - OraClient10g_home1→配置和移植工具→NetManager”菜单。

如下图所示:(图示启动Oracle)2)出现【本地配置】界面中添加数据库,先选择‘Oracel net配置→本地→服务命名’,再单击窗口左上角的“+”或单击‘编辑→创建’,打开【Net 服务命向导:欢迎使用】界面中输入“Net 服务名”,然后单击[下一步]。

如下图所示:(图示本地配置)注意:网终服务名应与服务器的服务名设置一致,否则流程表单打不开。

并记住此服务名,后续的杰思科地籍管理信息系统连接需要使用。

(该处的网络服务名称就是\oracle\product\10.2.0\db_1\NETWORK\ADMIN中文件tnsnames.ora中配置的名称如LW AAS_ORCL)3)出现【选择协议】界面,设置TCP/IP(Internet协议),然后单击[下一步]。

lunix安装oracle10g

lunix安装oracle10g

在Linux5.3安装oracle10g1.在服务器安装好linux5.3系统之后,通过远程安装oracle10g数据库,就必须设置好服务器的IP地址,端口等一些配置。

在服务器端通过编辑etc/sysconfig/network-scripts/ifcfg-eth0来完成,具体指令是vi□ifcfg-eth0 按I输入,把bootport参数改成static,设置服务器IP地址IPADDR=69.2.54.111,网关gateway=69.2.54.254,子网掩码netMask=255.255.255.0按ESC退出编辑状态进去命令模式,按shift+:并输入wq!回车,保存配置。

2.在远程机器上打开ssh shell,按quick connect输入连接的服务器的IP、端口、用户、密码,用户用root登录(必须确保服务器处于开机状态才能连接)。

打开x-window,在ssh shell里面执行指令:xterm□–display□69.2.54.111:0,这个IP地址是服务器的IP地址,此时x-window自动打开一个终端,在终端里输入startkde指令,进去远程服务器的桌面了。

3.创建oracle用户:指令groupadd oinstallgroupadd dbauseradd –g oinstall –G dba oraclepasswd oracle提示输入oracle用户密码,OK!4.在ssh shell里按标题栏window→new file Transfer,把在本机器的oracle10g安装包(oracle10g_patch里所有的文件)复制到linux服务器的oracle用户根目录下5.用root用户登录,通过编辑/etc/selinux/config 文件禁用secure linux,确认其中的SELINUX标记如下:SELINUX=disabled。

6.检查下列包是否安装,若未安装则要先安装:(一般来说第一次在该系统安装oracle10g需要安装这些包,已经装过一次一般不需要再安装了)。

Oracle10G(DataGuard灾备配置)

Oracle10G(DataGuard灾备配置)

一、环境Windows 20003 serverOracle 10.2.0.1主机:10.168.198.8(primary)备机:10.168.198.9(standby)二、准备条件分别在primary、standby上安装数据库,并自动创建实例;安装路径、数据库实例名(cz2013)和密码都设置成一样三、Primary操作1、设置主数据库为force logging 模式SQL>sqlplus "/as sysdba"SQL>alter database force logging;2、设置主数据库为归档模式,并以mount 启动数据库SQL>archive log listSQL>shutdown immediateSQL>startup mountSQL>alter database archivelog;SQL>archive log list3、添加"备用联机日志文件"SQL>select * from v$logfile;再添加:alter database add standby logfile group 4 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\CZ2013\redo04.log') size 50m;alter database add standby logfile group 5 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\CZ2013\redo05.log') size 50m;alter database add standby logfile group 6 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\CZ2013\redo06.log') size 50m;alter database add standby logfile group 7 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\CZ2013\redo07.log') size 50m;4、创建主库的初始化参数给备库用SQL>Create pfile from spfile;产生的文件名为initcz2013.ora 存放目录默认放在$ORACLE_HOME/database下5、在主库创建监听和配置tnsnams.oralistener.ora配置如下:SID_LIST_LISTENER中添加:(SID_DESC =(GLOBAL_DBNAME = cz2013)(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)(SID_NAME = cz2013))tnsnames.ora配置如下:添加:primary =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.168.198.8)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = cz2013)))standby =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.168.198.9)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = cz2013)))6、在initcz2013.ora中添加以下内容:*.log_archive_format='%T%S%r.ARC'*.DB_UNIQUE_NAME='primary'*.log_archive_config='DG_CONFIG=(primary,standby)'*.log_archive_dest_1='location=D:\oracle\product\10.2.0\oradata\arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primary'*.log_archive_dest_2='SERVICE=standby arch ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby'*.STANDBY_FILE_MANAGEMENT=AUTO*.LOG_ARCHIVE_DEST_STATE_1=ENABLE*.LOG_ARCHIVE_DEST_STATE_2=ENABLE*.FAL_SERVER='standby'*.FAL_CLIENT='primary'关闭数据库,在用initcz2013.ora重启SQL>startup pfile='D:\oracle\product\10.2.0\db_1\database\initcz2013.ora';7、用Rman备份,不用停机$ rman target /RMAN>backup full format 'D:/FULL_%d_%T_%s.bak' database include current controlfile for standby;RMAN>sql 'alter system archive log current';RMAN>Backup ArchiveLog all format='D:/arch_%d_%T_%s.bak';备份完后将备份文件拷到standby上同样的目录,强调:同样的目录(D盘),在standby进行rman 恢复即可8、启动主数据库SQL>startup四、Standby操作1、以mount 启动备库,添加"备用联机日志文件"SQL>sqlplus "/as sysdba"SQL>shutdown immediateSQL>startup mount先查看日志文件位置:SQL>select * from v$logfile;再添加:alter database add standby logfile group 4 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\CZ2013\redo04.log') size 50m;alter database add standby logfile group 5 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\CZ2013\redo05.log') size 50m;alter database add standby logfile group 6 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\CZ2013\redo06.log') size 50m;alter database add standby logfile group 7 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\CZ2013\redo07.log') size 50m;2、在备库创建监听和配置tnsnams.ora (同主库)3、测试主备之间网络连通Primary:C:>lsnrctl startC:>tnsping standbyStandby:C:>lsnrctl startC:>tnsping primary4、配置备库初始化参数recover编辑$ORACLE_HOME/database目录下的initcz2013.ora添加以下内容*.log_archive_format='%T%S%r.ARC'*.DB_UNIQUE_NAME='standby'*.log_archive_config='DG_CONFIG=(primary,standby)'*.log_archive_dest_1='location=D:\oracle\product\10.2.0\oradata\arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'*.log_archive_dest_2='SERVICE=primary arch ASYNC V ALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=primary'*.STANDBY_FILE_MANAGEMENT=AUTO*.LOG_ARCHIVE_DEST_STATE_1=ENABLE*.LOG_ARCHIVE_DEST_STATE_2=ENABLE*.FAL_SERVER='primary'*.FAL_CLIENT='standby'5、启动备用数据库SQL>sqlplus "/as sysdba"SQL>startup nomount pfile='D:\oracle\product\10.2.0\db_1\database\initcz2013.ora';重启主、备库监听,用Rman还原数据库$rman target sys/admin@primary auxiliary /RMAN>duplicate target database for standby dorecover nofilenamecheck;SQL>alter database mount standby database; --该语句如果报错可忽略SQL>alter database recover managed standby database disconnect from session;五、测试注意Data Guard 启动顺序:●启动顺序:先standby ,后primary;●关闭顺序:先primary 后standby;1、在备库将实例启动到mount 状态:SQL>startup nomount;SQL>alter database mount standby database;SQL>alter database recover managed standby database cancel;--该语句如果报错,可忽略SQL>alter database recover managed standby database disconnect from session;#如果有需要应用的日志并想手工应用,可以运行如下命令SQL>recover automatic standby database;2、在主库启动实例:SQL>startup;3、在主库验证日志:SQL>alter system switch logfile;SQL>select max(sequence#) from v$archived_log;4、在备库检查日志是否和主库一致SQL>select max(sequence#) from v$archived_log;注:主备查询结果一致,Data Guard 搭建结束。

HP-UX双机-安装Oracle+10g

HP-UX双机-安装Oracle+10g

HP-UX双机-安装Oracle 10g1. 硬件设备:rx4640*2DL380*2Hsv200*22. 软件环境:HP-UX ia64 11.233. 安装准备3.1. 软件准备:3.1.1. 确定HP-UX的版本:# uname –aHP-UX rx46401 B.11.23 U ia643.1.2. 确定所需补丁:swlist –l patch | morePHSS_29658: Aries cumulative patchPHSS_29660: linker + fdp cumulative patch说明:要求HP客服人员安装系统后,将所有最新的补丁打一遍,即可。

如果没有,从HP 网站下载后,用swinstall安装(注:注册HP网站时,必须要用8位密码注册,我的密码是12345678。

从HP官方网站下的补丁不知道为什么,总是解压不成功,最后只好求助HP 客服人员,将最新的补丁打一遍)。

3.1.3. 创建UNIX组和用户# groupadd oinstall(查询:grep osinstall /etc/group)# groupadd dba(查询:grep dba /etc/group)# useradd –g oinstall –G dba oracle (如果存在,则usermod –g oinstall –G dba oracle)说明:oinstall是primary group;dba是secondary group# passwd oracle(改变oracle的密码)创建用户时最好使用sam,这样更快捷。

Sam添加用户时会执行下列操作:? 在/etc/passwd中为用户创建一个条目(可以使用vipw进行编辑);? 为用户创建一个主目录;? 将启动文件(.cshrc、.exrc、.login、.profile)复制到用户的主目录下。

3.1.4. 创建所需目录及路径利用bdf查看所有mount成功的文件系统的状态;利用diskinfo查看所有disk的状态。

oracle10g在hpux安装

oracle10g在hpux安装
打开浏览器,输入
Oracle Software
Start the Installer as follows:
$ $ORACLE_HOME/oui/bin/runInstaller
In the Welcome screen, click Deinstall Products
In the Inventory screen, select the Oracle home containing the products that you
$ vi .profile
a value of 022 for the default file
creation mask:
umask 022
确认:ORACLE_SID, ORACLE_HOME, or ORACLE_BASE environment variables 已经设置
run the shell startup script
want to remove.
If you want to delete specific products select them from the tree window.
Click Remove.
The Installer displays a confirmation screen asking you to confirm that you
screens
When the installation completes, click Exit, then click Yes to exit from the
Installer
When you run the script, if you do not want to install Legato Single

Oracle 10g ASM和HP StorageWorks数组的自动存储管理在HP-UX上的最佳实

Oracle 10g ASM和HP StorageWorks数组的自动存储管理在HP-UX上的最佳实

Oracle 10g Automatic Storage Managementwith HP StorageWorks Arrays on HP-UXProviding best practices and customer guidance for HP and Oracle environmentsTable of contentsIntroduction (2)Overview of Oracle 10g ASM (2)Using HP StorageWorks Secure Path with Oracle 10g ASM on HP-UX (3)Test environment (3)Configuring ASM with HP StorageWorks EVA and XP Arrays on HP-UX (4)Creating an Oracle RDBMS utilizing ASM for the storage (6)Configuring archive logs to utilize ASM (7)Adding a LUN (disk) to an ASM disk group (7)Path fail-over tests for StorageWorks EVA and XP Arrays on HP-UX (7)Best practices for using Oracle ASM with HP StorageWorks on HP-UX (7)Oracle ASM and HP Logical Volume Manager (LVM) (8)Conclusion (8)IntroductionHP and Oracle ®have shared a long and productive relationship for over 25 years, working together to help our customers maximize the business value of their database solutions and support ever-increasing volumes of data. Today, 37 percent of Oracle database customers use HP systems. The reason: These customers know they can count on HP to deliver the performance, availability, and scalability they need to meet the demands of a dynamic and highly competitive marketplace.HP StorageWorks arrays provide the ideal platform for Oracle 10g databases. As a leader in the storage arena, HP has a keen understanding of the critical issues Oracle database administrators (DBAs) face today, including disk optimization, cloning of production volumes for testing, and shrinking backup windows. HP StorageWorks arrays address these issues by offering:•Extensive scalability with very attractive price performance•Intelligent management of multiple arrays and hundreds of terabytes from a single, centralized location•High throughput and zero downtime, with no single point of failure and rapid disaster recovery•A compact footprint to conserve valuable floor spaceHP and Oracle have conducted extensive testing using the HP StorageWorks Enterprise Virtual Array (EVA) and XP Arrays with Oracle Database 10g Automatic Storage Management (ASM) on HP-UX demonstrating that Oracle ASM can optimize workloads without affecting performance. ASM implemented internally the Stripe and Mirror Everything (SAME) storage database layout methodology from Oracle. In this paper, HP and Oracle discuss how HP StorageWorks arrays are used with ASM. We then provide details of the lab tests, including system configurations, test descriptions,results, and best practices recommendations.Overview of Oracle 10g ASMOracle 10g ASM is a database file system that provides cluster file system and volume manager capabilities integrated into the Oracle database 10g kernel. It is applicable only to Oracle database files.HP with Oracle Database 10g ASM leverages HP storage and Oracle database technologies along with blended best practices and ongoing joint development to provide an efficient IT environment.Figure 1illustrates the efficiencies gained with this solution.ASM disk groups, as shown above, provide a pool of disks that can be managed as a logical unit. By dividing total disk space into uniform-sized megabyte units, ASM spreads each Oracle file evenly across all disks in a disk group.ASM can then automatically rebalance the disk group online whenever storage configuration changes. Oracle only moves the necessary amount of data to guarantee equal distribution for any given disk group.Figure 2illustrates disk groups in the ASM architecture.ASM also provides data mirroring. Choices for disk group redundancy include:•External: defers to hardware protection•Normal: 2-way mirroringFig 1.Operational Stack ASMBefore ASMIn addition, ASM failure groups can be created, providing a set of disks sharing a common resource whose failureneeds to be tolerated. Redundant copies of an extent are stored in separate failure groups. ASM failure groups can be assigned by DBAs or automatically by ASM.Using HP StorageWorks Secure Path with Oracle 10g ASM on HP-UXHP Secure Path is server-based, multipathing software that enhances the HP StorageWorks disk arrays. HP Secure Path is supported by several operating systems but is not part of the operating system.Secure Path provides the following capabilities:•Presents a single virtual path to the host (except HP StorageWorks XP arrays)•Provides a high-availability solution for HP disk arrays, preventing any single point of failure•Provides automatic fail-over and fail-back•Increases I/O throughput by providing different load-balancing polices•Detects path failures and seamlessly reroutes the I/O without affecting the applicationSince Oracle 10g ASM only supports a single path to any device, Secure Path can be used to enhance ASM byproviding a single virtual path for ASM while still providing transparent path fail-over. To do this, Secure Path must be configured to provide an alternate path for fail-over.Test environmentA test environment was created with DSS-like workload to simulate load on the database server, running eight different queries in parallel. The objective was to run the server at ~80 percent capacity (CPU / I/O, whichever is higher).The test environment was configured with the following:•One HP Integrity rx4640 server with 2 CPUs•HP-UX 11.23•Oracle 10g R1• Oracle 10g R1 ASM •HP Secure Path A.3.0D.00F.00F•HP StorageWorks EVA5000•HP StorageWorks XP12000disk array•2 HBAs connected to an FC 2/16 switch (EVA)Figure 2 – ASM ArchitectureRAC or non-RAC databasesClustered serversClustered pool of storageConfiguring ASM with HP StorageWorks EVA and XP arrays on HP-UXFor StorageWorks EVA and XP arrays, install and configure HP Secure Path using the supplied installation script (install.sh). ASM only supports a single path to any device, although alternate paths must be available for path fail-over. The recommendation for ASM is to enable path fail-over.Determine the “access device files” for ASM under control by Secure Path EVA as follows:Determine the “access device files” for ASM under control by Secure Path XP as follows:In this example, /dev/dsk/c10t0d0, /dev/dsk/c14t0d0, /dev/dsk/c49t0d0, /dev/dsk/c54t0d0,/dev/dsk/c56t0d0are alternate paths to /dev/dsk/c8t0d0. Any of these devices can be picked as an ASM disk.Note that RAW / character device files must be used for Oracle ASM, e.g.,/dev/rdsk/…. For Oracle to use these devices, they should be owned by the Oracle user:# chown oracle <RAW_DEVICE_FILES># chown oracle /dev/rdsk/c8t0d*Create an Oracle parameter file for ASM. For example:# Oracle ASM init.ora parameters*.background_dump_dest='/oracle/RDBMS/10.1.0/Server/admin/+ASM/bdump'*.core_dump_dest='/oracle/RDBMS/10.1.0/Server/admin/+ASM/cdump'*.user_dump_dest=’/oracle/RDBMS/10.1.0/Server/admin/+ASM/udump'*.instance_type='asm'*.asm_diskgroups=EVDG,XPDG*.large_pool_size=12M*.asm_diskstring=’/dev/rdsk/c58t0d[012345]’, ’/dev/rdsk/c8t0d*’*.remote_login_passwordfile='SHARED'# spmgr displayServer: Report Created: Fri, Apr 15 15:28:32 2005Command: spmgr display = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =Storage: 5000-1FE1-5004-1730Load Balance: On Auto-restore: Off Balance Policy: Least Service Time Path Verify: On Verify Interval: 30HBAs: td1td3Controller:P5849E1AAQ6024, Operational P5849E1AAQ603Y, OperationalDevices:c58t0d0 c58t0d1 c58t0d2 c58t0d3 c58t0d4 c58t0d5 c58t0d6TGT/LUN Device WWLUN_ID H/W_Path #_Paths 0/ 0 c58t0d0 6005-08B4-0010-0924-0000-5000-01DC-0000 8255/255/0/0.0Controller Path_Instance HBAPreferred? Path_Status P5849E1AAQ6024 no c44t0d1 td1 no Standby c48t0d1 td1 no Standby c36t0d1 td3 no Standby c40t0d1 td3no Standby Controller Path_Instance HBAPreferred? Path_Status P5849E1AAQ603Y no c46t0d1 td1 YES Active c51t0d1 td1 YES Active c38t0d1 td3 YES Active c42t0d1td3 YES Active # autopath display allHPswsp Version : A.3.0D.00F.00F Details for path : /dev/dsk/c8t0d0Load Balance Policy : No Load Balance=========================================================Device Paths Device Status ==========================================================/dev/dsk/c8t0d0 Active /dev/dsk/c10t0d0 Active /dev/dsk/c14t0d0 Active /dev/dsk/c49t0d0 Active /dev/dsk/c54t0d0 Active /dev/dsk/c56t0d0 Active =========================================================Details for path : /dev/dsk/c8t0d1. . .Verify that Oracle ASM detects all the devices:oracle > export ORACLE_SID=+ASM oracle > sqlplus "/ as sysdba "SQL*Plus: Release 10.1.0.3.0 -. . .. . .SQL > STARTUP NOMOUNT;ASM instance started Total System Global Area 130023424 bytes . . .SQL > S ELECT PATH FROM V$ASM_DISK;PATH —————————————————-/dev/rdsk/c58t0d0/dev/rdsk/c58t0d1/dev/rdsk/c58t0d2/dev/rdsk/c58t0d3/dev/rdsk/c58t0d4. . .Create the ASM disk group for the StorageWorks XP or EVA array as follows:Note that external redundancy is used because the disk groups are created on fault-tolerant arrays.Verify that all the ASM disks were used and initialized by ASM for the disk group as follows:StorageWorks EVASQL> CREATE DISKGROUP EVDG EXTERNAL REDUNDANCY DISK'/dev/rdsk/c58t0d[012345]';Diskgroup created.SQL>SELECT * FROM V$ASM_DISKGROUP WHERE NAME = ’EVDG’;GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE—————— —————————————— ————————————- ————————ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB—————————— ————————————- ——— ————— —————————1 EVDG 1024 40961048576 MOUNTED EXTERN 61440 61380StorageWorks XP SQL>CREATE DISKGROUP XPDG EXTERNAL REDUNDANCY DISK '/dev/rdsk/c8t0d*';Diskgroup created.SQL>SELECT * FROM V$ASM_DISKGROUP WHERE NAME = 'XPDG ';GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE —————— ——————————————————————————— —————- —————ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB ———————————————————————— —————- ——— ————— —————2 XPDG 1024 40961048576 MOUNTED EXTERN 56336 56272StorageWorks EVASQ L>SELECT NAME,DISK_NUMBER,FREE_MB,TOTAL_MB FROM V$ASM_DISKWHERE2GROUP_NUMBER =3 (SELECT GROUP_NUMBER FROM V$ASM_DISKGROUP WHERE NAME = 'EVDG ')4 ORDER BY DISK_NUMBER;NAME DISK_NUMBER FREE_MB TOTAL_MB ——————————————— —————- ————— ——————————————————————EVDG_0000 010231 10240EVDG_0001 110225 10240EVDG_0002 210233 10240EVDG_0003 310229 10240EVDG_0004 410229 10240EVDG_0005 5 10233 10240StorageWorks XP SQL> SELECT NAME,DISK_NUMBER,FREE_MB,TOTAL_MB FROM V$ASM_DISK WHERE 2 GROUP_NUMBER =3 (SELECT GROUP_NUMBER FROM V$ASM_DISKGROUP WHERE NAME = 'XPDG ')4 ORDER BY DISK_NUMBER;NAME DISK_NUMBER FREE_MB TOTAL_MB ———————————————————————————————— —————- ————— —————XPDG_0000 0 7034 7042XPDG_0001 1 7030 7042XPDG_0002 2 7035 7042XPDG_0003 3 7036 7042XPDG_0004 4 7033 7042XPDG_0005 5 7034 7042XPDG_0006 6 7034 7042XPDG_0007 7 7036 7042ASM only supports a single path to any device, although alternate paths must be available for path fail-over. The recommendation for ASM is to enable path fail-over.Oracle DBAs can take advantage ofOracle 10g ASM automatically to balanceOracle workloads without the need for aseparate volume manager. HP tests with Oracleshow that using ASM with HP StorageWorksEVA5000 and XP Arrays enable highavailability while maintaining performance levels.If the disk group is listed in the init+ASM.ora parameter file, ASM will automatically mount the disk group on startup: SQL> SHUTDOWN;ASM diskgroups dismountedASM instance shutdownSQL> STARTUP;ASM instance startedTotal System Global Area 130023424 bytesFixed Size 1296616 bytesVariable Size 128726808 bytesDatabase Buffers 0 bytesRedo Buffers 0 bytesASM diskgroups mountedSQL>SELECT * FROM V$ASM_DISKGROUP ORDER BY GROUP_NUMBER;GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE—————— —— —————————————————————————— ————— —————ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB————————— —————————————— —————- ——— ———————— —————1 EVDG 1024 40961048576 MOUNTED EXTERN 61440 292432 XPDG 1024 40961048576 MOUNTED EXTERN 56336 56272Creating an Oracle RDBMS utilizing ASM for the storageThe special destination of ‘+<diskgroup>’ is used to create files inside ASM from a database perspective. REDO logfiles will also be created on the target destination. For example, the init.ora might be as follows:. . .db_domain=db_name=ASMEVdb_create_file_dest=+EVDGcompatible=10.1.0.2.0control_files=+EVDG/asmev/controlfile/current.257.3,+EVDG/asmev/controlfile/current.256.3. . .Note that if the DBA did not supply the control file names during database creation, they can be obtained from theV$PARAMETER view as in the following example:SELECT CONCAT('CONTROL_FILES=''',CONCAT(REPLACE(VALUE, ', ', ''','''), ''''))CTL_FILES FROM V$PARAMETER WHERE NAME='CONTROL_FILES';To create tablespaces, the same special destination is used:SQL> CREATE TABLESPACE TS_ODS_FACT2 DATAFILE '+EVDG'SIZE 960M REUSE AUTOEXTEND ON3 EXTENT MANAGEMENT LOCAL UNIFORM NOLOGGING;The V$ASM_ALIAS and V$ASM_FILE views can be used to get a list of files and sizes stored inside ASM. Oracle will create ASM aliases for the files listed in the Oracle file map if supplied.SQL>SELECT , F.BYTES, F.SPACE, F.TYPE FROM V$ASM_ALIAS A,V$ASM_FILE F2 WHERE A.GROUP_NUMBER = F.GROUP_NUMBER AND A.FILE_NUMBER =F.FILE_NUMBER;NAME BYTES SPACE TYPE––––––––––––––––––– ––––––––––– ––––––––––––– ––––––––––––––––Current.256.3 2899968 8388608 CONTROLFILECurrent.257.3 2899968 8388608 CONTROLFILESYSTEM.258.3 520101888 522190848 DATAFILEgroup_1.263.3 33555456 41943040 ONLINELOGUSERS.264.3 67117056 68157440 DATAFILETEMP.265.3 268443648 269484032 TEMPFILESYSAUX.266.3 268443648 269484032 DATAFILEgroup_1.267.3 33555456 41943040 ONLINELOGUNDOTBS1.268.3 520101888 522190848 DATAFILEspfile.269.1 3072 1048576 PARAMETERFILEspfileASMEV.ora 3072 1048576 PARAMETERFILEConfiguring archive logs to utilize ASMOracle allows archive logs also to be placed inside ASM. This can be accomplished by setting theLOG_ARCHIVE_DEST init.ora parameter to point to the desired ASM disk group. For example: *.log_archive_dest='+EVDG'Adding a LUN (disk) to an ASM disk groupASM allows the DBA to add and remove disks while the database is open. When storage is added or removed,a REBALANCE operation will typically be triggered unless asm_power_limit=0 or the storage is not used. Theasm_power_limit parameter indicates how aggressive ASM is when REBALANCING with respect to I/O and CPU usage. The value can range from 1 to11 with11 being the most aggressive setting. However, it should be noted that even at the highest setting, the database will still have a higher priority than the rebalancing. Lab testing showed that rebalancing has very low or no impact on database performance.Path fail-over tests for StorageWorks EVA and XP arrays on HP-UXEnvironment•Two physical paths from server to switch and two from switch to StorageWorks array•To force path fail-over, one switch port is forced down, eliminating the physical path to theStorageWorks EVA and XP arrays.Findings•Fail-over was completely transparent to ASM.•Database performance was not affected.•Path restoration is also transparent to ASM.Best practices for using Oracle ASM with HP StorageWorks on HP-UXAs a result of the testing described above, HP has developed a set of best practices for using Oracle ASM with HP StorageWorks.•Configure ASM disk groups to use external redundancy.•When building a disk group or adding to an existing one, use disks of similar capacity and performance characteristics in the same disk group.•To leverage I/O distribution across as many resources as possible, it is best to present more than one LUNto a disk group (allowing ASM to do the striping).•Use HP Secure Path with ASM because it complements the high availability and performance of the entire stack.•Each device (LUN) should be managed either by Oracle ASM or by HP-UX LVM—but not both.•Care should be taken not to attempt inadvertently to manage an ASM disk by a traditional volume manager or vice versa.•Configure async io (Oracle Administration Guide documentation).For more information on using Oracle 10g ASM withHP StorageWorks EVA5000 and XP Disk Arrays, pleasecontact your HP reseller or visit /go/oracle.© Copyright 2005 Hewlett-Packard Development Company, L.P . The information contained herein is subject to changewithout notice. The only warranties for HP products and services are set forth in the express warranty statements accompanyingsuch products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not beliable for technical or editorial errors or omissions contained herein.Oracle is a registered U.S. trademark of Oracle Corporation, Redwood City, California.4AA0-0687ENW, October 2005Oracle ASM and HP LVMWhen using Oracle ASM, there is no need for a separate volume manager. However, ASM can be used with Oracle data only. Therefore, a volume manager and file system is still needed for non-Oracle data.HP Logical Volume Manager (LVM), the default volume manager on HP-UX 11i, is a mature and growing product that is well integrated with HP hardware and software, including all HP storage, ServiceGuard, and SGeRAC. New online features include disable/enable path and deactivate/activate physical volume.Moreover, HP is invested heavily in the LVM lab and has a strong partnership with Veritas also to supply the Veritas CVM and VxVM volume managers.By providing additional volume managers in addition to ASM support, HP is able to meet the broadest possible range of customer needs.Conclusion When following the configuration recommendations provided in this paper, Oracle DBAs can take advantage of Oracle 10g ASM automatically to balance Oracle workloads without the need for a separate volume manager. HP tests with Oracle show that using ASM with HP StorageWorks EVA5000 and XP arrays enable highavailability while maintaining performance levels. Oracle 10g ASM is an efficient way to manage storage for Oracle 10gdatabases.。

Linux下Oracle10g的安装与卸载(全)

Linux下Oracle10g的安装与卸载(全)

Linux下Oracle10g的安装与卸载第一章Oracle 10g的安装 (3)1.1检查硬件环境 (3)1.1.1硬件要求 (3)1.1.2检查内存 (3)1.1.3检查交换分区 (3)1.1.4检查/tmp临时文件夹空闲空间 (3)1.1.5检查磁盘空闲空间大小 (4)1.2检查软件环境 (4)1.2.1软件环境要求 (4)1.2.2检查操作系统型号 (5)1.2.3检查内核型号 (5)1.2.4检查安装Oracle10g必须的操作系统安装包是否安装 (5)1.3创建组和用户 (6)1.3.1 创建oinstall组 (6)1.3.2 创建dba组 (6)1.3.3创建用户名为oracle的用户并将其指派到相应的组 (6)1.3.4修改oracle用户密码 (6)1.3.5 检查确认用户 (6)1.4创建安装目录并修改目录属性 (7)1.4.1创建目录 (7)1.4.2分配组 (7)1.4.3分配权限 (7)1.5修改Linux内核参数 (7)1.5.1 在/etc/sysctl.conf文件中加入下列行 (7)1.5.2 运行以下命令改变核心参数 (8)1.6设置oracle用户限制 (9)1.6.1 在配置文件/etc/security/limits.conf 文件中加入下列行 (9)1.6.2 在/etc/pam.d/login文件中加入下列行 (9)1.7修改host文件及环境变量 (10)1.7.1 修改/etc/hosts文件 (10)1.7.2 修改用户环境变量 (11)1.8开始安装Oracle (12)1.8.1 解压安装包 (12)1.8.2 进入解压目录,安装Oracle (12)1.8.3 指定产品清单目录和身份证明,默认即可,点击下一步 (13)1.8.4 产品特定的先决条件检查,点选用户已验证然后点击下一步即可 (14)1.8.5 安装 (15)1.8.6 执行配置脚本 (16)1.8.7 安装完毕退出 (17)第二章配置监听及建库 (18)2.1配置监听器 (18)2.1.1在终端输入如下命令调用网络配置助手 (18)2.1.2添加监听程序 (19)2.1.3为监听起名 (19)2.1.4选择协议TCP (20)2.1.5配置端口,默认为1521 (20)2.1.6是否配置另一个监听,如果不配置选择否 (21)2.1.7完成监听配置,点击下一步退出 (21)2.2创建数据库 (22)2.2.1使用dbca命令调用oracle数据库配置助手进行图形建库 (22)2.2.2创建数据库 (23)2.2.3选择模板为一般用途创建数据库 (23)2.2.4为数据库实例起名 (24)2.2.5选择使用企业管理器管理数据库 (24)2.2.6设置数据库密码 (25)2.2.7选择数据库存储机制 (25)2.2.8指定数据库创建位置 (26)2.2.9.指定闪恢区位置及大小 (26)2.2.10.是否添加实例方案 (27)2.2.11设置oracle相关参数,这里主要设置字符集 (27)2.2.12.数据库的存储配置 (28)2.2.13选择创建数据库选项,如保存模板和脚本可进行点选 (28)2.2.14点击确定开始创建 (29)2.2.15口令管理 (29)第三章Oracle 10g的卸载 (30)3.1图形卸载Oracle (30)3.1.1切换目录到安装介质的根目录执行./runInstaller命令或切换到$ORACLE_HOME/oui/bin目录下执行./runInstaller脚本 (30)3.1.2卸载产品 (31)3.1.3确认卸载产品 (32)3.1.4卸载完成后点击关闭窗口 (33)3.1.5删除相关目录及文件 (34)3.2手工卸载数据库 (34)3.2.1.使用SQL*PLUS关闭数据库 (34)3.2.2.停止监听程序 (34)3.2.3停止HTTP服务 (34)3.2.4 su到root用户删除安装目录 (35)3.2.5删除/usr/local/bin下的文件 (35)3.2.6.将/etc/ora*删除 (35)3.2.7将/etc/inittab.cssd删除 (35)3.2.8将oracle用户删除(若要重新安装,可以不删除) (35)3.2.9将用户组删除(若要重新安装,可以不删除) (35)3.2.10修改内核参数 (35)第一章Oracle 10g的安装1.1检查硬件环境1.1.1硬件要求内存至少512M交换分区至少1G/tmp 至少400M磁盘空闲空间至少4G1.1.2检查内存# grep MemTotal /proc/meminfo1.1.3检查交换分区# grep SwapTotal /proc/meminfo1.1.4检查/tmp临时文件夹空闲空间# df –h /tmp1.1.5检查磁盘空闲空间大小# df –h1.2检查软件环境1.2.1软件环境要求操作系统:Red Hat Enterprise Linux AS/ES 3.0(Update 4 or later)内核:至少2.4.21-27.EL 内核软件包:❖binutils-2.15.92.0.2-13.EL4❖compat-db-4.1.25-9❖compat-libstdc++-296-2.96-132.7.2❖gcc-3.4.3-22.1.EL4❖gcc-c++-3.4.3-22.1.EL44❖glibc-2.3.4-2.9❖glibc-common-2.3.4-2.9❖gnome-libs-1.4.1.2.90-44.1❖libstdc++-3.4.3-22.1❖libstdc++-devel-3.4.3-22.1❖make-3.80-5❖pdksh-5.2.14-30❖setarch-1.6-11.2.2检查操作系统型号# cat /etc/issue1.2.3检查内核型号# uname –r1.2.4检查安装Oracle10g必须的操作系统安装包是否安装# rpm -qa |grep package_name#rpm –qa|grep binutils-2.15.92.0.2-13.EL4#rpm –qa|grep compat-db-4.1.25-9#rpm –qa|grep compat-libstdc++-296-2.96-132.7.2#rpm –qa|grep gcc-3.4.3-22.1.EL4#rpm –qa|grep gcc-c++-3.4.3-22.1.EL44#rpm –qa|grep glibc-2.3.4-2.9#rpm –qa|grep glibc-common-2.3.4-2.9#rpm –qa|grep gnome-libs-1.4.1.2.90-44.1#rpm –qa|grep libstdc++-3.4.3-22.1#rpm –qa|grep libstdc++-devel-3.4.3-22.1#rpm –qa|grep make-3.80-5#rpm –qa|grep pdksh-5.2.14-30#rpm –qa|grep setarch-1.6-1#rpm –qa|grep libXp-1.0.0-8.1.el5.i386.rpm备注:如果按装了系统会显示出包名称,如果没有安装则什么也不显示,可以使用rpm –ivh package_name(包名)的命令安装。

HP-UXServiceguard基本除错工具和方法

HP-UXServiceguard基本除错工具和方法

HP-UXServiceguard基本除错工具和方法HP-UX Serviceguard 基本除錯工具和方法HP 諮詢中心技術經理孫瑞貞文Serviceguard 基本上可以偵測三類問題:I.Node 發生問題以下是幾種 Serviceguard 可以偵測到的 Node 問題:1.系統當機自動重起2.部份硬體故障3.系統鎖住無法運作II.網路發生問題以下是幾種 Serviceguard 可以偵測到的網路問題:1.INTERFACE 介面卡?壞2.網路線斷線,或無法提供功能III.服務發生問題:是指特定的 Process 不正常結束一般而言,Process 可以被重新啟動。

磁碟故障可以經由底層的Volume managers 偵測到,或由磁碟陣列偵測到,而發出警訊。

erviceguard 本身所啟動的 daemon process 是以 cm 為開頭的名字。

以下是幾種 Serviceguard 的 daemon ,提供您參考:Cluster daemon: cmcldService Assistant Daemon: cmsrvassistdSyslog Log Daemon: cmlogdCluster Logical Volume Manager Daemon: cmlvmdConfiguration Daemon: cmclconfdCluster SNMP Agent Daemon: cmsnmpdAdvanced Tape Services Daemon: cmtapedCluster Network Assist Daemon: cmnetassistdCluster File Assist Daemon: cmfileassistdCluster Object Manager Daemon: cmomd接下來介紹幾種 HP 有支援的 Serviceguard 除錯工具,提供您參考:I.cmscancl :可以收集Serviceguard 的相關設定,首先得把 .rhost 設定所有的Nodes 名字才可以執行。

HPserviceguard

HPserviceguard

HPserviceguard Service Guard Serviceguard是HP-UX的cluster service 集群服务软件,通过Serviceguard可以搭建⾼可⽤集群,拥有了软硬件的⾼度冗余,避免了节点级的单点故障。

名词解释: 活动节点:在 Serviceguard 群集中运⾏的任何主机系统都称为活动节点 主节点:指定要启动故障切换程序包的节点叫主节点 代管节点:还需要指定⼀个或多个其他节点,这些节点称为代管节点 Serviceguard 守护程序 Serviceguard 使⽤下列守护程序: /usr/lbin/cmclconfd - Serviceguard 配置守护程序 /usr/lbin/cmcld - Serviceguard 群集守护程序 /usr/lbin/cmfileassistd - Serviceguard ⽂件管理守护程序 /usr/lbin/cmlogd - Serviceguard Syslog ⽇志守护程序 /usr/lbin/cmlvmd -群集逻辑卷管理器守护程序 /opt/cmom/lbin/cmomd -群集对象管理器守护程序 /usr/lbin/cmsnmpd -群集 SNMP ⼦代理(可以选择运⾏) /usr/lbin/cmserviced - Serviceguard 服务助⼿守护程序 /usr/lbin/qs - Serviceguard Quorum Server 守护程序 /usr/lbin/cmnetd - Serviceguard Network Manager 守护程序 /usr/lbin/cmvxd - Serviceguard - Veritas 成员协调守护程序(仅当安装了 Veritas CFS 时才会存在) /usr/lbin/cmvxpingd - Serviceguard - Veritas 激活守护程序(仅当安装了 Veritas CFS 时才会存在) /usr/lbin/cmdisklockd -锁定 LUN 守护程序 /usr/lbin/cmlockd -实⽤守护程序 /opt/sgproviders/bin/cmwbemd - WBEM 守护程序 /usr/lbin/cmproxyd -代理守护程序 上述各个守护程序均将⽇志记录到 /var/adm/syslog/syslog.log ⽂件中,但 /opt/cmom/ lbin/cmomd 守护程序除外,它将⽇志记录到 /var/opt/cmom/cmomd.log 中。

HP-UX下ServiceGuard配置实例

HP-UX下ServiceGuard配置实例

1.5 配置实例1.5.1 先决条件1.5.2 设置主cell 服务器1.5.3 设置辅cell 服务器1.5.4 创建集群配置文件1.5.5 创建软件包配置文件1.5.6 创建软件包控制脚本1.5.7 将配置应用于集群1.5.8 启动集群,检查软件包状态1.5 配置实例--------------------为阐明概念,我们将定义一个非常简单的、具有两个结点和一个共享磁盘的集群的配置实例,我们将只配置一个ServiceGuard软件包,它是共享磁盘上的OmniBack cell服务器。

下面列出的命令与这个配置实例有关,应当根据您具体的环境进行修改。

+-----+ +-----+| | | |vg00---| pri |---------vgshared---------| sec |---vg00c2t6d0 | | c1t1d0 c0t1d0 | | c1t6d0+-----+ +-----+| | | ||15.136.123.211(floatingIP) | ||15.136.123.209 |15.136.123.210---------+-|--------------+---------------+-|---------|192.1.1.1 网桥|192.1.1.2-----------+--------------+-----------------+---------主cell 服务器主机名: 15.136.123.209辅cell 服务器主机名: 15.136.123.210移动cell 服务器主机名: 15.136.123.211子网: 15.136.120.0OB cell 服务器软件包名: ob2软件包内的服务器名: ob2mon1.5.1 先决条件-------------在配置ServiceGuard 之前必须存在具备下列先决条件:- 主、辅主机上已安装OmniBack- 主、辅主机上已安装ServiceGuard- 至少有一个共享磁盘,确保共享总线上的SCSI 卡地址不冲突。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

# Warning: There are no standby network interfaces for lan0.
NODE_NAME hp2 NETWORK_INTERFACE lan0 HEARTBEAT_IP 135.160.10.2 NETWORK_INTERFACE lan1 HEARTBEAT_IP 10.0.0.2 # CLUSTER_LOCK_LUN FIRST_CLUSTER_LOCK_PV /dev/dsk/c4t0d0 SECOND_CLUSTER_LOCK_PV /dev/dsk/c5t0d0 NODE_TIMEOUT 5000000 VOLUME_GROUP /dev/oradatavg VOLUME_GROUP /dev/vg01 VOLUME_GROUP /dev/vg02 (参考oraha文件)
修改一下行 PACKAGE_NAME oracle PACKAGE_TYPE FAILOVER NODE_NAME hp1 NODE_NAME hp2 RUN_SCRIPT /etc/cmcluster/oracle/oracle.sh HALT_SCRIPT /etc/cmcluster/oracle/oracle.sh SCRIPT_LOG_FILE /etc/cmcluster/oracle/oracle.sh.log (参考oracle.conf文件)
配置SG
指定集群节点和生成集群配置模版文件 #cmquerycl –v –C /etc/cmcluster/oraha –n hp1 –n hp2 #vi /etc/cmcluster/oraha
编辑oraha文件
CLUSTER_NAME cluster1 FIRST_CLUSTER_LOCK_VG /dev/vg01 SECOND_CLUSTER_LOCK_VG NODE_NAME hp1 NETWORK_INTERFACE lan0 HEARTBEAT_IP 135.160.10.1 NETWORK_INTERFACE lan1 HEARTBEAT_IP 10.0.0.1 # CLUSTER_LOCK_LUN FIRST_CLUSTER_LOCK_PV /dev/dsk/c4t0d0 SECOND_CLUSTER_LOCK_PV /dev/dsk/c5t0d0 /dev/vg02
创建、编辑程序包控制脚本
#cmmakepkg –s /etc/cmcluster/oracle/oracle.sh #vi /etc/cmcluster/oracle/oracle.sh 修改一下行 VGCHANGE="vgchange -a e" # Default CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=exclusivewrite“ VG[0]="oradatavg“ LV[0]="/dev/oradatavg/lvoradata"; FS[0]="/oradata"; FS_MOUNT_OPT[0]="-o rw"; FS_UMOUNT_OPT[0]=""; FS_FSCK_OPT[0]="" FS_TYPE[0]="vxfs“ IP[0]="135.160.10.5" SUBNET[0]="135.160.10.0“ function customer_defined_run_cmds { # ADD customer defined run commands. : # do nothing instruction, because a function must contain some command. /etc/cmcluster/oracle/oraclestart.sh test_return 51 } # This function is a place holder for customer define functions. # You should define all actions you want to happen here, after the service is # halted. function customer_defined_halt_cmds { # ADD customer defined halt commands. : # do nothing instruction, because a function must contain some command. /etc/cmcluster/oracle/oraclestop.sh test_return 52 }
编辑hosts文件
#vi /etc/hosts 127.0.0.1 localhost loopback 135.160.10.1 hp1 10.0.0.1 hp1_heart 135.160.10.2 hp2 10.0.0.2 hp2_heart 135.160.10.5 hp
在hห้องสมุดไป่ตู้1和hp2中分别安装 servicesguard软件
磁盘分布状态
[091926]# ioscan -kfnC disk [091926]Class I H/W Path Driver S/W State H/W Type Description [091926]=================================================================== ========= [091926]disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N [091926] /dev/dsk/c0t0d0 /dev/rdsk/c0t0d0 [091926]disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE COMPAQ BF14684970 [091926] /dev/dsk/c2t0d0 /dev/rdsk/c2t0d0 [091926] /dev/dsk/c2t0d0s1 /dev/rdsk/c2t0d0s1 [091926] /dev/dsk/c2t0d0s2 /dev/rdsk/c2t0d0s2 [091926] /dev/dsk/c2t0d0s3 /dev/rdsk/c2t0d0s3 [091926]disk 2 255/0/0.0.0.0 sdisk CLAIMED DEVICE ROCKET IMAGEFILE [091926] /dev/dsk/c4t0d0 /dev/rdsk/c4t0d0 [091926]disk 3 255/0/2.0.0.0 sdisk CLAIMED DEVICE ROCKET IMAGEFILE [091926] /dev/dsk/c5t0d0 /dev/rdsk/c5t0d0 [091926]disk 4 255/0/3.0.0.0 sdisk CLAIMED DEVICE ROCKET IMAGEFILE [091926] /dev/dsk/c6t0d0 /dev/rdsk/c6t0d0
复制锁盘到hp2(02)
在hp2上执行 #cd /dev #mkdir vg01 #mkdir vg02 #ls /dev/*/group #mknod /dev/vg01/group c 64 0x020000 #mknod /dev/vg02/group c 64 0x030000 (需要与hp1一致)
HPUX11.23_oracle10g_servicegu ard
环境:系统-HPUX11.23 数据库-oracle10.2.0.1 双机软件-servicesguard 虚拟存储-starwind 俩个锁盘vg01、vg02 一个数据文件卷组oradatavg Oracle数据库已经安装在系统中, 软件目录在本地磁盘中,数据库文 件在oradatavg中
SG集群应用
运行集群 #cmruncl –v 查看集群状态 #cmviewcl –v 停用集群 #cmhaltcl –f –v
[112159]CLUSTER STATUS [112159]cluster1 up [112159] [112159] NODE STATUS STATE [112159] hp1 up running [112159] [112159] Cluster_Lock_LVM: [112159] VOLUME_GROUP PHYSICAL_VOLUME STATUS [112159] /dev/vg01 /dev/dsk/c4t0d0 up [112159] /dev/vg02 /dev/dsk/c5t0d0 up [112159] [112159] Network_Parameters: [112159] INTERFACE STATUS PATH NAME [112159] PRIMARY up 0/1/2/0 lan0 [112159] PRIMARY up 0/1/2/1 lan1 [112159] [112159] NODE STATUS STATE [112159] hp2 up running [112159] [112159] Cluster_Lock_LVM: [112159] VOLUME_GROUP PHYSICAL_VOLUME STATUS [112159] /dev/vg01 /dev/dsk/c4t0d0 up [112159] /dev/vg02 /dev/dsk/c5t0d0 up [112159] [112159] Network_Parameters: [112159] INTERFACE STATUS PATH NAME [112159] PRIMARY up 0/1/2/0 lan0 [112159] PRIMARY up 0/1/2/1 lan1
创建锁盘
#pvcreate #vgcreate #pvcreate #vgcreate /dev/rdsk/c4t0d0 vg01 /dev/dsk/c4t0d0 /dev/rdsk/c5t0d0 vg02 /dev/dsk/c5t0d0
相关文档
最新文档