重建control文件,先使用 alter database backup controlfile to trace;
然后到udump 中去找trace文件,从中提取出建立control 文件的脚本,在脚本中数据库名字改为你需要的名字,shutdown数据库,注意不能用abort,然后startup nomount,运行建立control 文件的教本,然后alter database open;
然后到udump 中去找trace文件,从中提取出建立control 文件的脚本,在脚本中数据库名字改为你需要的名字,shutdown数据库,注意不能用abort,然后startup nomount,运行建立control 文件的教本,然后alter database open;
假如我已有的数据库叫football,现在要改为xmjcdemo,
详细的操作该如何?最好能手把手教。:)
shutdown immediate
使用操作系统命令备份控制文件,以防失败可以用它来重新启动数据库
启动数据库,禁止一般用户连接
startup force restrict open
trace出控制文件
alter database backup controlfile to trace;
正常关闭数据库
shutdown ;
改变 init 文件的 db_name 参数为新的命名
重新启动数据库到nomount状态
startup nomount
修改trace出控制文件的脚本(在udump中)
create controlfile reuse (database -> set database) (old_name -> new_name) (noresetlogs -> resetlogs) ...
如果成功,则打开数据库resetlogs,如果不成功,则使用备份出来的控制文件重新启动数据库
alter database open resetlogs;
重建临时表空间
ALTER TABLESPACE TEMP ADD TEMPFILE '你的临时文件名' REUSE;