----》再启动,不用指定pfile了
SQL> startup nomount
Oracle instance started.
......
SQL> shutdown immediate
ORA-01507: database not mounted
Oracle instance shut down.
----》重新启动后,orcl数据库总是显示为已启动,mydb为未启动状态
这种情况下orcl其实是一个空闲进程,数据库nomount阶段,mydb则没启动进程,
所要连接到mydb会出现如下错误:
SQL> conn sys/mydb as sysdba
ERROR:
ORA-12560: TNS:protocol adapter error
可从服务管理器中启动OracleServicemydb则可以连接了。
----》下面两个有点奇怪,我创建的是实例,可使用inst启动不了,需要用srvc
C:>oradim -startup -sid mydb -starttype inst -usrpwd mydb
ORA-12560: TNS:protocol adapter error
C:>oradim -startup -sid mydb -starttype srvc -usrpwd mydb
5:创建数据库
SQL> CREATE DATABASE mydb
2 logfile
3 group 1
4 ('d:Oracleproduct10.1.0oradatamydbredo11.log',
5 'd:Oracleproduct10.1.0oradatamydbredo12.log') size 10m,
6 group 2
7 ('d:Oracleproduct10.1.0oradatamydbredo21.log',
8 'd:Oracleproduct10.1.0oradatamydbredo22.log') size 10m
9 datafile 'd:Oracleproduct10.1.0oradatamydbsystem01.dbf' size 100m
10 autoextend on next 10m maxsize unlimited extent management local
11 sysaux datafile 'd:Oracleproduct10.1.0oradatamydbsysaux01.dbf' size 50m
12 undo tablespace undotbs01 datafile 'd:Oracleproduct10.1.0oradatamydbundotbs1.dbf' size 20m
13 default temporary tablespace temp
14 tempfile 'd:Oracleproduct10.1.0oradatamydbtemp01.dbf' size 10m
15 default tablespace users
16 datafile 'd:Oracleproduct10.1.0oradatamydbusers01.dbf' size 10m
17* character set zhs16gbk
create database mydb
*
ERROR at line 1:
ORA-01092: Oracle instance terminated. Disconnection forced
----》查看alert_mydb.log发现错误出现在创建undotbs1.dbf后,
Wed Apr 11 13:48:19 2007
CREATE UNDO TABLESPACE UNDOTBS01 DATAFILE 'd:Oracleproduct10.1.0oradatamydbundotbs1.dbf' size 20m
ORA-30012 signalled during: CREATE UNDO TABLESPACE UNDOTBS01 DATAFILE 'd:ora...
Wed Apr 11 13:48:21 2007
Errors in file d:Oracleproduct10.1.0adminmydbudumpmydb_ora_828.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
----》为什么说UNDOTBS1不存在?查看参数文件,发现这么两行
undo_management=AUTO
undo_tablespace=UNDOTBS1