互通有无,共同提高。
全部博文(144)
分类: LINUX
2007-07-28 15:59:23
A Project Fails to Delete Completely
On rare occasions, a project you delete in OpenWorks may fail to completely delete from the Oracle database, although the name no longer appears in any project list. In that event, you cannot use that project name again with a project create or restore command.
In this circumstance, the following commands can be issued to manually delete all remnants of the project from the database. This approach should be used only by the Oracle database administrator and only on any rare occasion when a normal project delete has not succeeded.
1. Login as the oracle dba account owner (e. g., oracle) and use the Server Manager utility to access the privileged Oracle user called internal:
login: su - oracle
password:
svrmgrl
connect internal
2. Now issue all commands needed to fully delete the project “PROJECTNAME” from the database (here, indented lines represent wrapped lines):
alter session set current_schema=owsys;
delete from ow_sys_project where
project_name=’PROJECTNAME’;
delete from ow_sys_prj_delete where
project_name=’PROJECTNAME’;
delete from ow_sys_prj_user where
project_name=’PROJECTNAME’;
delete from ow_sys_prj_archive where
project_name=’PROJECTNAME’;
delete from ow_sys_prj_bkup_log where
project_name=’PROJECTNAME’;
delete from ow_sys_prj_bkup_freq where
project_name=’PROJECTNAME’;
delete from owsysp.ow_sysp_prj_security where
project_name=’PROJECTNAME’;
3. You must also delete all tablespace related to the project. First, locate the proj.dbs file:
connect internal
select * from dba_data_files;
4. Make note of the path to the project data file (i.e., the location of the proj.dbs file).
5. Issue the following commands to complete the deletion and to exit:
drop tablespace PROJECTNAME including contents
cascade constraints;
drop user PROJECTNAME cascade;
drop role manage_PROJECTNAME;
drop role interp_PROJECTNAME;
drop role browse_PROJECTNAME;
exit
6. Finally, change to the directory where the proj.dbs file is located, and remove it.
cd
rm proj.dbs
==============================
相关内容:
误删除数据库文件*.dbs导致oracle启动失败解决办法(更新)
http://blog.chinaunix.net/uid-124509-id-61961.html