ITPub博客

首页 > 应用开发 > IT综合 > drop undo and recreate

drop undo and recreate

原创 IT综合 作者:playwawa 时间:2005-11-22 09:35:49 0 删除 编辑
drop undo and recreate[@more@]现在他拥有一个冷备份。
拥有冷备份,那么我们知道这个操作是很简单的,也不用隐含参数:
C:Documents and Settingsgqgai>sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.6.0 - Production on Fri Mar 4 20:55:59 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production

20:55:59 SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
20:56:14 SQL> startup
ORACLE instance started.

Total System Global Area   59842188 bytes
Fixed Size                   454284 bytes
Variable Size              33554432 bytes
Database Buffers           25165824 bytes
Redo Buffers                 667648 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: 'D:ORADATAEYGLEUNDOTBS01.DBF'


20:59:28 SQL> alter database datafile 'D:ORADATAEYGLEUNDOTBS01.DBF' offline drop;

Database altered.

Elapsed: 00:00:00.00
20:59:34 SQL> alter database open;

Database altered.

Elapsed: 00:00:02.04
20:59:40 SQL> select name from v$datafile;

NAME
-------------------------------------------------------
D:ORADATAEYGLESYSTEM01.DBF
D:ORADATAEYGLEUNDOTBS01.DBF
D:ORADATAEYGLEPERFSTAT01.DBF
D:ORADATAEYGLEEYGLE.DBF

21:00:55 SQL> create undo tablespace undotbs2
21:01:03   2  datafile 'd:oradataeygleundotbs2.dbf' size 10M;

Tablespace created.

Elapsed: 00:00:02.02

21:06:29 SQL> ALTER SYSTEM SET undo_tablespace='UNDOTBS2' ;

System altered.

Elapsed: 00:00:00.01

需要注意的是,如果使用pfile而不是spfile,我以前的一个案例就可以参考:

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/202861/viewspace-810471/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    105
  • 访问量
    1174485