Tablespace ORA-02180
I am trying to create tablespace, but I am keep getting below error.
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' 500M AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL;Error
Error starting at line 1 in command:
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' 500M AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL
Error at Command Line:1 Column:99
Error report:
SQL Error: ORA-02180: invalid option for CREATE TABLESPACE
02180. 00000 - "invalid option for CREATE TABLESPACE"
*Cause: An invalid option appeared.
*Action: Specify one of the valid options
ONLINE, OFFLINE, FORCE, RETENTION.
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' 500M;Error
Error starting at line 1 in command:
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' 500M AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL
Error at Command Line:1 Column:99
Error report:
SQL Error: ORA-02180: invalid option for CREATE TABLESPACE
02180. 00000 - "invalid option for CREATE TABLESPACE"
*Cause: An invalid option appeared.
*Action: Specify one of the valid options
ONLINE, OFFLINE, FORCE, RETENTION.I am not sure what wrong I am going here.
user3636719 wrote:
I am trying to create tablespace, but I am keep getting below error.
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' 500M AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL;
Use
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' size 500M AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL;
Error
Error starting at line 1 in command:
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' 500M AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL
Error at Command Line:1 Column:99
Error report:
SQL Error: ORA-02180: invalid option for CREATE TABLESPACE
02180. 00000 - "invalid option for CREATE TABLESPACE"
*Cause: An invalid option appeared.
*Action: Specify one of the valid options
ONLINE, OFFLINE, FORCE, RETENTION.
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' 500M;Error
Use
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' size 500M;
Error starting at line 1 in command:
CREATE TABLESPACE GOODS_LOB_TS DATAFILE '/FREE/rdbm4/oracle/FREE/datafiles/goods_lob_ts_01.dbf' 500M AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL
Error at Command Line:1 Column:99
Error report:
SQL Error: ORA-02180: invalid option for CREATE TABLESPACE
02180. 00000 - "invalid option for CREATE TABLESPACE"
*Cause: An invalid option appeared.
*Action: Specify one of the valid options
ONLINE, OFFLINE, FORCE, RETENTION.I am not sure what wrong I am going here.
Similar Messages
-
FIXED ORA-02180 when Creating a Temporary Tablespace
I am using Oracle 9i on a Win 2003 machine.
I have just performed a recovery of all my datafiles and have successfully opened the database using ALTER DATABASE OPEN;
I have been using THIS as a guide and am now at the stage of creating a new temp tablespace and dropping the old one (step 8.).
I use the following SQL,
CREATE TEMPORARY TABLESPACE temp02 TEMPFILE 'c:\oracle\oradata\bcs\temp02.dbf' SIZE 100mb AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL;
However it returns the following error:
ERROR at line 1:
ORA-02180: invalid option for CREATE TABLESPACE
Having googled the error it just says to make sure I am specifying a vaild option such as a datafile. I thought that is what I am doing!?
Could anyone please point out where I am going wrong and suggest a solution. It would be greatly appreciated.
Regards
Toby
Message was edited by:
redeyeHi,
CREATE TEMPORARY TABLESPACE temp02 >TEMPFILE 'c:\oracle\oradata\bcs\temp02.dbf' SIZE 100mb AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL;i think above creating temporary tablespace syntax may be wrong
why r u using AUTOEXTEND OFF?
plz try the following syntax
CREATE TEMPORARY TABLESPACE temp02 TEMPFILE 'c:\oracle\oradata\bcs\temp02.dbf' SIZE 100mb
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10m;
Regards ... -
Error During Installation: ORA-02180: invalid option for CREATE TABLESPACE
Hi all,
This is our enviroment,
Windows 2000 Service Pack 4
We are installing SAP R/3 Enterprise 4.7 Ext. 200 SR1
First we installed:
Oracle: 9.2
Patch: 9.2.0.7
SAP Central Instance
Now we are installing the DB Instance, but it gives this error:
INFO 2007-11-22 16:58:20
Working directory changed to C:\Program Files\sapinst_instdir\R3E47X2\SYSTEM\ABAP\ORA\NUC\DB.
ERROR 2007-11-22 16:58:21
CJS-00084 SQL statement or script failed.DIAGNOSIS: Error message: ORA-02180: invalid option for CREATE TABLESPACE
We are in the step 19 of 34
Create Tablespaces
Please some tips.
Regards,
ErickHi! Thanks a lot for the reply.
This is our <b>ora_sql_results.log</b>
================================================================================
2007-11-23, 07:31:09 SAPINST ORACLE start logging for
connect / as sysdba ;
set newpage 0
set space 0
set pagesize 0
set linesize 32767
set markup HTML off
set heading off
set verify off
set feedback off
set trimspool on
set sqlprompt SQL>
set termout on
set verify off
set echo off
spool ora_query3_tmp0_1.res
SELECT STATUS FROM V$INSTANCE;
spool off
exit;
Output of SQL executing program:
SQL*Plus: Release 9.2.0.7.0 - Production on Fri Nov 23 07:31:09 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected.
OPEN
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
SAPINST: End of output of SQL executing program D:\oracle\TVD\920/bin/sqlplus.
2007-11-23, 07:31:10 SAPINST ORACLE stop logging
================================================================================
2007-11-23, 07:31:10 SAPINST ORACLE start logging for
connect / as sysdba ;
CREATE TABLESPACE PSAP@SCHEMAID@ DATAFILE 'E:\oracle\TVD\sapdata4\psap@schemaid@_1\psap@[email protected]' SIZE 2000M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO ;
exit;
Output of SQL executing program:
SQL*Plus: Release 9.2.0.7.0 - Production on Fri Nov 23 07:31:10 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected.
CREATE TABLESPACE PSAP@SCHEMAID@ DATAFILE 'E:\oracle\TVD\sapdata4\psap@schemaid@_1\psap@[email protected]' SIZE 2000M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO
ERROR at line 1:
ORA-02180: invalid option for CREATE TABLESPACE
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
SAPINST: End of output of SQL executing program D:\oracle\TVD\920/bin/sqlplus.
SAPINST found errors.
SAPINST The current process environment may be found in sapinst_ora_environment.log.
2007-11-23, 07:31:10 SAPINST ORACLE stop logging
And this is <b>our alert_SID.log</b>
Dump file d:\oracle\tvd\saptrace\background\alert_tvd.log
Thu Nov 22 16:27:45 2007
ORACLE V9.2.0.7.0 - Production vsnsta=0
vsnsql=12 vsnxtr=3
Windows 2000 Version 5.0 Service Pack 4, CPU type 586
Thu Nov 22 16:27:45 2007
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
SCN scheme 2
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 9.2.0.7.0.
System parameters with non-default values:
processes = 80
sessions = 96
shared_pool_size = 251658240
sga_max_size = 546906620
shared_pool_reserved_size= 24363663
enqueue_resources = 8000
control_files = E:\oracle\TVD\origlogA\cntrl\cntrlTVD.dbf, E:\oracle\TVD\sapdata1\system_1\cntrl\cntrlTVD.dbf, D:\oracle\TVD\saparch\cntrl\cntrlTVD.dbf
db_block_size = 8192
db_cache_size = 251658240
compatible = 9.2.0
log_archive_start = TRUE
log_archive_dest = D:\oracle\TVD\oraarch\TVDarch
log_buffer = 1048576
log_checkpoint_interval = 0
db_files = 254
fast_start_mttr_target = 900
log_checkpoints_to_alert = TRUE
control_file_record_keep_time= 30
dml_locks = 4000
transaction_auditing = FALSE
undo_management = AUTO
undo_tablespace = PSAPUNDO
undo_retention = 43200
remote_os_authent = TRUE
hash_join_enabled = FALSE
background_dump_dest = D:\oracle\TVD\saptrace\background
user_dump_dest = D:\oracle\TVD\saptrace\usertrace
core_dump_dest = D:\oracle\TVD\saptrace\background
optimizer_features_enable= 9.2.0
sort_area_size = 2097152
sort_area_retained_size = 0
db_name = TVD
open_cursors = 800
pga_aggregate_target = 324848844
workarea_size_policy = AUTO
statistics_level = typical
PMON started with pid=2
DBW0 started with pid=3
LGWR started with pid=4
CKPT started with pid=5
SMON started with pid=6
RECO started with pid=7
Thu Nov 22 16:27:48 2007
ARCH: STARTING ARCH PROCESSES
ARC0 started with pid=8
ARC1 started with pid=9
Thu Nov 22 16:27:48 2007
ARC0: Archival started
Thu Nov 22 16:27:48 2007
ARCH: STARTING ARCH PROCESSES COMPLETE
Thu Nov 22 16:27:48 2007
ARC1: Archival started
Thu Nov 22 16:27:48 2007
ARC0: Becoming the 'no FAL' ARCH
Thu Nov 22 16:27:48 2007
ARC1: Becoming the heartbeat ARCH
Thu Nov 22 16:27:48 2007
ARC0: Becoming the 'no FAL' ARCHARC0: Thread not mounted
Thu Nov 22 16:27:48 2007
ARC1: Becoming the heartbeat ARCHARC1: Thread not mounted
Thu Nov 22 16:27:49 2007
alter database mount exclusive
Thu Nov 22 16:27:49 2007
ORA-00202: controlfile: 'E:\oracle\TVD\origlogA\cntrl\cntrlTVD.dbf'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Thu Nov 22 16:27:50 2007
ORA-205 signalled during: alter database mount exclusive...
Shutting down instance (abort)
License high water mark = 1
Instance terminated by USER, pid = 1768
Thu Nov 22 16:28:05 2007
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
SCN scheme 2
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 9.2.0.7.0.
System parameters with non-default values:
processes = 80
sessions = 96
shared_pool_size = 251658240
sga_max_size = 546906620
shared_pool_reserved_size= 24363663
enqueue_resources = 8000
control_files = E:\oracle\TVD\origlogA\cntrl\cntrlTVD.dbf, E:\oracle\TVD\sapdata1\system_1\cntrl\cntrlTVD.dbf, D:\oracle\TVD\saparch\cntrl\cntrlTVD.dbf
db_block_size = 8192
db_cache_size = 251658240
compatible = 9.2.0
log_archive_start = TRUE
log_archive_dest = D:\oracle\TVD\oraarch\TVDarch
log_buffer = 1048576
log_checkpoint_interval = 0
db_files = 254
fast_start_mttr_target = 900
log_checkpoints_to_alert = TRUE
control_file_record_keep_time= 30
dml_locks = 4000
transaction_auditing = FALSE
undo_management = AUTO
undo_tablespace = PSAPUNDO
undo_retention = 43200
remote_os_authent = TRUE
hash_join_enabled = FALSE
background_dump_dest = D:\oracle\TVD\saptrace\background
user_dump_dest = D:\oracle\TVD\saptrace\usertrace
core_dump_dest = D:\oracle\TVD\saptrace\background
optimizer_features_enable= 9.2.0
sort_area_size = 2097152
sort_area_retained_size = 0
db_name = TVD
open_cursors = 800
pga_aggregate_target = 324848844
workarea_size_policy = AUTO
statistics_level = typical
PMON started with pid=2
DBW0 started with pid=3
LGWR started with pid=4
CKPT started with pid=5
SMON started with pid=6
RECO started with pid=7
Thu Nov 22 16:28:08 2007
ARCH: STARTING ARCH PROCESSES
ARC0 started with pid=8
ARC0: Archival started
ARC1 started with pid=9
Thu Nov 22 16:28:08 2007
ARCH: STARTING ARCH PROCESSES COMPLETE
Thu Nov 22 16:28:08 2007
ARC0: Becoming the 'no FAL' ARCH
ARC0: Becoming the 'no FAL' ARCHARC0: Thread not mounted
Thu Nov 22 16:28:09 2007
ARC1: Archival started
Thu Nov 22 16:28:09 2007
ARC1: Becoming the heartbeat ARCH
ARC1: Becoming the heartbeat ARCHARC1: Thread not mounted
Thu Nov 22 16:28:11 2007
CREATE DATABASE TVD CONTROLFILE REUSE MAXLOGFILES 255 MAXLOGMEMBERS 3 MAXLOGHISTORY 1000 MAXDATAFILES 254 MAXINSTANCES 50 NOARCHIVELOG CHARACTER SET WE8DEC NATIONAL CHARACTER SET UTF8 DATAFILE 'E:\oracle\TVD\sapdata1\system_1\system.data1' SIZE 550M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE PSAPTEMP TEMPFILE 'E:\oracle\TVD\sapdata3\temp_1\temp.data1' SIZE 540M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M UNDO TABLESPACE PSAPUNDO DATAFILE 'E:\oracle\TVD\sapdata2\undo_1\undo.data1' SIZE 700M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M
LOGFILE GROUP 1 ('E:
oracle/TVD/origlogA/log_g11m1.dbf',
'D:
oracle/TVD/mirrlogA/log_g11m2.dbf') SIZE 50M REUSE ,
GROUP 2 ('E:
oracle/TVD/origlogB/log_g12m1.dbf',
'D:
oracle/TVD/mirrlogB/log_g12m2.dbf') SIZE 50M REUSE ,
GROUP 3 ('E:
oracle/TVD/origlogA/log_g13m1.dbf',
'D:
oracle/TVD/mirrlogA/log_g13m2.dbf') SIZE 50M REUSE ,
GROUP 4 ('E:
oracle/TVD/origlogB/log_g14m1.dbf',
'D:
oracle/TVD/mirrlogB/log_g14m2.dbf') SIZE 50M REUSE
Thu Nov 22 16:28:12 2007
Database mounted in Exclusive Mode.
Thu Nov 22 16:28:29 2007
Successful mount of redo thread 1, with mount id 1434613531
Assigning activation ID 1434613531 (0x5582771b)
Thread 1 opened at log sequence 1
Thu Nov 22 16:28:30 2007
ARC1: Media recovery disabled
Thu Nov 22 16:28:31 2007
Current log# 1 seq# 1 mem# 0: E:\ORACLE\TVD\ORIGLOGA\LOG_G11M1.DBF
Current log# 1 seq# 1 mem# 1: D:\ORACLE\TVD\MIRRLOGA\LOG_G11M2.DBF
Successful open of redo thread 1
Thu Nov 22 16:28:31 2007
ARC0: Media recovery disabled
Thu Nov 22 16:28:31 2007
SMON: enabling cache recovery
Thu Nov 22 16:28:32 2007
WARNING: Default passwords for SYS and SYSTEM will be used.
Please change the passwords.
Thu Nov 22 16:28:32 2007
create tablespace SYSTEM datafile 'E:\oracle\TVD\sapdata1\system_1\system.data1' SIZE 550M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M
EXTENT MANAGEMENT LOCAL online
Thu Nov 22 16:28:51 2007
Completed: create tablespace SYSTEM datafile 'E:\oracle\TVD\
Thu Nov 22 16:28:51 2007
create rollback segment SYSTEM tablespace SYSTEM
storage (initial 50K next 50K)
Completed: create rollback segment SYSTEM tablespace SYSTEM
Thu Nov 22 16:29:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:29:10 2007
CREATE UNDO TABLESPACE PSAPUNDO DATAFILE 'E:\oracle\TVD\sapdata2\undo_1\undo.data1' SIZE 700M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M
Thu Nov 22 16:29:35 2007
Successfully onlined Undo Tablespace 1.
Completed: CREATE UNDO TABLESPACE PSAPUNDO DATAFILE 'E:\orac
Thu Nov 22 16:29:36 2007
CREATE TEMPORARY TABLESPACE PSAPTEMP TEMPFILE 'E:\oracle\TVD\sapdata3\temp_1\temp.data1' SIZE 540M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M
Completed: CREATE TEMPORARY TABLESPACE PSAPTEMP TEMPFILE 'E:
Thu Nov 22 16:29:36 2007
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE PSAPTEMP
Completed: ALTER DATABASE DEFAULT TEMPORARY TABLESPACE PSAPTE
Thu Nov 22 16:29:39 2007
SMON: enabling tx recovery
Thu Nov 22 16:29:39 2007
Beginning local checkpoint up to RBA [0x1.538b.10], SCN: 0x0000.000019d9
Completed checkpoint up to RBA [0x1.538b.10], SCN: 0x0000.000019d9
kwqplbsc: open notifier exception err 604
replication_dependency_tracking turned off (no async multimaster replication found)
Completed: CREATE DATABASE TVD CONTROLFILE REUSE MAXLOGFILES
Thu Nov 22 16:30:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:31:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:31:28 2007
Beginning log switch checkpoint up to RBA [0x2.2.10], SCN: 0x0000.00006489
Thread 1 advanced to log sequence 2
Thu Nov 22 16:31:28 2007
ARC1: Media recovery disabled
Thu Nov 22 16:31:29 2007
Current log# 2 seq# 2 mem# 0: E:\ORACLE\TVD\ORIGLOGB\LOG_G12M1.DBF
Current log# 2 seq# 2 mem# 1: D:\ORACLE\TVD\MIRRLOGB\LOG_G12M2.DBF
Thu Nov 22 16:32:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:33:08 2007
ARC0: Media recovery disabled
Thu Nov 22 16:33:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:33:16 2007
Completed checkpoint up to RBA [0x2.2.10], SCN: 0x0000.00006489
Thu Nov 22 16:33:26 2007
Beginning log switch checkpoint up to RBA [0x3.2.10], SCN: 0x0000.00009227
Thread 1 advanced to log sequence 3
Thu Nov 22 16:33:26 2007
ARC0: Media recovery disabled
Thu Nov 22 16:33:26 2007
Current log# 3 seq# 3 mem# 0: E:\ORACLE\TVD\ORIGLOGA\LOG_G13M1.DBF
Current log# 3 seq# 3 mem# 1: D:\ORACLE\TVD\MIRRLOGA\LOG_G13M2.DBF
Thu Nov 22 16:34:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:35:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:35:19 2007
Completed checkpoint up to RBA [0x3.2.10], SCN: 0x0000.00009227
Thu Nov 22 16:35:28 2007
Beginning log switch checkpoint up to RBA [0x4.2.10], SCN: 0x0000.0000b0ac
Thread 1 advanced to log sequence 4
Current log# 4 seq# 4 mem# 0: E:\ORACLE\TVD\ORIGLOGB\LOG_G14M1.DBF
Thu Nov 22 16:35:28 2007
ARC1: Media recovery disabled
Thu Nov 22 16:35:28 2007
Current log# 4 seq# 4 mem# 1: D:\ORACLE\TVD\MIRRLOGB\LOG_G14M2.DBF
Thu Nov 22 16:36:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:37:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:38:08 2007
ARC0: Media recovery disabled
Thu Nov 22 16:38:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:38:51 2007
Completed checkpoint up to RBA [0x4.2.10], SCN: 0x0000.0000b0ac
Thu Nov 22 16:38:59 2007
Beginning log switch checkpoint up to RBA [0x5.2.10], SCN: 0x0000.0000e12b
Thread 1 advanced to log sequence 5
Thu Nov 22 16:38:59 2007
Current log# 1 seq# 5 mem# 0: E:\ORACLE\TVD\ORIGLOGA\LOG_G11M1.DBF
Current log# 1 seq# 5 mem# 1: D:\ORACLE\TVD\MIRRLOGA\LOG_G11M2.DBF
Thu Nov 22 16:39:00 2007
ARC0: Media recovery disabled
Thu Nov 22 16:39:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:40:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:41:08 2007
ARC1: Media recovery disabled
Thu Nov 22 16:41:09 2007
Completed checkpoint up to RBA [0x5.2.10], SCN: 0x0000.0000e12b
Thu Nov 22 16:41:18 2007
Beginning log switch checkpoint up to RBA [0x6.2.10], SCN: 0x0000.0000ee94
Thread 1 advanced to log sequence 6
Current log# 2 seq# 6 mem# 0: E:\ORACLE\TVD\ORIGLOGB\LOG_G12M1.DBF
Current log# 2 seq# 6 mem# 1: D:\ORACLE\TVD\MIRRLOGB\LOG_G12M2.DBF
Thu Nov 22 16:41:18 2007
ARC1: Media recovery disabled
Thu Nov 22 16:42:08 2007
Fri Nov 23 07:38:10 2007
ARC1: Media recovery disabled
Regards,
Erick -
Undable to drop tablespace ORA-01561: failed to remove all objects in the
hi,
i am unable to drop table tablespace how can i do that??
please advise
DROP TABLESPACE tbs_tp2 INCLUDING CONTENTS AND datafiles
ERROR at line 1:
ORA-01561: failed to remove all objects in the tablespace specified
Thanks in advance
siva
chennaiHave you tried dropping the objects individually? You can see which objects still belong to this tablespace by using the DBA_SEGMENTS view as shown below:
SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME
FROM DBA_SEGMENTS
WHERE TABLESPACE_NAME=tbs_tp2;HTH! -
Hi
I am having problem in executing the SQL query with certain parameters in the WHERE clause.
ORA-01114: IO error writing block to file 4 (block # 524242)
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
OSD-04026: Invalid parameter passed. (OS 524247)
ORA-01114: IO error writing block to file 4 (block # 524242)
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
OSD-04026: Invalid parameter passed. (OS 524247)
I get the above listed error. And i assumed there may be some issue due to Temp tablespace. I also verified the space occupied by the TEMP tablespace and it was 99% occupied.
Kindly let me know is there a way to extend the space without affecting the existing DB content
Regards
Srinivasan BDidn't you got a answer in your Getting error while executing the SQL ( ver 8.1.7.0.0), did you ?
Furthermore, don't worry about the TEMP tablespace utilization, Oracle doesn't freed space until you need it. By the way, how your TEMP tbs is defined (AUTOEXTEND, DATAFILE/TEMPFILE...) ?
Anyway, you have to be sure about the free space on your device. And check on metalink website to get some notes advices.
Nicolas. -
Dropping Tablespaces ORA 23515 Error
Hi
I am trying to drop a tablespace
DROP TABLESPACE EXAMPLE INCLUDING CONTENTS AND DATAFILES;
I get ORA 23515 Error " Materialized Views and /or their indices exist in the Tablespace"
How to find out which Materialized views and /or indices are to be dropped? Is there a way to find them?You can find materialized views from the database using the following select
select object_name,object_type from dba_objects where owner='xxxxx' and object_type='MATERIALIZED VIEW';
and then drop the MV using command
drop materialized view xxxxx; -
Rman transportable tablespace ORA-39087: directory name is invalid
Hello all,
We are trying to restore a backup of a tablepace using RMAN's TRANSPORTABLE TABLESPACE command. I created the director in oracle (and it exists on the server), granted privs yet it fails with ORA-39087: directory name is invalid. It seems to fail at the end. Here's my steps, does anyone know how to fix? Thanks in advance for your time!
Dave
CREATE DIRECTORY ARCH_DIR as '/opt/oracle/arch';
GRANT IMP_FULL_DB, EXP_FULL_DB TO SYS, RMAN, SYSTEM;
GRANT READ, WRITE ON DIRECTORY ARCH_DIR TO SYS, RMAN, SYSTEM;
export ORACLE_SID=ADMIN_P1
rman target / catalog rman/rmanpassword@mydb
TRANSPORT TABLESPACE REPORTER
TABLESPACE DESTINATION '/opt/oracle/arch'
AUXILIARY DESTINATION '/opt/oracle/arch'
UNTIL SCN 2144439724
DATAPUMP DIRECTORY ARCH_DIR
DUMP FILE 'reporter.dmp'
IMPORT SCRIPT 'reporter.imp'
EXPORT LOG 'reporter.log';Creating a directory object inside the database does not create anything in the operating system. My guess is that the physical directory, with appropriate permissions, does not exist.
-
Tablespace - ORA-00604: error occurred at recursive SQL level 1
I just installed 9i. I tried to use the installer but it kept hanging so I did the database
creation by hand. Anyway does any one have an idea of what is wrong?
SQL> create tablespace cps datafile '/u02/cps' size 1024M;
create tablespace cps datafile '/u02/cps' size 1024M
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01655: unable to extend cluster SYS.C_TS# by 2 in tablespace SYSTEM
ThanksTry the commands:
1 - startup mount
2 - alter database datafile
'C:\ORACLE\ORADATA\LOCALRED\UNDOTBS02.DBF' offline drop
3 - alter database open
4 - drop tablespace <tablespace> including contents [cascade constraints] -
Ora-12913 cannot create managed tablespace
I want to create dictionary managed tablespace so when i type create command i got error ora-12913 cannot create dictionary tablespace .
so at that time I have created locally managed tablespace still iam getting 'ora-12913 cannot create managed tablespace'ORA-12913: Cannot create dictionary managed tablespace
Cause: Attemp to create dictionary managed tablespace in database which has system tablespace as locally managed
Action: Create a locally managed tablespace.
=============================================================================
It's not possible to create a dictionary managed tablespace in a database which has a locally managed SYSTEM tablespace. -
Error in create tablespace statement
Hello
I'm try create a tablespace in oracle 10g r2 database, but this don't support the unlimited parameters. It's true?
See the statement:
SQL> CREATE TABLESPACE "DESENV"
LOGGING
DATAFILE 'c:\dados\basesoracle\orcl10g\desenv.ora' SIZE 2700M REUSE
AUTOEXTEND ON
NEXT 50M
UNLIMITED
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
UNLIMITED
ERROR at line 6:
ORA-02180: invalid option for CREATE TABLESPACEMy old version was oracle8i. He's support this s "unlimited".
This mean not define a limit alocation space in disk to database file. -
Hi Guys I have one doubt regarding tablespace this may be the basic one, kindly post ur views on this.
I am creating one tablespace as
CREATE TABLESPACE WHMTBS
DATAFILE 'G:\ORACLE10G\TABLESPACE\WHMTBS.dbf' SIZE 500M
SEGMENT SPACE MANAGEMENT AUTO
EXTENT MANAGEMENT LOCAL
UNIFORM SIZE 5M
BLOCKSIZE 8K
AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED
when i execute above statement i got an error message as
ORA-02180 Invalid option for create tablespace
I changed my statement as below and executed it works fine
CREATE TABLESPACE WHMTBS
DATAFILE 'G:\ORACLE10G\TABLESPACE\WHMTBS.dbf' SIZE 500M
AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED
SEGMENT SPACE MANAGEMENT AUTO
EXTENT MANAGEMENT LOCAL
UNIFORM SIZE 5M
BLOCKSIZE 8K
Do we need to give the statements in sequential order? It is necessary?
kindly clarify the concept behind it..
Thanks
Vijayaraghavan KYeah, the problem is that the "AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED" refers to the datafile, not the tablespace. In other words, the thing that you are telling Oracle can be autoextended is the datafile not the tablespace.
Hope that helps,
-Mark -
Problem while dropping tablespace
Hi all,
I am getting following error while i am trying to drop tablespace
ORA-02449: unique/primary keys in table referenced by foreign keys.
I am using followin statement to drop tablespace;
drop tablespace QAREF430 including contents and datafiles;
wat might be the problem?
Thanks.wat might be the problem?You have some referential integrity constraints, outside QAREF430 tablespace, pointing to a table inside QAREF430 tablespace. Try
drop tablespace QAREF430 including contents and datafiles cascade constraints; -
ORA-01652 and ORA-02063 in select with dblink
Hello,
I execute the following select in a Oracle database:
SELECT HAC.ENT_ID, HAC.MAT, HAC.IDAC,
NVL(HAC.DATINI, 0) AS DATINI, NVL(HAC.DATEND, 0) AS DATEND,
HAC.TIP, GAP.IDAC AS IDAC_GAP, HAP.IDAC AS IDAC_HAP
FROM USER1.GAP GAP, HAC@DBLINK HAC, HAP@DBLINK HAP
WHERE
HAC.IDAC IN (SELECT DISTINCT IDAC FROM USER1.GAC)
AND HAC.IDAC = GAP.IDAC (+)
AND HAC.IDAC = HAP.IDAC (+)
GAP 157133 regs (873mb)
GAC 13555 regs (462mb)
HAC 57198111 regs (17985mb)
HAP 3940407 regs (14184mb)
GAP, GAC, HAC and HAP are views.
The result is:
ORA-01652: unable to extend temp segment by in tablespace
ORA-02063: preceding line from DBLINK
The tablespace temporal of the local database used is:
TABLESPACE_NAME|USED_EXTENTS|USED_BLOCKS|FREE_EXTENTS|FREE_BLOCKS
ATMP |0 |0 |3157 |409404
It is this tablespace ATMP the one that fills
The tablespace temporal of the remote database is:
TABLESPACE_NAME|USED_EXTENTS|USED_BLOCKS|FREE_EXTENTS|FREE_BLOCKS
HTMP |0 |0 |3157 |409404
- Why happens this, and howto it is possible to solve?
- How count the space consume by a select?
- The select is not good? The intention of the select is to locate erroneous records and to count (dates and times) all the correct records.
- How is it possible to use another temporary tablespace apart from of default of USER1, ATMP?
- I have tried to divide also the select by the field MAT, but every select is late a lot of time, of the order of 4 minutes, and there are approximately 3000 MAT different
- If a solution was to increase ATMP, all that needs?
Thank you very much for the help,
Cesar JorgeThe explain plan is:
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=CHOOSE 316037 G 2836986
MERGE JOIN 316037 G 35319894G 2836986
MERGE JOIN OUTER 2916 G 298814G 2834816
MERGE JOIN OUTER 2916 G 274366G 2834814
SORT JOIN 5 M 498 M 1025633
REMOTE 5 M 498 M 10551 DBLINK SERIAL
SORT JOIN 51 M 440 M 1809181
VIEW USER1.GAP 51 M 440 M 864
MERGE JOIN OUTER 51 M 1G 864
TABLE ACCESS BY INDEX ROWID USER1.T9 (of view USER1.GAP) 882 K 15 M 826
INDEX FULL SCAN USER1.IT9 (of view USER1.GAP) 12 882 K 26
SORT JOIN 5 K 51 K 34
INDEX FAST FULL SCAN USER1.IB9 (of view USER1.GAP) 5 K 51 K 4
SORT JOIN 82 738 3
REMOTE 82 738 1 DBLINK SERIAL
SORT JOIN 10 K 105 K 2170
VIEW SYS.VW_NSO_1 10 K 105 K 2067
SORT UNIQUE 10 K 105 K 2067
TABLE ACCESS FULL USER1.T3 (of view USER1.GAC) 10 K 105 K 1964
Regards -
SYSTEM Tablespace issue (10.2.0.1 database)
Hi ,
Oracle database 10.2.0.1 (upgraded from 8.1.7.0 via 8.1.7.4)...successfully upgraded
Now when we open dbcontrol, we are getting alerts regarding the Tablespace.
It shows two critical alert messages as below :-
1) Tablesapace SYSTEM (dictionary managed) is 95.16 % full
2) 1 segment in SYSTEM tablespace is unable to extend.
Now how to deal with this type of issues ?
Can we extend the size of datafile of SYSTEM Tablespace which is dictionary managed ? or can we add another new datafile to system tablespace ? what is appropriate solution ?SYSTEM Tablespace
How to solve the point no. (2) as the TS is dictionary managed ?
With Regardshi ,
Plz add the datafile to the system tablespace tp increase its size , and the conver the system tablespace from dictionary managed to local.
To Change SYSTEM tablespaces to locally managed follow the below procedures:
Before the SYSTEM tablespace can be migrated to locally managed format, you should ensure the following:
The database has a default temporary tablespace which is not SYSTEM
There are not any rollback segments in dictionary managed tablespaces
There is at least one online rollback segment in a locally managed tablespace, or an undo tablespace (if using automatic undo management mode) should be online.
All tablespaces other than the tablespace containing the undo space (undo tablespace or the tablespace containing the rollback segment) and the default temporary tablespace are in read-only mode.
There is a complete backup of the system.
The system is in restricted mode.
Notr, that we already have an UNDO Tablespace. The following query determines whether the SYSTEM tablespace is locally managed:
SQL> SELECT ts# FROM ts$ WHERE ts# = 0 AND bitmapped <> 0;
If 0 rows are returned, then the SYSTEM tablespace is dictionary managed. Otherwise, the SYSTEM tablespace is locally managed.
Steps to change SYSTEM tablespaces to locally managed
SQL> shutdown immediate
SQL> startup restrict
SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');
ERROR at line 1:
ORA-10644: SYSTEM tablespace cannot be default temporary tablespace
ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
ORA-06512: at line 1
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');
ERROR at line 1:
ORA-10647: Tablespace other than SYSTEM, UNDO, TEMP not
found in read only mode
ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
ORA-06512: at line 1
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
SYSTEM
TEMP
USERS
TAB
IDX
SYSAUX
UNDO
SQL> alter tablespace USERS read only;
SQL> alter tablespace TAB read only;
SQL> alter tablespace IDX read only;
SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');
ERROR at line 1:
ORA-10648: Tablespace SYSAUX is not offline
ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
ORA-06512: at line 1
SQL> alter tablespace SYSAUX offline;
SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');
PL/SQL procedure successfully completed.
Regards,
Mohd Mehraj Hussain
http://mehrajdba.wordpress.com -
TEMPORARY TABLESPACE에서 TEMPFILE 과 DATAFILE의 차이점 (8.1.X ~ 9I)
제품 : ORACLE SERVER
작성날짜 : 2003-11-27
PURPOSE
이 문서에서는 Oracle 7.3부터 사용되어 오던 create tablespace ... temporary
형태와, 8i부터 사용되는 create temporary tablespace... 의 차이점을 정리해
본다.
tablespace의 temporay type과 permanent type에 대한 비교는 <Bulletin#: 11938>
를 참조하도록 하고 여기에서는 permanent에 대해서는 논외로 한다.
Explanation
temporary segment가 생성 가능한 tablespace의 type과 temporary tablesapce에서
datafile과 tempfile의 차이점을 설명한다.
1. temporary segment를 생성가능한 tablespace type 정리
temporary tablespace의 tempfile과 datafile을 비교하기 전에, tablespace의
type들을 확인해 보고, 이 중 temporary segment가 생성될 수 있는 tablespace
type을 version별로 정리해본다.
tablespace는 7.2까지는 permanent type으로 dictionary managed방식으로
space를 할당/해제하던 방식만이 존재했다. db user의 temporary tablespace로
임의의 tablespace를 지정가능하였고, 해당 db user의 sort operation은
지정된 tablespace에서 발생하며, 다른 tablespace와 특별히 구분되는 것은
없었다.
이후, 7.3에 temporary type이 추가되고, 8i에서 locally managed type과 일반
datafile이 아닌 tempfile이 소개되면서 8i를 기준으로 기본적으로 다음과 같이
4가지 형태의 tablespace 형태가 가능하다.
이중 (1) ~ (3)번까지는 일반 datafile형태이고, (4)번의 경우는 이 문서에서
자세히 살펴볼 tempfile이다.
(locally managed와 dictionary managed의 차이점 및 사용 방법은
<Bulletin #: 18261>과 <Bulletin #: 11860> 참조)
(1) permanent-dictionary managed
(2) permanent-locally managed
(3) temporary-dictionary managed
(4) tempfile-locally managed
[주의] 위의 종류에 temporary datafile에 locally managed 형태의 tablespace는
없는것에 주의한다.
그리고 만약 system tablespace가 locally managed로 이미 생성된 경우에는
이후 모든 tablespace는 locally managed로 생성이 가능하고, dictionary
managed 형태는 생성하면 ORA-12913 (Cannot create dictionary managed
tablespace) 오류가 발생하게 된다.
이러한 여러가지 type의 tablespace중 temporary segment를 생성할 수 있는
tablespace에 제약이 존재한다.
- 8i: 어떠한 형태의 tablespace라도 db user의 temporary tablespace로 지정
가능하다. 단, permanent-locally managed 형태의 tablespace에 sort가
발생하게 되면 ORA-3212 (Temporary Segment cannot be created in
locally-managed tablespace) 오류가 발생하게 된다.
SQL> alter user scott temporary tablespace PERM_LOCAL;
User altered.
connect scott/tiger
SQL> select * from dept order by 1;
ORA-03212: Temporary Segment cannot be created in locally-managed
tablespace
- 9i: db user의 default temporary tablespace 지정 자체가 다음 두 가지
type만이 가능한다.
-temporary-dictionary managed
-tempile-locally managed
만약 permanent type의 tablespace를 db user의 tempoary tablespace로
지정하면, ORA-12911 (permanent tablespace cannot be temporary tablespace)
오류가 발생한다.
2. tempfile과 datafile의 비교
아래에서 tablespace지정시 tempfile과 datafile형태를 비교하게 되는데,
단, datafile형태의 경우 permanent type에 대해서는 언급하지 않는다.
(1) tempile의 특징
Oracle7.3에서 tablespace에 생성시 temporary option을 이용하여 생성되는
tablespace를 구성하는 화일은 datafile이다. 단지 이것이 기존의 permanent
type과 구별되는것은 이 tablespace에 생성되는 segment들이 매번 sort
operation마다 별도로 생성되는 대신, 하나의 segment로 만들어지면서
다른 session에서의 sort operation이 같은 segment를 공유하는 것이다.
(자세한 것은 <Bulletin#: 11938> 참조)
Oracle8.1부터 추가된 tempfile형태의 중요한 특징은 tempfile에 발생하는
변경사항은 redo log file에 기록되지 않는다는 것이다. tempfile에
checkpoint정보도 기록하지 않고 이에 따라 datafile recovery시에도
tempfile에 대해서는 recovery가 필요없게 된다.
이와 같은 이유로 standby database에서 read-only mode로 open하고
조회시 sort가 발생하여 tempfile이 변경되는것은 문제가 되지 않아
사용이 가능하다.
그리고 이미 앞에서 설명한 것과 같이 tempfile은 항상 locally managed
type으로만 생성이 되며, datafile형태의 temporary tablespace는 다음과
같이 locally managed type으로 생성 자체가 불가능하다.
SQL> create tablespace temp_datafile_local
2 DATAFILE '/ora/oradata/V920/temp_data.dbf' size 100M
3 TEMPORARY
4 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
ORA-25144: invalid option for CREATE TABLESPACE with TEMPORARY contents
(2) temporary tablespace 생성 방법 비교
- tempfile형태의 경우
tempfile로 temporary tablespace를 생성하는 경우는 다음과 같이
생성하여야 하며, 반드시 locally managed 형태로만 생성 가능하다.
SQL> create TEMPORARY tablespace temp_tempfile_local
2 TEMPFILE '/ora/V920/temp_temp.dbf' size 100M
3 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
아래 명령어에서 3번 line을 제거하고 생성하여도 default로 locally
managed로 생성이 되며, dictionary managed 형태로 생성하고자
3번 line대신 storage option을 추가하면
ORA-2180 (invalid option for CREATE TABLESPACE) 오류가 발생한다.
- datafile형태의 경우
다음과 같은 형태로 생성하게 되면, dictionary managed type의
temporary datafile형태로 tablespace가 만들어진다. 단, 9i의 경우
이미 앞에서 언급한대로 system tablespace가 locally managed인 경우에는
이와 같은 dictionary managed tablespace 생성은 ORA-12913이 발생하면서
불가능하게 된다.
SQL> create tablespace temp_datafile_dict
2 datafile '/ora/oradata/V920/temp_data.dbf' size 100M
3 TEMPORARY;
(3) dictionary view 의 차이
먼저 dba_tablespaces를 통해
SQL> select tablespace_name, contents, extent_management,
allocation_type from dba_tablespaces;
TABLESPACE_NAME CONTENTS EXTENT_MAN ALLOCATIO
TEMP_TEMPFILE_LOCAL TEMPORARY LOCAL UNIFORM
TEMP_DATAFILE_DICT TEMPORARY DICTIONARY
- tempfile의 경우
SQL> select STATUS, ENABLED, NAME from v$tempfile;
STATUS ENABLED NAME
ONLINE READ WRITE /ora/V920/temp_temp.dbf
SQL> select FILE_NAME, TABLESPACE_NAME from dba_temp_files;
FILE_NAME TABLESPACE_NAME
/ora/V920/temp_temp.dbf TEMP_TEMPFILE_LOCAL
- datafile 형태의 경우
다음과 같이 v$datafile과 dba_data_files를 통해 조회한다.
SQL> select STATUS, ENABLED, NAME from v$datafile;
STATUS ENABLED NAME
ONLINE READ WRITE /ora/oradata/V920/temp_data.dbf
SQL> select FILE_NAME, TABLESPACE_NAME from dba_data_files;
FILE_NAME TABLESPACE_NAME
/ora/oradata/V920/temp_data.dbf TEMP_DATAFILE_DICT
(4) tempfile의 삭제에 대해서
datafile의 경우 tablespace를 삭제하지 않고 datafile만 삭제하는 방법은
존재하지 않는다. 물론 alter database datafile 'filename' offline drop;
과 같은 command가 있지만 이것도 datafile을 데이타베이스에서 지워주는
것이 아니며 이렇게 offline drop된 datafile을 포함하는 tablespace는
recovery가 불가능한 경우라면 tablespace자체를 삭제해야 한다.
그런데 tempfile의 경우는 temporary tablespace는 그대로 유지한 채,
tempfile만 삭제하는 것이 가능하다.
SQL> alter database tempfile '/oradata/V817/temp_temp01.dbf'
2 drop;
8i의 경우라면 이와 같은 명령어 후 실제 directory로 이동하여 직접
tmep_temp01.dbf를 삭제하여야 한다.
9i에서는 drop뒤에 including datafiles 라는 option을 추가하여 tempfile의
drop시 바로 os상에서도 삭제되도록 할 수 있다.
SQL> alter database tempfile '/oradata/V817/temp_temp01.dbf'
2 drop including contents;
만약 이러한 방법으로, tempfile을 해당 temporary tablespace에서 모두
삭제한 경우, 실제 해당 tablespace에 disk sort가 필요하게 되면,
그때는 ORA-25153 (Temporary Tablespace is Empty) 오류가 발생하게 된다.
이때는 다음과 같이 임의의 tempfile을 다시 추가할 수 있다.
SQL> alter tablespace TEMP_TEMPFILE_LOCAL
2 add tempfile '/oradata/V817/temp_temp02.dbf';
Reference Documents
<Note:160426.1> TEMPORARY Tablespaces : Tempfiles or Datafiles ?제품 : ORACLE SERVER
작성날짜 : 2003-11-27
PURPOSE
이 문서에서는 Oracle 7.3부터 사용되어 오던 create tablespace ... temporary
형태와, 8i부터 사용되는 create temporary tablespace... 의 차이점을 정리해
본다.
tablespace의 temporay type과 permanent type에 대한 비교는 <Bulletin#: 11938>
를 참조하도록 하고 여기에서는 permanent에 대해서는 논외로 한다.
Explanation
temporary segment가 생성 가능한 tablespace의 type과 temporary tablesapce에서
datafile과 tempfile의 차이점을 설명한다.
1. temporary segment를 생성가능한 tablespace type 정리
temporary tablespace의 tempfile과 datafile을 비교하기 전에, tablespace의
type들을 확인해 보고, 이 중 temporary segment가 생성될 수 있는 tablespace
type을 version별로 정리해본다.
tablespace는 7.2까지는 permanent type으로 dictionary managed방식으로
space를 할당/해제하던 방식만이 존재했다. db user의 temporary tablespace로
임의의 tablespace를 지정가능하였고, 해당 db user의 sort operation은
지정된 tablespace에서 발생하며, 다른 tablespace와 특별히 구분되는 것은
없었다.
이후, 7.3에 temporary type이 추가되고, 8i에서 locally managed type과 일반
datafile이 아닌 tempfile이 소개되면서 8i를 기준으로 기본적으로 다음과 같이
4가지 형태의 tablespace 형태가 가능하다.
이중 (1) ~ (3)번까지는 일반 datafile형태이고, (4)번의 경우는 이 문서에서
자세히 살펴볼 tempfile이다.
(locally managed와 dictionary managed의 차이점 및 사용 방법은
<Bulletin #: 18261>과 <Bulletin #: 11860> 참조)
(1) permanent-dictionary managed
(2) permanent-locally managed
(3) temporary-dictionary managed
(4) tempfile-locally managed
[주의] 위의 종류에 temporary datafile에 locally managed 형태의 tablespace는
없는것에 주의한다.
그리고 만약 system tablespace가 locally managed로 이미 생성된 경우에는
이후 모든 tablespace는 locally managed로 생성이 가능하고, dictionary
managed 형태는 생성하면 ORA-12913 (Cannot create dictionary managed
tablespace) 오류가 발생하게 된다.
이러한 여러가지 type의 tablespace중 temporary segment를 생성할 수 있는
tablespace에 제약이 존재한다.
- 8i: 어떠한 형태의 tablespace라도 db user의 temporary tablespace로 지정
가능하다. 단, permanent-locally managed 형태의 tablespace에 sort가
발생하게 되면 ORA-3212 (Temporary Segment cannot be created in
locally-managed tablespace) 오류가 발생하게 된다.
SQL> alter user scott temporary tablespace PERM_LOCAL;
User altered.
connect scott/tiger
SQL> select * from dept order by 1;
ORA-03212: Temporary Segment cannot be created in locally-managed
tablespace
- 9i: db user의 default temporary tablespace 지정 자체가 다음 두 가지
type만이 가능한다.
-temporary-dictionary managed
-tempile-locally managed
만약 permanent type의 tablespace를 db user의 tempoary tablespace로
지정하면, ORA-12911 (permanent tablespace cannot be temporary tablespace)
오류가 발생한다.
2. tempfile과 datafile의 비교
아래에서 tablespace지정시 tempfile과 datafile형태를 비교하게 되는데,
단, datafile형태의 경우 permanent type에 대해서는 언급하지 않는다.
(1) tempile의 특징
Oracle7.3에서 tablespace에 생성시 temporary option을 이용하여 생성되는
tablespace를 구성하는 화일은 datafile이다. 단지 이것이 기존의 permanent
type과 구별되는것은 이 tablespace에 생성되는 segment들이 매번 sort
operation마다 별도로 생성되는 대신, 하나의 segment로 만들어지면서
다른 session에서의 sort operation이 같은 segment를 공유하는 것이다.
(자세한 것은 <Bulletin#: 11938> 참조)
Oracle8.1부터 추가된 tempfile형태의 중요한 특징은 tempfile에 발생하는
변경사항은 redo log file에 기록되지 않는다는 것이다. tempfile에
checkpoint정보도 기록하지 않고 이에 따라 datafile recovery시에도
tempfile에 대해서는 recovery가 필요없게 된다.
이와 같은 이유로 standby database에서 read-only mode로 open하고
조회시 sort가 발생하여 tempfile이 변경되는것은 문제가 되지 않아
사용이 가능하다.
그리고 이미 앞에서 설명한 것과 같이 tempfile은 항상 locally managed
type으로만 생성이 되며, datafile형태의 temporary tablespace는 다음과
같이 locally managed type으로 생성 자체가 불가능하다.
SQL> create tablespace temp_datafile_local
2 DATAFILE '/ora/oradata/V920/temp_data.dbf' size 100M
3 TEMPORARY
4 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
ORA-25144: invalid option for CREATE TABLESPACE with TEMPORARY contents
(2) temporary tablespace 생성 방법 비교
- tempfile형태의 경우
tempfile로 temporary tablespace를 생성하는 경우는 다음과 같이
생성하여야 하며, 반드시 locally managed 형태로만 생성 가능하다.
SQL> create TEMPORARY tablespace temp_tempfile_local
2 TEMPFILE '/ora/V920/temp_temp.dbf' size 100M
3 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
아래 명령어에서 3번 line을 제거하고 생성하여도 default로 locally
managed로 생성이 되며, dictionary managed 형태로 생성하고자
3번 line대신 storage option을 추가하면
ORA-2180 (invalid option for CREATE TABLESPACE) 오류가 발생한다.
- datafile형태의 경우
다음과 같은 형태로 생성하게 되면, dictionary managed type의
temporary datafile형태로 tablespace가 만들어진다. 단, 9i의 경우
이미 앞에서 언급한대로 system tablespace가 locally managed인 경우에는
이와 같은 dictionary managed tablespace 생성은 ORA-12913이 발생하면서
불가능하게 된다.
SQL> create tablespace temp_datafile_dict
2 datafile '/ora/oradata/V920/temp_data.dbf' size 100M
3 TEMPORARY;
(3) dictionary view 의 차이
먼저 dba_tablespaces를 통해
SQL> select tablespace_name, contents, extent_management,
allocation_type from dba_tablespaces;
TABLESPACE_NAME CONTENTS EXTENT_MAN ALLOCATIO
TEMP_TEMPFILE_LOCAL TEMPORARY LOCAL UNIFORM
TEMP_DATAFILE_DICT TEMPORARY DICTIONARY
- tempfile의 경우
SQL> select STATUS, ENABLED, NAME from v$tempfile;
STATUS ENABLED NAME
ONLINE READ WRITE /ora/V920/temp_temp.dbf
SQL> select FILE_NAME, TABLESPACE_NAME from dba_temp_files;
FILE_NAME TABLESPACE_NAME
/ora/V920/temp_temp.dbf TEMP_TEMPFILE_LOCAL
- datafile 형태의 경우
다음과 같이 v$datafile과 dba_data_files를 통해 조회한다.
SQL> select STATUS, ENABLED, NAME from v$datafile;
STATUS ENABLED NAME
ONLINE READ WRITE /ora/oradata/V920/temp_data.dbf
SQL> select FILE_NAME, TABLESPACE_NAME from dba_data_files;
FILE_NAME TABLESPACE_NAME
/ora/oradata/V920/temp_data.dbf TEMP_DATAFILE_DICT
(4) tempfile의 삭제에 대해서
datafile의 경우 tablespace를 삭제하지 않고 datafile만 삭제하는 방법은
존재하지 않는다. 물론 alter database datafile 'filename' offline drop;
과 같은 command가 있지만 이것도 datafile을 데이타베이스에서 지워주는
것이 아니며 이렇게 offline drop된 datafile을 포함하는 tablespace는
recovery가 불가능한 경우라면 tablespace자체를 삭제해야 한다.
그런데 tempfile의 경우는 temporary tablespace는 그대로 유지한 채,
tempfile만 삭제하는 것이 가능하다.
SQL> alter database tempfile '/oradata/V817/temp_temp01.dbf'
2 drop;
8i의 경우라면 이와 같은 명령어 후 실제 directory로 이동하여 직접
tmep_temp01.dbf를 삭제하여야 한다.
9i에서는 drop뒤에 including datafiles 라는 option을 추가하여 tempfile의
drop시 바로 os상에서도 삭제되도록 할 수 있다.
SQL> alter database tempfile '/oradata/V817/temp_temp01.dbf'
2 drop including contents;
만약 이러한 방법으로, tempfile을 해당 temporary tablespace에서 모두
삭제한 경우, 실제 해당 tablespace에 disk sort가 필요하게 되면,
그때는 ORA-25153 (Temporary Tablespace is Empty) 오류가 발생하게 된다.
이때는 다음과 같이 임의의 tempfile을 다시 추가할 수 있다.
SQL> alter tablespace TEMP_TEMPFILE_LOCAL
2 add tempfile '/oradata/V817/temp_temp02.dbf';
Reference Documents
<Note:160426.1> TEMPORARY Tablespaces : Tempfiles or Datafiles ?
Maybe you are looking for
-
ITunes won't sync pictures to iPod Touch
For some reason, my iTunes will no longer sync pictures from iPhoto to my iPod Touch 1. gen. I tell it to sync the five last photo albums, but during sync I get a error message saying that the archives I'm trying to synchronize do not exist (well, it
-
Hi, Is it possible to open the html editor in a new window when you click on the 'edit online' command ? thanks in advance, Alex
-
hi, I am working in BW project currently and my project is ending in August and i am looking for a permanent opportunity in any organization.my visa status is H1B. This forum helped me a lot many times , so that is the reason which initiated me to
-
Subtitles/captions under title and signs on some new iTunes movies
Recently I purchased "Indiana Jones - The Complete Collection" and was amazed to see that on all four movies, when the movie title is displayed or any sign, foreign subtitles appear underneath and I could not find a way to get rid of them. Subtitles
-
Error on FMFMOAFNP1000001 table during Client Copy
Dears, we are trying to run a Remote Parallel CLient copy from FNP-100 to FNQ-200. The copy fails reporting this error : "FMFMOAFNP1000001 CA-GTF DDIC Error (See SE14)" We check both in source and target system and this table does not exist.Is not vi