删除回滚段UNDOTBS1再新建失败后不能打开表了
郁闷,忘记备份了,发现UNDOTBS很大,就按照以下步骤删除原回滚段再新建一个替代的操作:
-- 创建备用undo表空间
create undo tablespace newundotbs datafile 'E:\OraHome1\oradata\gogo\newundotbs01.dbf' size 1000m
/ 切换undo表空间,使系统使用新建的回滚表空间
alter system set undo_tablespace=newundotbs scope=spfile;
/关闭服务
shutdown immediate
/重新启动服务
startup
/
-- 删除掉原来的混滚表空间
drop tablespace undotbs1 including contents and datafiles
/
-- 创建原undo表空间
create undo tablespace undotbs datafile 'E:\OraHome1\oradata\gogo\undotbs01.dbf' size 1000m
/
-- 切换undo表空间
alter system set undo_tablespace=undotbs1 scope=spfile;
/
-- 关闭重起并把备用undo表空间drop
shutdown immediate
/
startup
/
drop tablespace newundotbs including contents and datafiles
/
结果最后一步失败了,提示连接oracle断了,总之后来乱搞了一通。
今天一打开,发现通过命令:
SQL>startup mount.
SQL>alter database open ;都成功进入数据库了,也能进入OEMC和PL/SQL DEV 平台,可惜一点击表或者存储,包之类就报错:
ORA-01219:数据库未打开,仅允许在固定表/试图中查询 ,请问大牛们这怎么解决啊??
不甚感激!!!