第三章 ORACLE双机的安装
1、 建议在节点1和节点2群集服务安装完成后,进行双机的切换试验(移动组、拔网线、断电),确认群集正常后,再安装ORACLE。
2、 启动节点1,在节点1上安装oracle数据库软件。
3、 进入oracle安装界面,选择自定义安装,选择oracle主目录名称OraHome81,路径为d:\oracle\ora81。
4、 选择安装组件时,选择除HttpServer以外所有组件。
5、 建立数据库,选择不创建数据库。
6、 设置NET8,监听服务定为LISTENER
7、 节点1安装完成。
8、 在节点2上按照3-7的步骤执行安装。
9、 两台机器都安装成功后,分别都在控制面板中将相关oracle服务全改为手动。
10、 确认磁盘阵列所有权在节点2。
11、 在节点2上,使用数据库助手创建数据库。开始菜单-》oracle-》数据库管理-》数据库安装助手,执行数据库安装助手程序。
12、 在安装过程中,选择定制安装,数据库名及SID定为: CSZLS,数据库字符集定为:WE8ISO8859P1。将所有的路径都指向共享磁盘E盘。安装完成后,在控制面板中将其服务器改为手动。
13、 在节点2上,打开群集管理器,创建IP地址资源。
1、创建 IP 地址资源:
A. 选择“文件”“新建”“资源”。
B. 在以下域输入信息:
域名 样例
名称 vip
描述 Oracle服务器的 IP 地址
资源类型 IP 地址
群组 Cluster 资源群组
可以在线获取其中资源的节点 Cluster-A,Cluster-B
在此资源处于在线状态之前必须处于在线状态的其他资源 NONE
在此资源处于在线状态之前必须处于在线状态的其他资源 NONE
地址 192.168.0.4
子网掩码 255.255.255.0
将使用的网络 PUBLIC NETWORK
注意:不要选中标记为“在单独的资源监控器运行此资源”的复选框。当选择此框时,MSCS 将使用其他的系统资源而不会带来额外的益处。
C. 单击“完成”。
14、 停止两个节点所有的ORACLE服务。
15、 在节点2上编辑Listener.ora、snmp_ro.ora、 snmp_rw.ora、 tnsnames.ora文件(路径为D:\ORACLE\ORA81\Network\admin\)。把SERVER和HOST名为本地服务器的都改为上一步所建的虚拟IP地址(192.168.0.4)。
16、 在节点2修改d:\oracle\admin\network\sqlnet.ora文件
SQLNET.AUTHENTICATION-SERIVES=(NONE).
17、 将节点2的d:\oracle\ora81\network\admin目录下所有文件复制到节点1的d:\oracle\ora81\network\admin目录下。
18、 将节点2的d:\oracle\ora81\database目录下initCSZLS.ora复制到节点1的相应目录下
19、 将节点2的d:\oracle\admin目录下CSZLS目录复制到节点1的d:\oracle\admin目录下
20、 在节点1启动侦听服务,并建数据库服务。
在命令行输入如下:
C:\>SET ORACLE_SID=CSZLS
C:\>oradim –new –sid CSZLS –intpwd oracle –startmode auto –pfile E:\oracle\admin\CSZLS\pfile\initCSZLS.ora
其中:
-sid 为全局数据库名
-intpwd 为指定internal的口令为oracle
-startmode 指定启动方式为auto
-pfile 指定初始化文件路径,本例中E为共享盘
21、 在MSCS里面增添oracleorahome8tnslistener和oracleserviceoracledb服务,依赖关系中都将磁盘、IP地址、服务器名称加进去。
22、 通过双机切换,看在MSCS里面增添oracleorahome8tnslistener和oracleserviceCSZLS服务是否运行正常。
23、 在局域网内其他机器建立ORACLE本地服务命名,并连接数据库,如能正常操作,表明ORACLE数据库安装完成。
24、 添加表空间WATER,数据文件大小 1700M。
25、 切换数据库到归档方式。
第四章 数据库参数
db_name = "CSZLS"
instance_name = CSZLS
service_names = CSZLS
db_files = 1024
control_files = ("e:\oradata\CSZLS\control01.ctl", "e:\oradata\CSZLS\control02.ctl", "e:\oradata\CSZLS\control03.ctl")
open_cursors = 300
max_enabled_roles = 30
db_file_multiblock_read_count = 8
db_block_buffers = 43818
shared_pool_size = 119653478
large_pool_size = 614400
java_pool_size = 20971520
log_checkpoint_interval = 10000
log_checkpoint_timeout = 1800
processes = 150
parallel_max_servers = 5
log_buffer = 32768
#audit_trail = true # if you want auditing
#timed_statistics = true # if you want timed statistics
max_dump_file_size = 10240 # limit trace file size to 5M each
# Uncommenting the line below will cause automatic archiving if archiving has
# been enabled using ALTER DATABASE ARCHIVELOG.
log_archive_start = true
# log_archive_dest_1 = "location=d:\oracle\oradata\CSZLS\archive"
log_archive_dest = E:\oradata\CSZLS\arch
log_archive_format = %%ORACLE_SID%%T%TS%S.ARC
# If using private rollback segments, place lines of the following
# form in each of your instance-specific init.ora files:
#rollback_segments = ( RBS0, RBS1, RBS2, RBS3, RBS4, RBS5, RBS6 )
# Global Naming -- enforce that a dblink has same name as the db it connects to
global_names = true
# Uncomment the following line if you wish to enable the Oracle Trace product
# to trace server activity. This enables scheduling of server collections
# from the Oracle Enterprise Manager Console.
# Also, if the oracle_trace_collection_name parameter is non-null,
# every session will write to the named collection, as well as enabling you
# to schedule future collections from the console.
# oracle_trace_enable = true
oracle_trace_collection_name = ""
# define directories to store trace and alert files
background_dump_dest = d:\oracle\admin\CSZLS\bdump
#Uncomment this parameter to enable resource management for your database.
#The SYSTEM_PLAN is provided by default with the database.
#Change the plan name if you have created your own resource plan.# resource_manager_plan = system_plan
user_dump_dest = d:\oracle\admin\CSZLS\udump
db_block_size = 8192
remote_login_passwordfile = exclusive
os_authent_prefix = ""
# The following parameters are needed for the Advanced Replication Option
job_queue_processes = 4
job_queue_interval = 60
open_links = 4
distributed_transactions = 10
mts_dispatchers = "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)"
# Uncomment the following line when your listener is configured for SSL
# (listener.ora and sqlnet.ora)
# mts_dispatchers = "(PROTOCOL=TCPS)(PRE=oracle.aurora.server.SGiopServer)"
compatible = 8.1.0
sort_area_size = 65536
sort_area_retained_size = 65536
第五章 数据库控制文件
数据库控制文件参数如下,并可以用以下脚本重建:
*** SESSION ID:(13.195) 2002-12-25 12:59:41.210
*** 2002-12-25 12:59:41.210
# The following commands will create a new control file and use it
# to open the database.
# Data used by the recovery manager will be lost. Additional logs may
# be required for media recovery of offline data files. Use this
# only if the current version of all online logs are available.
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "CSZLS" NORESETLOGS ARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 254
MAXINSTANCES 1
MAXLOGHISTORY 1815
LOGFILE
GROUP 1 'E:\ORADATA\CSZLS\REDO01.LOG' SIZE 1M,
GROUP 2 'E:\ORADATA\CSZLS\REDO02.LOG' SIZE 1M,
GROUP 3 'E:\ORADATA\CSZLS\REDO03.LOG' SIZE 1M
DATAFILE
'E:\ORADATA\CSZLS\SYSTEM01.DBF',
'E:\ORADATA\CSZLS\RBS01.DBF',
'E:\ORADATA\CSZLS\USERS01.DBF',
'E:\ORADATA\CSZLS\TEMP01.DBF',
'E:\ORADATA\CSZLS\TOOLS01.DBF',
'E:\ORADATA\CSZLS\INDX01.DBF',
'E:\ORADATA\CSZLS\DR01.DBF',
'E:\ORADATA\CSZLS\WATER.ORA'
CHARACTER SET WE8ISO8859P1
;
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
RECOVER DATABASE
# All logs need archiving and a log switch is needed.
ALTER SYSTEM ARCHIVE LOG ALL;
# Database can now be opened normally.
ALTER DATABASE OPEN;
# No tempfile entries found to add.
#