12c 应答方式安装数据库的一点补充already exists. Specify another SID

今天删除数据库时采用了drop database语句,从新安装时遇到错误:“The Oracle system identifier(SID) "cdb" already exists. Specify another SID.”,该错误是因为删除时候没有清理/etc/oratab文件,该文件中记录了之前数据库的启动信息。
手工清理这行信息问题解决,下面还原操作过程

删除可插拔数据库
SYS@cdb > shutdown immediate;

SYS@cdb > startup mount restrict;

SYS@cdb > drop database;

重新创建可插拔数据库
[oracle@snow response]$ dbca -silent -createDatabase -responseFile /home/oracle/orainst/12.1.0.1/database/response/cdb_pdb.rsp
Enter SYS user password:

Enter SYSTEM user password:

Enter PDBADMIN User Password:

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/cdb.log" for further details.

查看错误日志提示没删除“干净”
[oracle@snow response]$ more /u01/app/oracle/cfgtoollogs/dbca/cdb.log

The Oracle system identifier(SID) "cdb" already exists. Specify another SID.

/ has enough space. Required space is 8260 MB , available space is 25210 MB.
File Validations Successful.


问题出现在/etc/oratab文件中,看看里面的内容还包含之前数据库实例的启动信息。手动将其清除,再次尝试安装。
$ cat /etc/oratab |grep cdb
cdb:/u01/app/oracle/product/12.1.0.1/db_1:N

$ cat /etc/oratab | grep cdb
# cdb:/u01/app/oracle/product/12.1.0.1/db_1:N <==注释掉

清除上述问题后重试成功
[oracle@snow response]$ dbca -silent -createDatabase -responseFile /home/oracle/orainst/12.1.0.1/database/response/cdb_pdb.rsp
Enter SYS user password:

Enter SYSTEM user password:

Enter PDBADMIN User Password:

Copying database files
1% complete
2% complete
8% complete
13% complete
19% complete
24% complete
27% complete
Creating and starting Oracle instance
29% complete
32% complete
33% complete
34% complete
38% complete
42% complete
43% complete
45% complete
Completing Database Creation
48% complete
51% complete
53% complete
62% complete
70% complete
72% complete
Creating Pluggable Databases
78% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/cdb/cdb11.log" for further details.

[oracle@snow response]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Mon Mar 2 17:33:40 2015

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SYS@cdb > show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB1                           READ WRITE NO

全文完
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值