上次在数据库服务没有启动的情况下把Oracle数据文件给删除了,那是我在E盘下面建的一个表空间下的多个数据库文件SALES_DATA01,再次启动服务后,用sqlplus / as sysdba登录不上,试了很多办法,才找到一个能登录的办法,就是用sqlplus sys/tanm as sysdba或者sqlplus/nolog conn sys/tanm as sysdba,但是又出现了新的问题,我想把scott用户的权限更改使其能有DBA权限登录,alter user scott account unlock进行解锁,提示database not open数据库不能打开,用select file_name from dba_data_files进行查询,出现错误ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
查了一下资料:(使用了如下段方法)
SQL> select * from all_users;
select * from all_users
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed
tables/views only
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL>
To open the database for normal access, we can alter the database again.
SQL> alter database open;
Database altered.
The shutdown proccess is the simply opposite of the startup.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
运行 SQL> alter database open;
ERROR at line 1:
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: 'E:\SALES_DATA01.DBF'
依次使用
alter database datafiel 'E:\SALES_DATA01.DBF' offline drop;
alter database datafiel 'E:\SALES_DATA02.DBF' offline drop;
等方法把数据文件全部脱机删除,再运行SQL>alter database open;就可以了
posted on 2007-12-15 19:26
谭明 阅读(515)
评论(0) 编辑 收藏 所属分类:
Oracle