- 最后登录
- 2014-1-27
- 在线时间
- 37 小时
- 威望
- 45
- 金钱
- 456
- 注册时间
- 2012-5-4
- 阅读权限
- 10
- 帖子
- 45
- 精华
- 1
- 积分
- 45
- UID
- 403
|
1#
发表于 2012-5-25 13:44:36
|
查看: 5864 |
回复: 4
A机器:oracle 11.2.0.1.0 rhel 5.4 使用ASM存储 IP 192.168.8.13
B机器:oracle 11.2.0.1.0 rhel 5.4 使用文件系统存储 IP 192.168.8.11
现在的情况是:
A上只安装了ORACLE 软件,没建立库,在grid用户下建立了ASM磁盘组+DATA ;B上安装了ORACLE软件,并建立了g_chris的库,实例名为chris,并开启了归档
目的:
将B机器上的g_chris库迁移到A机器上。
步骤:
A机器上配置:
[oracle@master admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER_F =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = master.wonder.com)(PORT = 1521))
)
)
ADR_BASE_LISTENER_F = /u01/app
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = g_chris)
(ORACLE_HOME = /u01/app/oracle)
(SID_NAME = chris)
)
)
[oracle@master admin]$ cat tnsnames.ora
g_chris =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = master.wonder.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = g_chris)
)
)
T_filesystem=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.8.11)(PORT = 1521))
)
(CONNECT_DATA =
(SID = chris)
(SERVER = DEDICATED)
)
)
[oracle@master dbs]$ cat initchris.ora
DB_NAME=g_chris
db_file_name_convert = ('/u01/app/oradata/g_chris/','+DATA')
log_file_name_convert = ('/u01/app/oradata/g_chris/','+DATA')
B机器上:
[oracle@filesystem admin]$ cat tnsnames.ora
g_chris =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = filesystem.wonder.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = g_chris)
)
)
T_master=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.8.13)(PORT = 1521))
)
(CONNECT_DATA =
(SID = chris)
(SERVER = DEDICATED)
)
)
现在在A机器上通过网络直接复制B机器上g_chris库到A机器上:
[oracle@master ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 25 13:37:52 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile=/u01/app/oracle/dbs/initchris.ora
ORACLE instance started.
Total System Global Area 146472960 bytes
Fixed Size 1335080 bytes
Variable Size 92274904 bytes
Database Buffers 50331648 bytes
Redo Buffers 2531328 bytes
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@master ~]$ rman target [email=sys/sysoracle@t_filesystem]sys/sysoracle@t_filesystem[/email] auxiliary [email=sys/sysoracle@g_chris]sys/sysoracle@g_chris[/email]
Recovery Manager: Release 11.2.0.1.0 - Production on Fri May 25 13:38:38 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: G_CHRIS (DBID=1374986122)
connected to auxiliary database: G_CHRIS (not mounted)
RMAN> duplicate target database to g_chris from active database;
Starting Duplicate Db at 25-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK
contents of Memory Script:
{
sql clone "create spfile from memory";
}
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 146472960 bytes
Fixed Size 1335080 bytes
Variable Size 92274904 bytes
Database Buffers 50331648 bytes
Redo Buffers 2531328 bytes
contents of Memory Script:
{
sql clone "alter system set db_name =
''G_CHRIS'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''G_CHRIS'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
backup as copy current controlfile auxiliary format '/u01/app/oracle/dbs/cntrlchris.dbf';
alter clone database mount;
}
executing Memory Script
sql statement: alter system set db_name = ''G_CHRIS'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''G_CHRIS'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 146472960 bytes
Fixed Size 1335080 bytes
Variable Size 92274904 bytes
Database Buffers 50331648 bytes
Redo Buffers 2531328 bytes
Starting backup at 25-MAY-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=46 device type=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/u01/app/oracle/dbs/snapcf_chris.f tag=TAG20120525T133917 RECID=6 STAMP=784215558
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 25-MAY-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/25/2012 13:39:18
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-00205: error in identifying control file, check alert log for more info
RMAN>
告警日志:
................
RECO started with pid=14, OS id=4542
Fri May 25 13:39:16 2012
MMON started with pid=15, OS id=4544
Fri May 25 13:39:16 2012
MMNL started with pid=16, OS id=4546
ORACLE_BASE from environment = /u01/app
Fri May 25 13:39:18 2012
alter database mount
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/dbs/cntrlchris.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-205 signalled during: alter database mount...
说明:B机器上确实产生了/u01/app/oracle/dbs/cntrlchris.dbf这个文件,但没传输到A机器上,导致mount时找不到控制文件?请问我上面的步骤问题出在哪里?
[ 本帖最后由 wonder 于 2012-5-25 15:50 编辑 ] |
|