Oci_execute() [function.oci-execute]:ORA-25153:Temporary Tablespace isEmpty
hi all,
One of the user told us that they are facing problem while developing membership online fee payment, when theay are trying to access member table in oracle server. It works fine for single or fewer records,but when we try to fetch all records for the purpose of membership/date of birth site it generates some oracle error:
Warning: oci_execute() [function.oci-execute]: ORA-25153: Temporary Tablespace is Empty in /usr/local/apache/htdocs/memberdbupdateoracle.php on line 41
Warning: oci_fetch_array() [function.oci-fetch-array]: ORA-24374: define not done before fetch or execute and fetch in /usr/local/apache/htdocs/memberdbupdateoracle.php on line 49Db version is oracle 9.2.0.6
pls suggest me...
My suggestion is you look up the error message in the online docs, and add the tempfile to the temporary tablespace as indicated.
My suggestion is also you read the Forums Etiquette post, and stop bothering this forum with questions for which you can find the answer yourself without effort.
This forum is not about having someone else do your work for free.
Sybrand Bakker
Senior Oracle DBA
Similar Messages
-
Ora-25153 - temporary-tablespace-is-empty-error-in-oracle/
I get this error after I run my stored procedure.Surprisingly I expec this kind of error before one record could be inserted into any table in the DB.
In my stored procedure ,
a) I first insert a record in a table and then do a insert
select count(*) into l_count from emp;
--this record is inserted.
insert into employee values(lcount);
commit;
b) do more insert inside a loop
loop
--error happens inside the loop
insert into salary values ....
end loop
c) commit outside the loop
The error happens somewhere inside the loop.
Shouldnt I have got the error in the first insert itself ?
Thanks
mHans I know the error and the way to correct
it....but what about my question
1)Why the administrator got the dbms_output error
from PLSQL displayed in SQL PLUS consoleWhat is your understanding of SET SERVEROUTPUT ON in SQLPlus and it's interaction with the DBMS_OUTPUT package?
>
2)why I didnt get to see the error in my sql plus
console (may be I didnt execute set serveroupt on)
What is your understanding of SET SERVEROUTPUT ON in SQLPlus and it's interaction with the DBMS_OUTPUT package?
>
3)why the error was not raised when I inserted one
record in a table ,but gave an error when I entered
the loop (multiple insert/read/delete etc)
Pure speculation here (neds testing by using the loop and determining WHEN it crashes):
Perhaps because temp segments are initially in the PGA and are only written to physical disk (temp tablespace) later. For a single insert, there is no issue - clean PGA, clean 'private' temp segment and away we go. As soon as row 'n' is inserted, the direct access page needs to be backed to temp tablespace and a write occurs. -
ORA-03212 temporary tablespace
Hi all,
we run a single instance database on file system (no ASM).
The database has benn running fine for several weeks now. 2 days ago however the following error came up:
"*** MODULE NAME:(DBMS_SCHEDULER) 2012-09-02 06:00:03.470
*** ACTION NAME:(MGMT_CONFIG_JOB_1) 2012-09-02 06:00:03.470
ERROR: kfnUseConn - failure to make a connection
ORA-03212: Temporary Segment cannot be created in locally-managed tablespace".
I changed the user's (oracle_ocm) temp tablespace to "TEMPORARY LOCAL". which should avoid that error in future.
My question:
What is the appropriate temporary tablespace for system users?
We run quite a lot of databases that were created with version 7.x and migrated up to version 10 or 11. They all used to have PERMANENT tablespaces as temp tbs for the users 'SYS, SYSTEM, DIP, APPQOSSYS, CSMIG' which did not make any problems up to now.
Should I change default temporary tbs to TBLSPC_TEMP for all users including those mentioned above?
FJHPlease post output of below commands :
1. select tablespace_name from dba_data_files where tablespace_name like '%TEMP%';
If you gets any name here, it means your temp tablespace is not really a temp one, its a permanent one whose name is temp, because if you have created temp tablespace with the TEMPFILE keyword, then only its a really temp tablespace. DBA_DATA_FILES do not shows the datafiles which have been created with TEMPFILE keyword.
2.set long 999999;
SELECT DBMS_METADATA.GET_DDL('TABLESPACE','TEMP') FROM DUAL;
In above output if you don't see TEMPFILE keyword then ORA-03212 is correct and as documented.
Now, if you want your TEMPORARY tablespace to be Locally Managed then you should use the TEMPFILE clause and NOT DATAFILE while creating the TEMPORARY TABLESPACE.
create temporary tablespace temp tempfile
'/u10/oradata/cprpt/temp01.dbf' size 250M reuse,
'/u10/oradata/cprpt/temp02.dbf' size 250M reuse,
'/u10/oradata/cprpt/temp03.dbf' size 250M reuse,
'/u10/oradata/cprpt/temp04.dbf' size 250M reuse
extent management local uniform size 3M;
http://www.dbasupport.com/forums/showthread.php?t=31317
Regards
Girish Sharma -
Temporary Tablespace is Empty-Error Exporting
Hi,
Could any one help me in fixing the error in the following text. It is throwing the error when i tried to exp a user from the database using the system privilege.
==========================================================
EXP SYSTEM/SYSTEM@TEMP1 OWNER=CONF GRANTS=Y CONSTRAINTS=Y INDEXES=Y
Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Export done in UTF8 character set and AL16UTF16 NCHAR character set
server uses WE8MSWIN1252 character set (possible charset conversion)
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user CONF
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user CONF
About to export CONF's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
EXP-00056: ORACLE error 25153 encountered
ORA-25153: Temporary Tablespace is Empty
ORA-06512: at "SYS.DBMS_LOB", line 424
ORA-06512: at "SYS.DBMS_METADATA", line 1140
ORA-06512: at line 1
EXP-00000: Export terminated unsuccessfully
==========================================================See, before attempting a sort, you must add a new tempfile datafile to
the tablespace, for example: this migh work for you :-
alter tablespace temp_ro add tempfile
'/spare/sme81/oradata/jb/temp_ro.dbf' size 10m;
hare krishna
Alok -
Error : Temporary Tablespace is Empty when doing expdp/impdp
Hi all,
I was doing expdp on my oracle 10.1.0.2.0 DB on Win XP P, though the user is having a default temporary tablespace with a temp file on autoextend enabled, I got the message as...
ORA-25153: Temporary Tablespace is Empty
Then I created a new temporary tablespace for the user with 500M tempfile and autoextend enabled, then expdp went through.
Now I am doing the impdp for the same .dmp file to generate one sqlfile for the DB,
again I am facing the same error message as...
ORA-25153: Temporary Tablespace is Empty
----- PL/SQL Call Stack -----
object line object
handle number name
17FE07EC 13460 package body SYS.KUPW$WORKER
17FE07EC 5810 package body SYS.KUPW$WORKER
17FE07EC 3080 package body SYS.KUPW$WORKER
17FE07EC 3530 package body SYS.KUPW$WORKER
17FE07EC 6395 package body SYS.KUPW$WORKER
17FE07EC 1208 package body SYS.KUPW$WORKER
17ABE058 2 anonymous block
Job "CHECKUP"."SYS_SQL_FILE_FULL_02" stopped due to fatal error at 10:09
The message indicates that...
ORA-25153: Temporary Tablespace is Empty
Cause: An attempt was made to use space in a temporary tablespace with no files.
Action: Add files to the tablespace using ADD TEMPFILE command.
SO my question is every time I do any imp exp have I to add temp file in my temporary tablespace? will it not be cleared on the completion of the job?
Any advice please.Hi Sabdar,
The result of the query is as...
SQL> SELECT * FROM DATABASE_PROPERTIES where
2 PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE';
PROPERTY_NAME
PROPERTY_VALUE
DESCRIPTION
DEFAULT_TEMP_TABLESPACE
TEMP
Name of default temporary tablespace
So the default temporary tablespace is TEMP which is not having any tempfile as I cloned this DB from the primary DB, but the user I am using for the impdp is 'checkup' and the temporary tablespace for 'checkup' is 'checkup_temp1' which s having tempfile.
SO then why the impdp job is going to server's temporary tablespace instead of user's temporary tablespace.
Is there any way to get whether 'checkup_temp1' tablespace is the default temporary tablespace for 'checkup' or not?
Can I create create the user mentioning default temporary tablespace anyway because it is giving me error as...
SQL> create user suman identified by suman
2 default tablespace checkup_dflt
3 default TEMPORARY TABLESPACE checkup_temp1;
default TEMPORARY TABLESPACE checkup_temp1
ERROR at line 3:
ORA-00921: unexpected end of SQL command
Then I did ...
SQL> create user suman identified by suman
2 default tablespace checkup_dflt
3 TEMPORARY TABLESPACE checkup_temp1;
User created.
Regards -
hi
The error message says ORA-25153: Temporary Tablespace is Empty
at the OS level i can see the datafile whichshould be associated with above tablespace TEMPDB01
In 9i one can add a tempfile to a temporary tablespace tablespace.
if the tempfile is existing on the OS, can we add this file to the above tablespace
thanks
KedarThe error I am getting is dependent on the way I run the command.
With the comma-------------------------------------------------------------------------
SQL> alter tablespace temp add tempfile '/var/oracle/oradata/wxdb/temp01.dbf'
2 size 32000M, autoextend off extent management local uniform size 1m;
size 32000M, autoextend off extent management local uniform size 1m
ERROR at line 2:
ORA-02236: invalid file name
SQL> alter tablespace temp add tempfile '/var/oracle/oradata/wxdb/temp01.dbf'
2 size 32000M, REUSE autoextend off extent management local uniform size 1m;
size 32000M, REUSE autoextend off extent management local uniform size 1m
ERROR at line 2:
ORA-02236: invalid file name
Without comma-----------------------------------------------------------------------------------------------
SQL> alter tablespace temp add tempfile '/var/oracle/oradata/wxdb/temp01.dbf'
2 size 32000M autoextend off extent management local uniform size 1m;
size 32000M autoextend off extent management local uniform size 1m
ERROR at line 2:
ORA-00933: SQL command not properly ended
SQL> alter tablespace temp add tempfile '/var/oracle/oradata/wxdb/temp01.dbf'
2 size 32000M REUSE autoextend off extent management local uniform size 1m;
size 32000M REUSE autoextend off extent management local uniform size 1m
ERROR at line 2:
ORA-00933: SQL command not properly ended
Now if I make changes to my directory structure to match that of the database this clone comes from and run the same commands I get.
With comma-----------------------------------------------------------------
SQL> alter tablespace temp add tempfile '/var/data/oradata/wxdb/temp01.dbf'
2 size 32000M, autoextend off extent management local uniform size 1m;
size 32000M, autoextend off extent management local uniform size 1m
ERROR at line 2:
ORA-02236: invalid file name
SQL> alter tablespace temp add tempfile '/var/data/oradata/wxdb/temp01.dbf'
2 size 32000M, autoextend off extent management local uniform size 1m;
size 32000M, REUSE autoextend off extent management local uniform size 1m
ERROR at line 2:
ORA-02236: invalid file name
Without comma------------------------------------------------------------------------------------
SQL> alter tablespace temp add tempfile '/var/oracle/oradata/wxdb/temp01.dbf'
2 size 32000M autoextend off extent management local uniform size 1m;
size 32000M autoextend off extent management local uniform size 1m
ERROR at line 2:
ORA-00933: SQL command not properly ended
SQL> alter tablespace temp add tempfile '/var/oracle/oradata/wxdb/temp01.dbf'
2 size 32000M REUSE autoextend off extent management local uniform size 1m;
size 32000M autoextend off extent management local uniform size 1m
ERROR at line 2:
ORA-00933: SQL command not properly ended
Im going to go on a limb, and say the proper command includes the comma. Since with it, it seems to give a more senseable output
-Joseph -
Help!!! Temporary tablespace issue
Hi,
10g
I had 2 tablespaces temp1 and temp2
temp1 was created as a normal tablespace as temporary.
temp2 was created as a temporary tablespace.
I queried and found out that the temporary tablespace for all the users are temp1(including system)
and hence I saw the error ORA-25153: Temporary Tablespace is Empty
So what I did is I drop the tablespace temp1 and tried assigning the users to temp2.
I am getting error
Now I am not able to create anything the database.
Please see below example
SQL> drop user test;
User dropped.
SQL> create user test identified by test;
create user test identified by test
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00959: tablespace 'TEMP1' does not exist
I did a restart of database but still the users are assigned to temp1 which is not there
Please help !!!!!!!!!!!!!!!!!!PROPERTY_NAME
PROPERTY_VALUE
DESCRIPTION
DEFAULT_TEMP_TABLESPACE
TEMP2
Name of default temporary tablespace
SQL> SQL>
PROPERTY_NAME
PROPERTY_VALUE
DESCRIPTION
DEFAULT_TEMP_TABLESPACE
TEMP2
Name of default temporary tablespace
====================================================
SQL> SQL>
TABLESPACE_NAME
FILE_NAME
BYTES/1024/1024 MAXBYTES/1024/1024 AUT
TEMP2
/db08/oracle/bricry1/TEMP02.DBF
500 0 NO
TEMP2
/db08/oracle/bricry1/TEMP02_2.DBF
500 0 NO
TABLESPACE_NAME
FILE_NAME
BYTES/1024/1024 MAXBYTES/1024/1024 AUT
TIVOLIORTEMPTS
/db08/oracle/bricry1/tivoliortempts_01.dbf
25 0 NO
=========================================
SQL> SQL>
TEMPORARY_TABLESPACE
TIVOLIORTEMPTS
TEMP2
TEMP1
SQL> SQL>
SQL> -
TEMPORARY TABLESPACE에서, TEMPFILE을 사용할지, DATAFILE을 사용 할지 결정에 필요한 지침
제품 : ORACLE SERVER
작성날짜 : 2003-02-24
TEMPORARY TABLESPACE에서, 임시 파일을 사용할지, 데이터파일을 사용 할지 결정에 필요한 지침
===========================================================================================
PURPOSE
이 문서는, TEMPORARY TABLESPACE에서 임시 파일과 데이터파일의 차이점을
소개하는 데 목적이 있다.
Explanation
| TEMPORARY | Tablespace |
| tablespace | TEMPORARY |
| Locally | Dictionary |
| managed | managed |
| Datafiles | impossible | Y |
| Tempfiles | Y | impossible |
------------------------------------------+
다른 조합은 허용되지 않는다.
1. TEMPORARY Tablespace / Tablespace TEMPORARY 와 PERMANENT tablespace 비교
1) Tablespace TEMPORARY는 오라클 7.3 이상 버젼에서 사용가능하다.
=> Tablespace TEMPORARY는 다음과 같은 명령을 사용하여 생성한다.
CREATE TABLESPACE .. TEMPORARY
이 경우 데이터파일만을 사용한다.
2) TEMPORARY tablespac는 오라클 8i 이상 버젼에서 사용 가능하다
=> TEMPORARY tablespace는 다음과 같은 명령을 사용하여 생성한다
CREATE TEMPORARY TABLESPACE .. TEMPFILE
이 경우 tempfile만 사용할 수 있다.
3) Tablespace TEMPORARY/TEMPORARY tablespace는 DBA_TABLESPACES의
CONTENTS 값이 TEMPORARY로 나타난다.
4) Tablespace TEMPORARY/TEMPORARY tablespace 는 PERMANENT
tablespace와 다르며 (DBA_TABLESPACES.CONTENTS 값이 PERMANENT임)
permanent segment를 생성 할 수 없다. 예를 들어, permanent table이나
index, cluster, rollback segment등을 Tablespace TEMPORARY/TEMPORARY
tablespace에 생성할 수 없다.
5) Tablespace TEMPORARY/TEMPORARY tablespace 에서는, 단일한
temporary segment를 제공하며, 이 세그먼트는 다음과 같은
요구사항을 가진 모든 사용자에 의해 공유된다.
=> sort 작업에 따른 sort extents를 필요로 하는 사용자
=> GLOBAL TEMPORARY TABLE에 필요한 temporary extents
이와 같은 고유한 temporary segment는 동시에 많은 양의 sort 작업이
수행되거나, 여러 트랜잭션이 동일한 temporary table을 사용할 때,
permanent tablespace에서 작업하는 overhead를 피하고, 오라클의
공간 관리 작업의 부하를 피하는데 도움을 준다.
6) Temporary segment는 인스턴스 구동후 사용자가 sort extent나
sort run, 또는 global temporary table 생성등의 요청에 따라
자동적으로 생성된다.
7) Temporary segment는 인스턴스 shutdown시 자동적으로 drop 된다.
8) Temporary Content를 저장하는 테이블스페이스에 대한
세그먼트의 공간 할당/할당 해제 관련 정보는 V$SORT_SEGMENT와
V$SORT_USAGE 뷰를 사용하여 확인해 볼 수 있으며, sort segment
등에 현재 sort를 진행하는 사용 정보를 보여준다.
9) 위와 같은 작업을 수행하는데 PERMANENT tablespace 보다는
tablespace TEMPORARY를 사용하는 것이 유리한 점은 <Bulletin No:
11938>에 자세히 기술되어 있따.
10) 오라클 8i에서는, 사용자별 default temporary tablespace가 어떤
종류라도 상관이 없으나, PERMANENT locally managed 방식의 테이블
스페이스는 지정할 수 없다. 다음은 PERMANENT locally managed 방식의
테이블스페이스를 default temporary tablespace로 지정하여 발생하는
에러이다.
SQL> alter user x temporary tablespace PERM_LOCAL;
User altered.
SQL> select * from dba_tables order by 3,2,6,4,7,9,1,5;
select * from dba_tables order by 3,2,6,4,7,9,1,5
ERROR at line 1:
ORA-03212: Temporary Segment cannot be created in locally-managed tablespace
오라클 9i에서는 사용자별 default temporary tablespace가
어떤 TEMPORARY 타입이라도 무방하다.
=> TEMPORARY tablespace locally managed
=> tablespace TEMPORARY dictionary managed
PERMANENT locally-managed 타입의 테이블스페이스를 사용자의
TEMPORARY tablespace으로 지정할 때 다음과 같은 에러가 발생한다.
SQL> alter user x temporary tablespace PERM_LOCAL;
alter user x temporary tablespace PERM_LOCAL
ERROR at line 1:
ORA-12911: permanent tablespace cannot be temporary tablespace
2. TEMPORARY Tablespace/Tempfiles 대비 Tablespace TEMPORARY/Datafile
1) 공간관리
공간 관리는, locally managed tablespace에서 훨씬 단순하고, 또
효율적이기 때문에, TEMPORARY tablespace를 사용하는 것이
바람직하다. Local managedment 방식에서 사용 가능한 유일한
방식이 temporary tablespace 방식이다.
SQL> create tablespace temp1
2 DATAFILE '/ora/ora817/32/oradata/V817/temp1.dbf' size 100M
3 TEMPORARY
4 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
create tablespace temp1
ERROR at line 1:
ORA-25144: invalid option for CREATE TABLESPACE with TEMPORARY contents
Dictionary-managed tablespace 대비 locally-managed tableapce의 장점은
<Bulletin No: 18261>에 자세히 기술되어 있다.
오라클 8i에서는, sort segment가 locally managed permanent tablespace에
생성될 수 없으므로, locally managed TEMPORARY tablespace를 사용하여야
한다.
Locally managed temporary tablespace는 tempfile을 사용하며, temporary
tablespace 바깥 데이터에 전혀 영향을 주지 않으면서, temporary tablespace
관련 데이터에 대한 redo정보가 생성되지 않는다.
이 테이블스페이스는, standby database나 read-only database에서도
사용 가능하다.
2) View
TEMPORARY tablespace 와 연관된 파일 목록은 V$TEMPFILE 과
DBA_TEMP_FILES 뷰를 통해 확인할 수 있다.
SQL> select * from dba_tablespaces;
TABLESPACE_NAME CONTENTS EXTENT_MAN
TEMP_TEMPFILE_LOCAL TEMPORARY LOCAL
TEMP_DATAFILE_DICT TEMPORARY DICTIONARY
SQL> select STATUS, ENABLED, NAME from v$tempfile;
STATUS ENABLED NAME
ONLINE READ WRITE /tcase/oradata/V901/temp_temp01.dbf
SQL> select FILE_NAME, TABLESPACE_NAME from dba_temp_files;
FILE_NAME TABLESPACE_NAME
/tcase/oradata/V901/temp_temp01.dbf TEMP_TEMPFILE_LOCAL
위 내용은 tablespace TEMPORARY 환경에서 V$DATAFILE 와
DBA_DATA_FILES를 사용하는 것에 비길 수 있다.
SQL> select STATUS, ENABLED, NAME from v$datafile;
STATUS ENABLED NAME
ONLINE READ WRITE /tcase/oradata/V901/temp_data01.dbf
SQL> select FILE_NAME, TABLESPACE_NAME from dba_data_files;
FILE_NAME TABLESPACE_NAME
/tcase/oradata/V901/temp_data01.dbf TEMP_DATAFILE_DICT
3) 권한
Temporary tablespace 또는 tablespace temporary 생성을 위해서는
CREATE TABLESPACE system privilege가 필요하다.
4) TEMPORARY Tablespace 생성
SQL> create TEMPORARY tablespace temp_tempfile_local
2 TEMPFILE '/ora/V817/temp_temp.dbf' size 100M
3 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
참고: 일부 OS에서는 tempfile block이 실제 액세스 되기
전 까지 tempfile이 실제로 생성되지 않는다. 이와 같은
파일 생성 작업이 지체되어 처리 되는 것은, tempfile의
생성과 크기 조정이 신속하게 처리되는데 도움이 된다.
그러나, tempfile이 나중에 생성되더라도, 생성 가능한
충분한 디스크 공간이 있어야 하겠다.
사용중인 O/S에서 tempfile이 실제 생성되는 시점은
플랫폼별 매뉴얼에 기술되어 있다.
Tablespace TEMPORARY의 생성
SQL> create tablespace TEMP_DATAFILE_DICT
2 datafile '/tcase/oradata/V901/temp_data.dbf' size 100M
3 TEMPORARY;
Tablespace created.
5) Tempfile/Datafile 제거
a. 테이블스페이스를 drop 하기 전까지 테이블스페이스의 datafile을
제거할 수 없다.
참고: 오라클 9i에서 DROP TABLESPACE 명령에 추가된
INCLUDING CONTENTS AND DATAFILES 절을 사용하면, OS로 부터
관련 데이터파일도 삭제하는 작업을 자동화 할 수 있다.
b. Temporary tablespace로 부터 tempfile을 삭제하고, 논리 구조를
비어 있는 상태로 유지할 수 있다.
=> 오라클 8i:
SQL> alter tablespace TEMP_TEMPFILE_LOCAL
2 add tempfile '/oradata/V817/temp_temp01.dbf';
Tablespace altered.
SQL> alter database tempfile '/oradata/V817/temp_temp01.dbf'
2 drop;
Database altered.
SQL> !ls /oradata/V817/temp_temp01.dbf
/oradata/V817/temp_temp01.dbf
위 명령을 수행 한 후, tempfile을 시스템으로 부터 삭제하고,
나중에 다시 추가 시킬 수 있다.
SQL> alter tablespace TEMP_TEMPFILE_LOCAL
2 add tempfile '/oradata/V817/temp_temp01.dbf';
Tablespace altered.
=> 오라클 9i: OS 파일을 삭제 하기 위해 INCLUDING DATAFILES
절을 사용할 수 있다.
SQL> alter database tempfile '/oradata/V901/temp_temp01.dbf'
2 drop including datafiles;
Database altered.
SQL> !ls /oradata/V901/temp_temp01.dbf
/oradata/V901/temp_temp01.dbf not found
Temporary tablespace로 부터 모든 tempfile을 삭제하면,
다음과 같은 에러가 발생할 수 있다.
SQL> alter table olap.test add primary key (c);
alter table olap.test add primary key (c)
ERROR at line 1:
ORA-25153: Temporary Tablespace is Empty
ORA-25153
25153, 00000, "Temporary Tablespace is Empty"
// *Cause: An attempt was made to use space in a temporary tablespace with
// no files.
// *Action: Add files to the tablespace using ADD TEMPFILE command.
이 에러 메시지는 동시 작업 수행시 디스크를 실제 액세스 하여야
할 경우 발생하게 된다.
Example
Reference Documents
<Note:132663.1> ORA-03296 Resizing Temporary Locally Managed Tablespace
<Note:131769.1> ORA-03212 at Instance Startup
<Note:102339.1> Temporary Segments: What Happens When a Sort Occurs
<Note:160426.1> TEMPORARY Tablespaces : Tempfiles or Datafiles -
ORA-39125 importing tablespace
Oracle SE 10g
SO- Unix
I'm traying import a tablespace using EM, but y got this error, can somebody give me an advise?
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS while calling DBMS_LOB.CREATETEMPORARY []
ORA-25153: Temporary Tablespace is Empty
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPW$WORKER", line 6228
----- PL/SQL Call Stack -----
object line object
handle number name
c000000116b34ee8 14916 package body SYS.KUPW$WORKER
c000000116b34ee8 6293 package body SYS.KUPW$WORKER
c000000116b34ee8 9108 package body SYS.KUPW$WORKER
c0
00000116b34ee8 3870 package body SYS.KUPW$WORKER
c000000116b34ee8 6910 package body SYS.KUPW$WORKER
c000000116b34ee8 1259 package body SYS.KUPW$WORKER
c0000001167c3828 2 anonymous blockThe normal procedure would be
- one reads the error stack
- one decides the second line is the most important error message
- one looks this error up in the documentation
- (error specifc)) one fixes this error making sure the temporary tablespace actually does have a tempfile
The procedure here seems to be:
- one hits CTRL-C
- one dumps it in this forum, without doing anything
not learning to be independent.
Sybrand Bakker
Senior Oracle DBA -
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 ? -
ORA-00600 Error, when Dropping one temporary tablespace
Hi,
I am using Oracle 10.1.0.2.0 on WinXPP, after I created a new temp tablespace and assigned one user to it as its temp tablespace, then trying to drop the old temp tablespace , I am getting the following Error . Can anybody pl. explain the reason.
Steps I followed as...
SYSTEM@orcl>create temporary tablespace checkup_tmp tempfile 'c:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL \CHECKUP_Tmp.dat' size 500M;
Tablespace created.
SYSTEM@orcl> alter user checkup temporary tablespace checkup_tmp;
User altered.
SYSTEM@orcl> drop tablespace CHECKUP_TEMP including contents;
drop tablespace CHECKUP_TEMP including contents
ERROR at line 1:
ORA-00600: internal error code, arguments: [krf_gen_drop_tablespace-1], [], [],
SYSTEM@orcl> drop tablespace CHECKUP_TEMP ;
drop tablespace CHECKUP_TEMP
ERROR at line 1:
ORA-00600: internal error code, arguments: [krf_gen_drop_tablespace-1], [], [],
Thanks in advancethis is the bug 3984486
consider upgrading.
the workaround seems to flashback the DB... -
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 ... -
ORA-03217: invalid option for alter of TEMPORARY TABLESPACE
Hi all
I have a database with 300 Users approximantely.
Suddenly I was reported about slowly connection and looked to my database. And I saw that Temporary tablespace with name MUVTEMP is 0% used and in it there is no .dbf file
Then I do ls on my data files directory and saw there MUVTEMP01.dbf!
But it's not using it. Then I want to add another .dbf file. It created this file physically but not joined it to my temporary tablespace.
Then I did it with Oracle EM, clicked on "Show SQL" and there was written
ALTER TABLESPACE "MUVTEMP"
ADD
DATAFILE '/home/oracle/OraHome1/oradata/linux/test.dbf' SIZE
5M
I run it from EM it gave this error
ORA-03217: invalid option for alter of TEMPORARY TABLESPACE
Then I run this SQL in sqlplus
ALTER TABLESPACE "MUVTEMP"
ADD
TEMPFILE '/home/oracle/OraHome1/oradata/linux/test.dbf' SIZE
5M
it created file physically, but I can't see this file as temporary tablespace's file. It's not using....
Where is my mistake???
Thanks...Hi,
try this query:
select s.sid || ',' || s.serial# sid, s.username, u.tablespace, substr(a.sql_text, 1, (instr(a.sql_text, ' ')-1)) sql_text,
round(((u.blocks*p.value)/1024/1024),2) size_mb
from v$sort_usage u, v$session s, v$sqlarea a, v$parameter p
where s.saddr = u.session_addr
and a.address (+) = s.sql_address
and a.hash_value (+) = s.sql_hash_value
and p.name = 'db_block_size'
group by s.sid || ',' || s.serial#, s.username, substr(a.sql_text, 1, (instr(a.sql_text, ' ')-1)), u.tablespace, round(((u.blocks*p.value)/1024/1024),2); -
Although my temporary tablespace is enough space,the error occurs ORA-01652
Hello,
Although my temporary tablespace is enough space ,i am taking an error ORA-01652 and some dbfs in the tablespace are looks like as offline and it’s size looks like as 0 byte.
So that i am changing status of these datafiles to online with this command as follows;
ALTER DATABASE TEMPFILE '/QDBP/q023/q023/temp/qt_lm_tmp01.dbf' ONLINE;
Also, The disk that exist these datafiles was 0 in availibility.
When i issued the command df –k as follows
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/qdbpdg/volq23 20971520 20971520 0 100% /QDBP/q023
is pointed.
And then i have released space from disk
The current review is
/dev/vx/dsk/qdbpdg/volq14 157286400 21731141 127083885 15% /QDBP/q014
My queries and results are for the hint of about the problem:
SELECT A.tablespace_name TABLESPACE, D.mb_total,
SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_used,
D.mb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_free
FROM v$sort_segment A,
SELECT B.NAME, C.block_size, SUM (C.bytes) / 1024 / 1024 mb_total
FROM v$tablespace B, v$tempfile C
WHERE B.ts#= C.ts#
GROUP BY B.NAME, C.block_size
) D
WHERE A.tablespace_name = D.NAME
GROUP BY A.tablespace_name, D.mb_total;
TABLESPACE |MB_TOTAL| MB_USED| MB_FREE
QT_LM_TMP |61440 |12| 61428 --temporary
TS_TEMP_SDPA |15360 |0| 15360 –temporary
Separately,i want to see you a view about alert log like points below.
KCF: write/open error block=0x1b6e0a online=1
file=3 /QDBP/q014/q014/temp/qt_lm_tmp03.dbf
error=27063 txt: 'SVR4 Error: 28: No space left on device
Additional information: -1
Additional information: 8192'
Automatic tempfile offline due to write error on
file 3: /QDBP/q014/q014/temp/qt_lm_tmp03.dbf
With sum,i have some question like below:
1)Although there is enough space on temporary tablespace why i take error ORA-01652?
2)Although there is enough space on temporary tablespace why databasefiles have offline status suddenly?
3) is it important fully rate of disk on operating system if there is enough space on temporary tablespace which has extend properties.
Best regards
Oya YALÇINHi,
i don't make tablespaces offline mode.But neverthless i don't understant although there is enough space on tablespace why tablespaces are being offline status mode itself?
When i look at ‘ select file_name,status from dba_temp_files ‘ query on the database now.The result is like below;
FILE_NAME|STATUS
/QDBP/q023/q023/temp/qt_lm_tmp01.dbf|AVAILABLE
/QDBP/q023/q023/temp/qt_lm_tmp02.dbf|AVAILABLE
/QDBP/q014/q014/temp/qt_lm_tmp03.dbf|AVAILABLE
/QDBP/q023/q023/temp/ts_temp_sdpa01.dbf|AVAILABLE
/QDBP/q023/q023/temp/ts_temp_sdpa02.dbf|AVAILABLE
/QDBP/q014/q014/temp/qt_lm_tmp04.dbf|AVAILABLE
/QDBP/q014/q014/temp/qt_lm_tmp05.dbf|AVAILABLE
But when i look at first 3 dbf by orderly from tab of scripts about tablespaces on toad tool
i see that like below;
ALTER DATABASE TEMPFILE '/QDBP/q023/q023/temp/qt_lm_tmp01.dbf' OFFLINE;
ALTER DATABASE TEMPFILE '/QDBP/q023/q023/temp/qt_lm_tmp02.dbf' OFFLINE;
ALTER DATABASE TEMPFILE '/QDBP/q014/q014/temp/qt_lm_tmp03.dbf' OFFLINE;
And their size is look like 0 .
Regards
Oya. -
How do i know if my query using SORT_AREA_SIZE or temporary tablespace ?
Good Morning Everyone !
My DB version is 10.2.0.1
I have large table exactly 3 million records.
SQL> select count(*) from tab1;
COUNT(*)
300000
SQL> select * from tab1 order by no DESC;
sorting ... in process
300000 rows selected.
in Terminal 2 : I tried to find sorting details - ( No rows selected - why ? )
SQL> select USERNAME , USER , TABLESPACE , SQL_ID from v$tempseg_usage ;
no rows selected
SQL> /
no rows selected
When i google i have seen this ;
If Oracle cannot do the sort in memory (SORT_AREA_SIZE initialisation parameter), space will be allocated in a temporary tablespace for doing the sort operation.
REF_LINK : TEMPORARY Tablespaces and TEMPFILES | Oracle FAQ
MY DOUBT QUESTION : How do i know if my query using SORT_AREA_SIZE or temporary tablespace ?
Thanks in advance.@ JohnWatson
I have seen some articles from ORA - FAQ. Good.
SQL> select USERNAME , USER , TABLESPACE , SQL_ID from v$tempseg_usage;
USERNAME USER TABLESPACE SQL_ID
SCOTT SYS TEMP fh9vqgyd6m0d1
PGA management means that sorting only 300000 rows may well occur in memory
Is this (3 million rows) - standard value for 10g version ?
Thanks JohnWatson
Maybe you are looking for
-
I play an app called Hotties for Sale. Until yesterday I was able to operate several accounts on the game simultaneously by using separate tabs for each account. Now I can only open one account at a time with a single tab. When I open a second tab I
-
How many machines can I install the $79.99 version on?
How many machines can I install the $79.99 version on?
-
Extended Desktop - Assigning Spaces
Is it possible to make a second display it's own 'space' when using an extended desktop? I recently started using a second monitor when I am at home, and I'd like to set it up so that certain applications always open up on the extended desktop. Any i
-
Threaded Sudoku solver - Assignment question (NOT LOOKING FOR ANSWERS )
Hi All, I'm going to be upfront and point out this is an assignment that i'm currently working on and i'm not receiving much in the way of feedback from the class forums. This is currently a 4th year OO assignment for UNSW Australia. What I am having
-
Transferring data from different servers of different versions.
I have got data on Oracle 7.3 on one server and i want to transfer it to the another server on another location having version 8.1.5 . Both of these servers can be connected and communicated properly. My problem is how to transfer this data? I have t