- 浏览: 87081 次
- 性别:
- 来自: 北京
最新评论
1)offline datafile
OFFLINE
Specify OFFLINE to take the datafile offline. If the database is open, you must perform media recovery on the datafile before bringing it back online, because a checkpoint is not performed on the datafile before it is taken offline.
2)offline tablespace
Specify ONLINE to bring the tablespace online. Specify OFFLINE to take the tablespace offline and prevent further access to its segments. When you take a tablespace offline, all of its datafiles are also offline.
Restriction on Taking Tablespaces Offline
You cannot take a temporary tablespace offline.
OFFLINE NORMAL
Specify NORMAL to flush all blocks in all datafiles in the tablespace out of the system global area (SGA). You need not perform media recovery on this tablespace before bringing it back online. This is the default.
OFFLINE TEMPORARY
If you specify TEMPORARY, then Oracle Database performs a checkpoint for all online datafiles in the tablespace but does not ensure that all files can be written. Files that are offline when you issue this statement may require media recovery before you bring the tablespace back online.
OFFLINE IMMEDIATE
If you specify IMMEDIATE, then Oracle Database does not ensure that tablespace files are available and does not perform a checkpoint. You must perform media recovery on the tablespace before bringing it back online.
OFFLINE
Specify OFFLINE to take the datafile offline. If the database is open, you must perform media recovery on the datafile before bringing it back online, because a checkpoint is not performed on the datafile before it is taken offline.
引用
DATA FILE #5:
(name #4) /u01/oracle/oradata/PROD/example01.dbf
creation size=0 block size=8192 status=0x1c head=4 tail=4 dup=1
tablespace 6, index=5 krfil=5 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:75 scn: 0x0000.000e2959 05/04/2011 10:45:17
Stop scn: 0x0000.000e296f 05/04/2011 10:45:30
Creation Checkpointed at scn: 0x0000.00072202 03/12/2011 23:05:50
thread:0 rba:(0x0.0.0)
(name #4) /u01/oracle/oradata/PROD/example01.dbf
creation size=0 block size=8192 status=0x1c head=4 tail=4 dup=1
tablespace 6, index=5 krfil=5 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:75 scn: 0x0000.000e2959 05/04/2011 10:45:17
Stop scn: 0x0000.000e296f 05/04/2011 10:45:30
Creation Checkpointed at scn: 0x0000.00072202 03/12/2011 23:05:50
thread:0 rba:(0x0.0.0)
2)offline tablespace
引用
DATA FILE #4:
(name #5) /u01/oracle/oradata/PROD/users01.dbf
creation size=0 block size=8192 status=0x80 head=5 tail=5 dup=1
tablespace 4, index=4 krfil=4 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:114 scn: 0x0000.000e268b 05/04/2011 10:28:24
Stop scn: 0x0000.000e268b 05/04/2011 10:28:24
Creation Checkpointed at scn: 0x0000.00002946 06/30/2005 19:10:40
thread:0 rba:(0x0.0.0)
(name #5) /u01/oracle/oradata/PROD/users01.dbf
creation size=0 block size=8192 status=0x80 head=5 tail=5 dup=1
tablespace 4, index=4 krfil=4 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:114 scn: 0x0000.000e268b 05/04/2011 10:28:24
Stop scn: 0x0000.000e268b 05/04/2011 10:28:24
Creation Checkpointed at scn: 0x0000.00002946 06/30/2005 19:10:40
thread:0 rba:(0x0.0.0)
Specify ONLINE to bring the tablespace online. Specify OFFLINE to take the tablespace offline and prevent further access to its segments. When you take a tablespace offline, all of its datafiles are also offline.
Restriction on Taking Tablespaces Offline
You cannot take a temporary tablespace offline.
OFFLINE NORMAL
Specify NORMAL to flush all blocks in all datafiles in the tablespace out of the system global area (SGA). You need not perform media recovery on this tablespace before bringing it back online. This is the default.
OFFLINE TEMPORARY
If you specify TEMPORARY, then Oracle Database performs a checkpoint for all online datafiles in the tablespace but does not ensure that all files can be written. Files that are offline when you issue this statement may require media recovery before you bring the tablespace back online.
OFFLINE IMMEDIATE
If you specify IMMEDIATE, then Oracle Database does not ensure that tablespace files are available and does not perform a checkpoint. You must perform media recovery on the tablespace before bringing it back online.
SQL> alter tablespace users offline; Tablespace altered. SQL> alter tablespace users online; Tablespace altered. SQL> alter database datafile '/u01/oracle/oradata/PROD/users02.dbf' offline; Database altered. SQL> alter database datafile '/u01/oracle/oradata/PROD/users02.dbf' online; alter database datafile '/u01/oracle/oradata/PROD/users02.dbf' online * ERROR at line 1: ORA-01113: file 6 needs media recovery ORA-01110: data file 6: '/u01/oracle/oradata/PROD/users02.dbf' SQL> recover datafile 6; Media recovery complete. SQL> alter database datafile '/u01/oracle/oradata/PROD/users02.dbf' online; Database altered.
发表评论
-
dbms_output can not put the zero
2011-08-25 09:29 792DECLARE V_INTA NUMBER ... -
what is the difference between object_id and data_object_id?
2011-08-24 09:17 983The object_id is the primary k ... -
oracle EXECUTE IMMEDIATE ora-00911
2011-08-14 10:15 1550I get an error when I try to ex ... -
Will the valid status of index impact dml operation?
2011-08-05 10:34 883DROP TABLE tab01; SELECT * FRO ... -
where can i find the job number of those jobs defined in dba_scheduler_jobs?
2011-08-01 10:41 877Question: Hello, could anybody ... -
Listener HPUX Error: 242: No route to host
2011-05-17 14:55 1016现象: 引用LSNRCTL> status Conne ... -
一进程阻塞问题解决
2011-05-12 16:38 4155同事反映,删除一条数据总是没有反应,请求协助解决. 问题非常 ... -
open database with ORA-00704 and ORA-39700
2011-05-06 16:13 29461,Error 1)alter.log Fri May ... -
oracle text index create and use
2011-05-06 13:41 1958一、Install Text Index 1,The ste ... -
oracle three type of block size
2011-04-28 17:35 796Tools: 引用[oracle@node oracle]$ ... -
bbed一(安装)
2011-04-26 14:54 1545bbed ----------------------- bl ... -
Strategies for RAC inter-instance parallelized queries
2011-04-25 14:14 1171I recently had to sit down and ... -
Enable Row Movement in Partitioning and Overhead
2011-04-24 14:03 1594Question 1: Hi, I am partitio ... -
Row Movement in Oracle
2011-04-23 22:23 2029One of the relatively newer fea ... -
ORA-14402 updating partition key column
2011-04-23 19:48 6440做DBA几年来,经常遇到项目到了维护期总是修改表的结构,原因很 ... -
ORACLE DSI 介绍
2011-04-19 18:33 927DSI是Data Server Internals的缩写,是O ... -
Oracle / Buffer cache
2011-04-19 17:18 818引用8.7 Tuning the Operating Syst ...
相关推荐
总结来说,删除Oracle表空间数据文件是一项需要谨慎操作的任务,理解`DROP DATAFILE`、`OFFLINE`和`OFFLINE DROP`的差异,以及掌握在OS层面误删后的恢复策略,对于维护数据库的完整性和一致性至关重要。在执行这些...
spec1 [, datafile_spec2] [{MINIMUM EXTENT integer [k|m] | BLOCKSIZE integer [k] | logging_clause | FORCE LOGGING | DEFAULT {data_segment_compression} storage_clause | [online | offline] | [PERMANENT |...
CREATE TABLESPACE tablespace_name DATAFILE 'filepath' SIZE filesize AUTOEXTEND ON NEXT autosize MAXSIZE filemaxsize [UNLIMITED]; ``` 例如: ```sql CREATE TABLESPACE sales DATAFILE 'C:\1.txt' SIZE 10M ...
ALTER TABLESPACE game ADD DATAFILE '/oracle/oradata/db/GAME02.dbf' SIZE 1000M; ``` - 手动增加数据文件尺寸: ```sql ALTER DATABASE DATAFILE '/oracle/oradata/db/GAME.dbf' RESIZE 4000M; ``` - 自动扩展...
建立表空间的命令为:CREATE TABLESPACE data01 DATAFILE '/oracle/oradata/db/DATA01.dbf' SIZE 500M UNIFORM SIZE 128k;其中,data01 是表空间的名称,/oracle/oradata/db/DATA01.dbf 是数据文件的路径,SIZE 500M...
CREATE TABLESPACE data01 DATAFILE '/oracle/oradata/db/DATA01.dbf' SIZE 500M UNIFORM SIZE 128k; ``` 其中,`UNIFORM SIZE 128k`指定了区尺寸为128k,如果不指定,默认为64k。 - **删除表空间**:使用`DROP ...
datafile 'd:\oracle\oradata\ora92\luntan.ora' size 5m, 'd:\oracle\oradata\ora92\dd.ora' size 5m; 查询表空间的信息可以使用 DBA_TABLESPACES 视图,例如: select tablespace_name "表空间名称",status ...
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES; ``` 以上步骤涵盖了Oracle数据库中表空间的创建、修改、删除等基本操作。根据实际需求灵活运用这些命令,可以帮助管理员更高效地管理数据库...
ALTER TABLESPACE DATA01 DATAFILE OFFLINE; ``` - **将数据文件设为在线**: ```sql ALTER DATABASE DATAFILE 'C:\DATA01B.DBF' ONLINE; ``` #### 6. 移动和重命名数据文件 当需要更改数据文件的位置时,...
CREATE TABLESPACE tablespace_name DATAFILE 'filepath' SIZE filesize AUTOEXTEND ON NEXT autosize MAXSIZE filemaxsize [UNLIMITED]; ``` 例如: ```sql CREATE TABLESPACE sales DATAFILE 'C:\1.txt' SIZE 10M ...
DATAFILE 'file_path' SIZE size [LOGGING/NOLOGGING] DEFAULT STORAGE (initial size NEXT size MAXEXTENTS max_extents PCTINCREASE increase) [ONLINE/OFFLINE] [PERMANENT/TEMPORARY] [EXTENT_MANAGEMENT_CLAUSE...
本文将对 Oracle Create Tablespace 语法进行详细的解释和分析,从 undo 表空间到表空间的创建,DATAFILE 的设置,MININUM EXTENT,BLOCKSIZE,logging clause,FORCE LOGGING,DEFAULT storage_clause 等方面。...
ALTER TABLESPACE game ADD DATAFILE '/oracle/oradata/db/GAME02.dbf' SIZE 1000M; ``` 2. **手动调整数据文件大小**:直接更改现有数据文件的大小。 ```sql ALTER DATABASE DATAFILE '/oracle/oradata/db/GAME...
创建永久表空间:create [smallfile | bigfile] [permanent] tablespace 表空间名 datafile '(可附路径)数据文件名.dbf'[size 10m] [autoextend off on] [next 10m] [maxsize unlimited 10m] [online offline];...
ALTER TABLESPACE <tablespace_name> ADD DATAFILE 'filepath' SIZE <filesize> AUTOEXTEND [ON|OFF] NEXT <autosize> MAXSIZE <maxsize> [UNLIMITED]; ``` 例如: ```sql ALTER TABLESPACE sales ADD DATA...
- 永久表空间:用于存储常规数据,如`CREATE TABLESPACE demouserts01 DATAFILE 'path/file.dbf' SIZE 10M AUTOEXTEND ON NEXT 1M MAXSIZE 200M;` - 索引表空间:专用于存储索引,语法同上,只需替换表空间名。 -...
ALTER TABLESPACE IDO ADD DATAFILE 'f:\zjd\ido.dbf' SIZE 1M REUSE; ``` - **设置只读状态**: ```sql ALTER TABLESPACE "IDO" READONLY; ``` - **设置脱机状态**: ```sql ALTER TABLESPACE "IDO" ...
CREATE TABLESPACE data01 DATAFILE '/oracle/oradata/db/DATA01.dbf' SIZE 500M UNIFORM SIZE 128k; 在上面的命令中,DATAFILE 选项用于指定表空间的存储文件,SIZE 选项用于指定表空间的初始大小,而 UNIFORM ...