总算回来了。今天讲述数据库快速复制第二章。
一:首先准备一台服务器A,里面安装了callcenter数据库
二:再准备第二台服务器B,里面安装了aaa数据库
三:目的,将A的callcenter数据库复制到服务器B去,使得服务器B启动oracle就可以启动callcenter数据库跟aaa数据库。
方法如下:
一:进入到数据库服务器A
[root@learnin9_callcenter oradata]# pwd
/var/oracle/app/oracle/oradata
[root@learnin9_callcenter oradata]# ls
callcenter
[root@learnin9_callcenter oradata]# tar cvzf oradata.callcenter.tar.gz ./callcenter (将callcenter目录打包)
二:进入到数据库服务器A
[root@learnin9_callcenter admin]# pwd
/var/oracle/app/oracle/admin
[root@learnin9_callcenter admin]# ls
callcenter
[root@learnin9_callcenter oradata]# tar cvzf admin.callcenter.tar.gz ./callcenter (将callcenter目录打包)
三:注意打包的文件所放的各自目录
将以上两个压缩的文件oradata.callcenter.tar.gz admin.callcenter.tar.gz SCP到数据库服务器B的各自目录。然后tar -xvzf 解压缩 (这些不再烦述)
四:修改oracle 8i的监听文件
[root@learnin9_callcenter admin]# pwd
/var/oracle/app/oracle/product/8.1.7/network/admin
[root@learnin9_callcenter admin]#vi listener.ora
# LISTENER.ORA Network Configuration File: /var/oracle/app/oracle/product/8.1.7/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
)
(DESCRIPTION =
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
)
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 2481))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /var/oracle/app/oracle/product/8.1.7)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = callcenter)
(ORACLE_HOME = /var/oracle/app/oracle/product/8.1.7)
(SID_NAME = callcenter)
)
(SID_DESC =
(GLOBAL_DBNAME = aaa)
(ORACLE_HOME = /var/oracle/app/oracle/product/8.1.7)
(SID_NAME = aaa)
)
)
修改tnsnames文件属性,增加callcenter数据库监听配置
[root@learnin9_callcenter admin]#vi tnsnames.ora
CALLCENTER.LOCALDOMAIN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = callcenter)
)
)
AAA.LOCALDOMAIN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = aaa)
)
)
INST1_HTTP.LOCALDOMAIN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = aaa)
(PRESENTATION = )
)
)
EXTPROC_CONNECTION_DATA.LOCALDOMAIN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
五:修改完毕后,然后lsnrctl start,不过要注意先stop哦,然后再start
六:最为重要的一点要记住,启动这两个数据库之前,一定要先去这个目录看看文件
[root@learnin9_callcenter dbs]# pwd
/var/oracle/product/8.1.7/dbs
[root@learnin9_callcenter dbs]# ls
[root@learnin9_callcenter dbs]# ls -al
total 44
drwxr-xr-x 2 oracle dba 4096 Apr 17 16:24 .
drwxr-xr-x 39 oracle dba 4096 Apr 29 2003 ..
lrwxrwxrwx 1 oracle dba 47 Jan 3 18:06 initBilling.ora -> /var/oracle/admin/aaa/pfile/initaaa.ora
-rw-r--r-- 1 oracle dba 9219 Oct 22 1999 initdw.ora
-rw-r--r-- 1 oracle dba 8385 Oct 22 1999 init.ora
lrwxrwxrwx 1 oracle dba 47 Apr 17 15:51 initwebcall.ora -> /var/oracle/admin/callcenter/pfile/initwebcall.ora (自己创建一个链接)
-rw-rw---- 1 oracle dba 24 Apr 17 14:42 lkaaa
-rw-rw---- 1 oracle dba 24 Apr 17 16:23 lkcallcenter (这个文件是oracle的callcenter启动后的产生的文件,相当于某个进程的pid文件,主要这个文件不要copy过来,否则会无法启动)
-rwSr----- 1 oracle dba 1536 Apr 29 2003 orapwaaa
-rwSr----- 1 oracle dba 1536 Apr 29 2003 orapwcallcenter (callcenter的passwd文件,copy过来,如果不能用,可以先start force后修改passwd,产生一个passwd文件)
阅读(9005) | 评论(0) | 转发(0) |