Oracle数据库挂载文件

时间:2018-07-04 05:53:34

标签: oracle import oracle11g sap database-administration

我们当前正在不同服务器上进行SAP oracle 11g数据库导入。 客户给了我们控制文件,数据库文件,重做日志文件。

遵循的步骤: 1)用相同的名称创建新数据库。

2)复制了所有控制文件,DB文件和重做日志文件。

3)用客户端控制文件名修改了init.ora文件。

4)更改数据库安装: enter image description here

5)使用DB文件创建新的控制文件,请使用create control file命令:

CREATE CONTROLFILE REUSE DATABASE "<DBNAME>" NORESETLOGS ARCHIVELOG
    MAXLOGFILES 20
    MAXLOGMEMBERS 5
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 (
    'C:\app\Orcldba\oradata\oraredo2\<DBNAME>\redo01a.log',
    'C:\app\Orcldba\oradata\oraredo2\<DBNAME>\redo01b.log'
  ) SIZE 50M ,
  GROUP 2 (
    'C:\app\Orcldba\oradata\oraredo2\<DBNAME>\redo02a.log',
    'C:\app\Orcldba\oradata\oraredo2\<DBNAME>\redo02b.log'
  ) SIZE 50M ,
  GROUP 3 (
    'C:\app\Orcldba\oradata\oraredo2\<DBNAME>\redo03a.log',
    'C:\app\Orcldba\oradata\oraredo2\<DBNAME>\redo03b.log'
  ) SIZE 50M 
-- STANDBY LOGFILE
DATAFILE
  'C:\app\Orcldba\oradata\<DBNAME>\system01.dbf',
  'C:\app\Orcldba\oradata\<DBNAME>\undotbs01.dbf',
  'C:\app\Orcldba\oradata\<DBNAME>\sysaux01.dbf',
  'C:\app\Orcldba\oradata\<DBNAME>\users01.dbf',
  'C:\app\Orcldba\oradata\<DBNAME>\<DBFILENAME>.dbf',
  'C:\app\Orcldba\oradata\<DBNAME>\<DBFILENAME>.dbf',
  'C:\app\Orcldba\oradata\<DBNAME>\<DBFILENAME>.dbf',
  'C:\app\Orcldba\oradata\<DBNAME>\<DBFILENAME>.dbf'
CHARACTER SET KO16KSC5601
;

enter image description here

找不到来自Google的任何帮助。

1 个答案:

答案 0 :(得分:0)

问题是新数据库的原始数据库的硬件平台不同。要在需要访问源服务器的平台之间迁移,必须使用RMAN运行跨平台数据库迁移。 我尝试从Oracle 10.2.0.4 Oracle Linux 32上的Oracle 10.2.0.4 Solaris 10 Sparc 64进行测试迁移,并且得到了类似的错误。

SELECT A.platform_id, A.platform_name, B.endian_format 
FROM v$database A, v$transportable_platform B 
WHERE B.platform_id (+) = A.platform_id;

-bash-3.00$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 5 07:57:44 2018

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set linesize 1000
SQL>
SELECT A.platform_id, A.platform_name, B.endian_format
FROM v$database A, v$transportable_platform B
WHERE B.platform_id (+) = A.platform_id;SQL>   2    3

PLATFORM_ID PLATFORM_NAME                                    ENDIAN_FORMAT
----------- --------------------------------------------- --------------
          2 Solaris[tm] OE (64-bit)                              Big

SQL>


[oracle10@aktp ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 5 08:01:53 2018

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>  set linesize 1000
SQL> SELECT A.platform_id, A.platform_name, B.endian_format
FROM v$database A, v$transportable_platform B
WHERE B.platform_id (+) = A.platform_id;  2    3

PLATFORM_ID PLATFORM_NAME                                   ENDIAN_FORMAT
----------- -------------------------------------------- --------------
         10 Linux IA (32-bit)                                  Little

遵循的步骤:

1)复制了所有控制文件,数据库文件和重做日志文件。

2)修改了带有客户端控制文件名的init.ora文件。

3)更改数据库安装:

ORA-00202:controlfile:[/oracle/app/oracle/oradata/ST01/o1_mf_488h0hfl_.ctl]
ORA-27047: unable to read the header block of file
Additional information: 2

我试图创建一个控制文件,但出现错误。

Errors in file /oracle/app/oracle/admin/ST01/udump/st01_ora_695.trc:
ORA-01565: error in identifying file '/oracle/app/oracle/oradata/ST01/o1_mf_system_488h0zbs_.dbf'
ORA-27047: unable to read the header block of file

我尝试使用RMAN运行跨平台数据库迁移,但出现错误。

    [oracle10@aktp ST01]$ rman target /

    Recovery Manager: Release 10.2.0.4.0 - Production on Tue Jul 10 10:39:54 2018

    Copyright (c) 1982, 2007, Oracle.  All rights reserved.

    connected to target database: ST01 (not mounted)

        RMAN> CONVERT DATAFILE

          '/oracle/app/oracle/oradata/ST01/o1_mf_system_488h0zbs_.dbf_',
          '/oracle/app/or2> 3> 4> acle/oradata/ST01/o1_mf_sysaux_488h1hvj_.dbf_'
           FROM PLATFORM 'Solaris[tm] OE (64-bit)'
        5> 6> ;

        Starting backup at 10.07.18
        using target database control file instead of recovery catalog
        allocated channel: ORA_DISK_1
        channel ORA_DISK_1: sid=167 devtype=DISK
        channel ORA_DISK_1: starting datafile conversion
        input filename=/oracle/app/oracle/oradata/ST01/o1_mf_sysaux_488h1hvj_.dbf_
        RMAN-00571: ===========================================================
        RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
        RMAN-00571: ===========================================================
        RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/10/2018 10:41:43
        RMAN-10038: database session for channel ORA_DISK_1 terminated unexpectedly

如果在Oracle 11.2.0.3 Linux 64位上运行迁移,

oracle@esmd:/oracle/app/oracle/oradata/ST01> rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jul 10 11:01:03 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ST01 (not mounted)

RMAN>

RMAN>  CONVERT
2>   FROM PLATFORM 'Solaris[tm] OE (64-bit)'
3> DATAFILE
4>   '/oracle/app/oracle/oradata/ST01/system.dbf'
5> FORMAT
  '/oracle/app/oracle/oradata/ST01/system.dbf_';
6>
Starting conversion at target at 10-JUL-18

using target database control file instead of recovery catalog
CONVERT
  FROM
PLATFORM 'Solaris[tm] OE (64-bit)'
DATAFILE
  '/oracle/app/oracle/oradata/ST01/sysaux.dbf'
FORMAT
  '/oracle/app/oracle/oradata/ST01/sysaux.dbf_';allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=140 device type=DISK
channel ORA_DISK_1: starting datafile conversion
input file name=/oracle/app/oracle/oradata/ST01/system.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of conversion at target command on ORA_DISK_1 channel at 07/10/2018 11:01:06
ORA-19928: CONVERT of data files with undo segments between different endian is not supported.

RMAN>
RMAN> 2> 3> 4> 5> 6> 7> ;

Starting conversion at target at 10-JUL-18
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile conversion
input file name=/oracle/app/oracle/oradata/ST01/sysaux.dbf
converted datafile=/oracle/app/oracle/oradata/ST01/sysaux.dbf_
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:01:05
Finished conversion at target at 10-JUL-18