暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

使用dbca删除数据库-提示[FATAL] [DBT-10201]

laurie 2024-10-15
216

--不记得sys密码,修改sys密码
ALTER USER sys identified BY oracle;


--执行静默删除库脚本(-sourceDB是RAC的db_unique_name或者单点的SID NAME)

[oracle@test ~]$ cd $ORACLE_HOME

[oracle@test bin]$ dbca -silent -deleteDatabase -sourceDB testdb -sysDBAUserName sys -sysDBAPassword oracle

[FATAL] [DBT-10201] 无法执行删除数据库(D)操作。
原因: 系统上不存在数据库。

--处理报错信息
[oracle@test bin]$ cat /etc/oratab
#



# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM:/home/oracle/app/12.2.0/grid:N

--后面加上 testdb:/home/oracle/app/oracle/product/12.2.0/db:N
[oracle@test bin]$ vi /etc/oratab
[oracle@test bin]$ cat /etc/oratab
#



# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM:/home/oracle/app/12.2.0/grid:N
testdb:/home/oracle/app/oracle/product/12.2.0/db:N

再次执行:
[oracle@test bin]$ dbca -silent -deleteDatabase -sourceDB testdb -sysDBAUserName sys -sysDBAPassword oracle
正在连接到数据库
4%已完成
9%已完成
14%已完成
19%已完成
23%已完成
28%已完成
47%已完成
正在更新网络配置文件
48%已完成
52%已完成
正在删除实例和数据文件
76%已完成
100%已完成
有关详细信息, 请参阅日志文件 "/home/oracle/app/oracle/cfgtoollogs/dbca/testdb.log"。


--以下是一些日志信息
--以下是错误日志alter最后的内容
2024-10-15T16:39:40.264750+08:00
Deleted Oracle managed file +DATA/TESTDB/ONLINELOG/group_44.2123.1178875245
Deleted Oracle managed file +DATA/TESTDB/ONLINELOG/group_45.2122.1178875249
Deleted Oracle managed file +DATA/TESTDB/TEMPFILE/temp.2142.1178875195
Deleted Oracle managed file +DATA/TESTDB/677F0EF4110B8B4CE0534311BF0AAF66/TEMPFILE/temp.2140.1178875205
Deleted Oracle managed file +DATA/TESTDB/677F9561235250D8E0534311BF0AD47D/TEMPFILE/temp.2128.1178875227
Deleted Oracle managed file +DATA/TESTDB/677F9561235450D8E0534311BF0AD47D/TEMPFILE/temp.2127.1178875229
Deleted Oracle managed file +DATA/TESTDB/677F9561235450D8E0534311BF0AD47D/TEMPFILE/temp.2130.1178875225
2024-10-15T16:39:41.773562+08:00
Deleted Oracle managed file +DATA/TESTDB/677F9561235450D8E0534311BF0AD47D/TEMPFILE/temp.2132.1178875223
Deleted Oracle managed file +DATA/TESTDB/677F9561235250D8E0534311BF0AD47D/TEMPFILE/temp.2131.1178875225
2024-10-15T16:39:43.133759+08:00
Deleted Oracle managed file +DATA/TESTDB/677F9561235250D8E0534311BF0AD47D/TEMPFILE/temp.2133.1178875223
Deleted Oracle managed file +DATA/TESTDB/677F9561235250D8E0534311BF0AD47D/TEMPFILE/temp.2135.1178875221
WARNING: Cannot delete file +DATA01/snapcf_testdb2.f
2024-10-15T16:39:43.742167+08:00
Errors in file /home/oracle/app/oracle/diag/rdbms/testdb/testdb/trace/testdb_ora_28043.trc:
ORA-01265: ɾONTROL +DATA01/snapcf_testdb2.f
ORA-15001: diskgroup "DATA01" does not exist or is not mounted
Shutting down archive processes
2024-10-15T16:39:43.743044+08:00
TT00: Gap Manager exiting (PID:30824)
2024-10-15T16:39:44.743391+08:00
Archiving is disabled
2024-10-15T16:39:44.744312+08:00
ARC2: ARCH shutting down
2024-10-15T16:39:44.744360+08:00
ARC3: ARCH shutting down
2024-10-15T16:39:44.744363+08:00
ARC0: ARCH shutting down
2024-10-15T16:39:44.744439+08:00
ARC1: ARCH shutting down
2024-10-15T16:39:44.744503+08:00
ARC2: Archival stopped
2024-10-15T16:39:44.744549+08:00
ARC0: Archival stopped
2024-10-15T16:39:44.744554+08:00
ARC3: Archival stopped
2024-10-15T16:39:44.744606+08:00
ARC1: Archival stopped
2024-10-15T16:39:45.796671+08:00
Deleted file +DATA/cntl_testdb.ctl


[oracle@test trace]$ cat /home/oracle/app/oracle/cfgtoollogs/dbca/testdb.log
[ 2024-10-15 16:27:32.301 CST ] Database Configuration Assistant 将删除数据库的 Oracle 实例和数据文件。该数据库中的所有信息将被破坏。是否继续?
[ 2024-10-15 16:27:32.322 CST ] 正在连接到数据库
DBCA_PROGRESS : 4%
DBCA_PROGRESS : 9%
DBCA_PROGRESS : 14%
DBCA_PROGRESS : 19%
DBCA_PROGRESS : 23%
DBCA_PROGRESS : 28%
DBCA_PROGRESS : 47%
[ 2024-10-15 16:40:01.090 CST ] 正在更新网络配置文件
DBCA_PROGRESS : 48%
DBCA_PROGRESS : 52%
[ 2024-10-15 16:40:01.113 CST ] 正在删除实例和数据文件
DBCA_PROGRESS : 76%
DBCA_PROGRESS : 100%
[ 2024-10-15 16:40:01.403 CST ] 数据库删除完毕。
[oracle@rhbktest02 trace]$ 

最后修改时间:2024-10-15 17:50:32
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论