Delete bad project in OW R5000 (来自R5000安装工程师)
(1)保持oracle处于运行状态,查询OpenWorks系统中存在的坏工区名和数据文件存放路径;
su - oracle安装账号
sqlplus system/
@
select name from v$datafile
exit
(2)将以下语句复制到一个文件中,并命名为"prjdel.sql",并将该文件存放在oracle安装账号的家目录下;
set line 400
set pagesize 400
delete from owsys.ow_sys_project where project_name=upper('&1');
delete from owsys.ow_sys_prj_delete where project_name=upper('&1');
delete from owsys.ow_sys_prj_user where project_name=upper('&1');
delete from owsys.ow_sys_prj_archive where project_name=upper('&1');
delete from owsys.ow_sys_prj_bkup_log where project_name=upper('&1');
delete from owsys.ow_sys_prj_bkup_freq where project_name=upper('&1');
select * from dba_data_files where tablespace_name=upper('&1');
drop tablespace &1 including contents cascade constraints;
drop user &1 cascade;
drop role manage_&1;
drop role interp_&1;
drop role l_interp_&1;
drop role browse_&1;
exit
(3)用以下命令执行该脚本删除坏工区;(该步需要等待一段时间,注意运行期间不要关闭该窗口)
sqlplus system/密码@$ORACLE_SID @prjdel.sql 坏工区名
(4)待(3)运行结束后,切换到oracle安装账号,进行如下操作;
su - oracle安装账号
cd oracle实例工区的存放路径(可从(1)得到的运行结果中看到该路径)
rm 坏工区名.dbf
阅读(4358) | 评论(0) | 转发(0) |