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
m
Hans 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.
Similar Messages
-
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 -
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 -
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 -
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 -
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 ? -
Temporary Tablespace: cannot check it from V$TEMP_SPACE_HEADER
I've created the temporary tablespace but I cannot check it from V$TEMP_SPACE_HEADER, when I select the contents of it, it returns "no rows selected".
Could someone tell me why?
Besides, I would like to know how to check the contents in temporary table space.
Regards,
JimmyHi,
I think you just did not create a TEMPORARY TABLESPACE but a PERMANENT TABLESPACE with TEMPORARY OPTION..10:43:10 TEST.SQL>CREATE TABLESPACE TS
10:43:21 2 DATAFILE '/F1.dbf' SIZE 15M
10:43:40 3 TEMPORARY;
Tablespace created.
Elapsed: 00:00:02.66
10:43:44 TEST.SQL>SELECT * FROM V$TEMP_SPACE_HEADER;
TABLESPACE_NAME FILE_ID BYTES_USED BLOCKS_USED BYTES_FREE BLOCKS_FREE RELATIVE_FNO
TMP 1 2,2424E+10 2737280 3790602240 462720 1
Elapsed: 00:00:00.01
10:43:56 TEST.SQL>SELECT * FROM DBA_TABLESPACES WHERE TABLESPACE_NAME IN ('TMP','TS');
TABLESPACE_NAME BLOCK_SIZE INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE MIN_EXTLEN STATUS CONTENTS LOGGING FOR EXTENT_MAN ALLOCATIO PLU
SEGMEN DEF_TAB_
TS 8192 40960 40960 1 50 0 ONLINE TEMPORARY LOGGING NO DICTIONARY USER NO
MANUAL DISABLED
TMP 8192 5242880 5242880 1 0 5242880 ONLINE TEMPORARY NOLOGGING NO LOCAL UNIFORM NO
MANUAL DISABLED As you can see from this sample, if you useCREATE TABLESPACE blablabla DATAFILE blabla TEMPORARYOracle creates a tablespace that looks to be a pure temporary tablespace but in fact is not actually. It can be used as a TEMP would be but has not all the characteristics of it. Heh, it's got a DATAFILE, not a TEMPFILE in it.
If you use CREATE TEMPORARY TABLESPACE blabla TEMPFILE blabla then Oracle will create an actual TEMPORARY TABLESPACE which will be present in all temporary related views!
You can't distinguish one from the other via standard views (DBA_TABLESPACES) once it's been created.
To check temp space usage you can use something like:SELECT
RPAD(TF.TABLESPACE_NAME,20) || ':' ||
DECODE(EXTENT_MANAGEMENT,'LOCAL','LM-','DM-') ||
SUBSTR(ALLOCATION_TYPE,1,1)||'+'||
SUBSTR(SEGMENT_SPACE_MANAGEMENT,1,1)||'@'||
SUBSTR(TS.STATUS,1,2)
TABLESPACE_NAME,
TF.FILE_NAME,
USAGE.USERNAME,
USAGE.SEGTYPE,
LPAD(USAGE.BLOCKS*TBLKS.BLOCKSIZE/1024/1024,5) || ' Mo' BLOCKS
FROM
DBA_TEMP_FILES TF,
V$TEMPSEG_USAGE USAGE,
(SELECT VALUE BLOCKSIZE FROM V$PARAMETER WHERE NAME='db_block_size') TBLKS,
DBA_TABLESPACES TS
WHERE
USAGE.TABLESPACE=TF.TABLESPACE_NAME
AND TS.TABLESPACE_NAME=TF.TABLESPACE_NAME
ORDER BY TF.TABLESPACE_NAME, TF.FILE_NAME, USAGE.USERNAME;Regards,
Yoann. -
Hi,
How to view the temporary tablespace usage?
How to deallocate the used temporary tablespace segments/ resize temporary tablespace?
I am running a query which is consuming 4GB temporary tablespace and failing.
pga_aggregate_traget=500m;
oracle -9.2.0.1.0
OS:Windows 2003
How to solve this?
regards
MathewHi,
We are using the following View and it is fetchhing 46,56,00,000 rows.
PGA=500m
While running the query temporary tablespace is growing upto 4GB and query is failling.
CREATE OR REPLACE FORCE VIEW MHUBADMIN.LOAN_PIPELINE_VIEW
(LOAN_ID, USER_ID, FIRST_NAME, LAST_NAME, BORROWER_NAME,
SSN, USERNAME, SELLERLOANNUMBER, LOANNUMBER, LOANAMOUNT,
STATUS_DESC, LOAN_TYPE, LOCK_EXPIRE_DATE, ORG_NAME, ORG_PARENT_ID,
ORG_CHILD_ID, NO_CASCADE_FLAG, PRODUCT_NAME, INT_RATE, UPDATE_DATE,
UPDATE_DATE_STR, CURRENT_DATE, LOWER_FIRST_NAME, LOWER_LAST_NAME, LOWER_SSN,
LOWER_STATUS_DESC, STATUS_ID, AMORTIZATION_TYPE, STREET1, LOCK_EXTEN_EXPIR_DATE,
RELOCK_EXPIR_DATE, LOCK_RELOCK_COUNT, UNDERWRITE_FLAG, RECENT_EXPIR_DATE, STATUS_DATE)
AS
SELECT
LOAN.loan_id,
LOAN.user_id,
PERSON.first_name,
PERSON.last_name,
PERSON.last_name||', '||PERSON.first_name AS Borrower_Name,
PERSON.ssn,
HUBUSER.username,
LOAN.sellerloannumber,
LOAN.loannumber,
LOAN.loanamount,
STATUS.status_desc,
LOAN.loan_type,
PRICE.lock_expire_date,
ORGANIZATION.org_name,
BUSINESS_RELATIONSHIP.org_parent_id,
BUSINESS_RELATIONSHIP.org_child_id,
BUSINESS_RELATIONSHIP.no_cascade_flag,
product_name,
PRICE.final_rate,
LOAN.update_date,
TO_CHAR (LOAN.update_date,
'MM/DD/YYYY HH:MI:SS AM') update_date_str,
sysdate,
LOWER (PERSON.first_name),
LOWER (PERSON.last_name),
LOWER (PERSON.ssn),
LOWER (STATUS.status_desc),
STATUS.status_id,
LOAN.amortization_type,
ADDRESS.STREET1,
PRICE.LOCK_EXTEN_EXPIR_DATE,
PRICE.RELOCK_EXPIR_DATE,
LOAN.LOCK_RELOCK_COUNT,
LOAN.UNDERWRITE_FLAG,
decode (status.STATUS_ID,
22, PRICE.LOCK_EXTEN_EXPIR_DATE,
23, PRICE.lock_expire_date,
13, PRICE.lock_expire_date,
24, PRICE.RELOCK_EXPIR_DATE,
PRICE.lock_expire_date) RECENT_EXPIR_DATE,
LOAN_STATUS_HISTORY.STATUS_DATE
FROM
LOAN,
HUBUSER,
ORGANIZATION,
BUSINESS_RELATIONSHIP,
BORROWER,
PERSON,
STATUS,
PRICE,
product,
PROPERTY,
ADDRESS,
LOAN_STATUS_HISTORY
WHERE
ORGANIZATION.org_id = BUSINESS_RELATIONSHIP.org_child_id AND
LOAN.org_id = BUSINESS_RELATIONSHIP.org_child_id AND
LOAN.loan_id = BORROWER.loan_id AND
LOAN.registration_loan_status_id = STATUS.status_id AND
LOAN.price_id = PRICE.price_id AND
BORROWER.primaryborrower = 'T' AND
PERSON.person_id = BORROWER.person_id AND
LOAN.product_id = product.product_id AND
LOAN.PROPERTY_ID = PROPERTY.PROPERTY_ID AND
PROPERTY.ADDRESS_ID = ADDRESS.ADDRESS_ID AND
LOAN.user_id = HUBUSER.user_id (+);
Any one know how to tune this query?
regards
Mathew -
Temporary tablespace not cleared
Hi,
I have a temporary tablespace in one of my Oracle 9i databases that does not ever get cleared of data. I have altered the tablespace to autoextend by a few megabytes each time but I was wondering why a temp tablespace remains full even after all sessions are done. Its grown larger than my datafiles and I need a solution. Any ideas?
Thanks in advance.
James.Hi James,
You need to alter your temporary tablespace with adding a fresh new (small) tempfile, and when done, you need to put your other 'old' tempfiles offline so that you can delete them afterwards.
Your temporary tablespace will not shrink/release the space even when you bounce your DB (the undo tbs will)
Regards,
Thierry -
ORA-484 LMS* process terminated with error
Instance is crashing frequently with the ORA-484 LMS* process terminated with error. Oracle RAC 10.2.0.3 on HP_UX 11i on ASM. Please advise
The problem got solved after installing an interim patch p5375583_10203_HP64
-
Change temporary tablespace for session
hi.
i wonder if it's possible to change temporary tablespace for session in the way other then `alter user <user> temporary tablespace <tbc>'?Hi,
Temporary tablespace is set at database level and user level. It is not set at the session level.
The below is an extract from Oracle Docs for 10gR2
The DEFAULT TEMPORARY TABLESPACE clause of the CREATE DATABASE statement
creates a default temporary tablespace for the database. Oracle Database assigns this
tablespace as the temporary tablespace for users who are not explicitly assigned a
temporary tablespace.
You can explicitly assign a temporary tablespace or tablespace group to a user in the
CREATE USER statement. However, if you do not do so, and if no default temporary
tablespace has been specified for the database, then by default these users are assigned
the SYSTEM tablespace as their temporary tablespace.You can specifically assign a temporary tablespace for the user but not for the session.
regards,
Vijayaraghavan K
Maybe you are looking for
-
My website looks different on a pc to my mac!??
Hi Could someone help me with why the photos on my site are a lot bluer when you look at it on a pc than on the mac. It is beena.org.uk thank you
-
Using Time Capsule as a wired hard drive
Its come to this. I bought two time capsules, and after a month of trying to use them with various up to date macs, they are good for absolutely nothing. Apple refuse to take them back, although to my mind they are clearly not fit for purpose. Folk,
-
Unable to install Acrobat Patch 8.16 on Mac. What can I do?
Unable to install Acrobat Patch 8.16 on Mac. What can I do?
-
In a forum that I have been using for the last several years, I posted a problem. When I tried to reply to post #9 in that thread, my post would not appear. I tried again and still my post did not appear. I then opened IE7, navigated to that forum an
-
Ads are popping up all over...extra tabs open with "surveys". I have looked at all of the support posts and nothing seems to address how to get rid of this. I even trashed Firefox and reloaded. Same problem. This does not happen with Safari. I am rea