设为首页 加入收藏

TOP

修改Oracle 10G数据库名和DBID(二)
2014-11-24 02:21:46 来源: 作者: 【 】 浏览:4
Tags:修改 Oracle 10G 数据库 DBID
cel;

ORA-00279: change 9094358 generated at 07/15/2011 15:32:20 needed for thread 1

ORA-00289: suggestion :

/u01/app/flash_recovery_area/ORCL/archivelog/2011_07_15/o1_mf_1_3_%u_.arc

ORA-00280: change 9094358 for thread 1 is in sequence #3

Specify log: {=suggested | filename | AUTO | CANCEL}

ORA-00308: cannot open archived log

'/u01/app/flash_recovery_area/ORCL/archivelog/2011_07_15/o1_mf_1_3_%u_.arc'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 9094358 generated at 07/15/2011 15:32:20 needed for thread 1

ORA-00289: suggestion :

/u01/app/flash_recovery_area/ORCL/archivelog/2011_07_15/o1_mf_1_3_%u_.arc

ORA-00280: change 9094358 for thread 1 is in sequence #3

Specify log: {=suggested | filename | AUTO | CANCEL}

cancel

Media recovery cancelled.

SQL> alter database open resetlogs;

Database altered.

SQL> select dbid,name from v$database;

DBID NAME

---------- ---------------------------

4061806388 ORCL

1.5 修改ORACLE_SID,tnsnames.ora和dbconsole配置

[oracle@rhel6 ~]$ source .bash_profile

[oracle@rhel6 ~]$ env |grep ORACLE_SID

ORACLE_SID=orcl

[oracle@rhel6 ~]$ vi /u01/app/oracle/network/admin/tnsnames.ora

ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.50.4)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl.766.com)

)

)

重新配置dbconsole,需要借助DBCA工具

[root@rhel6 ~]# tail -n 1 /etc/oratab

orcl:/u01/app/oracle:N:

[oracle@rhel6 ~]$ emctl status dbconsole

TZ set to PRC

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.

http://rhel6.766.com:5500/em/console/aboutApplication

Oracle Enterprise Manager 10g is running.

------------------------------------------------------------------

Logs are generated in directory /u01/app/oracle/rhel6.766.com_orcl/sysman/log

[oracle@rhel6 ~]$ netstat -ntpl |grep :5500

(Not all processes could be identified, non-owned process info

will not be shown, you would have to be root to see it all.)

tcp 0 0 0.0.0.0:5500 0.0.0.0:* LISTEN 13819/ java

二:数据库更名,同时修改DBID

2.1 关闭数据库,将数据库启动到mount状态

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

SQL> startup mount

ORACLE instance started.

Total System Global Area 629145600 bytes

Fixed Size 2022824 bytes

Variable Size 218104408 bytes

Database Buffers 402653184 bytes

Redo Buffers 6365184 bytes

Database mounted.

2.2 使用nid命令修改数据库名和dbid

[oracle@rhel6 dbs]$ nid dbname=orcl2 target=sys/oracle

DBNEWID: Release 10.2.0.1.0 - Production on Fri Jul 15 17:19:29 2011

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

Connected to database ORCL (DBID=4061806388)

Connected to server version 10.2.0

Control Files in database:

/u01/app/oradata/orcl/control01.ctl

/u01/app/oradata/orcl/control02.ctl

/u01/app/oradata/orcl/control03.ctl

Change database ID and database name ORCL to ORCL2 (Y/[N]) => Y

Proceeding

首页 上一页 1 2 3 4 下一页 尾页 2/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇设置Oracle 11Gr2 RAC的归档模式 下一篇批量导入TXT文件

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: