Tempfiles

Hi,
while restoring the database in 10.2.0.3 ,does the controlfile recognize the tempfiles of production.
when i did the restoration in 10.1.0.i manually added the tempfile after opening the database.
don't we need to add tempfiles while restoring with 10.2.0.3
please excuse me if the question is not clear.

but when i restored the database with 10.1.0.3 , there after restoring the database and opening the database with resetlogs the database was open and when queried for v$tempfile.then it did not showed any tempfiles but there were tempfiles in production.
but with 10.2.0.3 it showing the tempfiles .what i am doing now is adding the new files to temp tablespace and deleting the old ones.
is it difference of versions?

Similar Messages

  • CPIO error when copying a tempfile of 3GB

    Hi, I'm getting a cpio error copying a tempfile for a 9i DB of size 3GB. I do not have the exact error since it was echoed to screen.
    Is there a file size limit for making a tape archive ? If it is, then which one it is?, or maybe there's an option for copying this big files?.
    Help wll be appreciated ...!

    I have a script which redirects output to a file. This is the error that's shown in file:
    /home/oracle/app/oracle/oradata/ART0/drsys01.dbf
    /home/oracle/app/oracle/oradata/ART0/cwmlite01.dbf
    cpio: /home/oracle/app/oracle/oradata/ART0/temp01.dbf: Valor demasiado grande para el tipo de datos definido
    /home/oracle/app/oracle/oradata/ART0/control01.ctl
    /home/oracle/app/oracle/oradata/ART0/control02.ctl
    I tried to copy this file only from the command line and the same error comes out.
    I have read on the internet that there's a limit of 2GB for tar and cpio commands.
    Any comments ...?

  • FS-CANT OPEN TEMPFILE issue in opening a concurrent program log file

    Hi all,
    I am working in Order Management authorization process in oracle apps 11i. After completion of order authorization , i did the shipping and delivery process in oracle Forms. During this Shipping and Delivery process the concurrent program gets error. (i.e status is : Completed -Error ).
    Then i tried to open a concurrent program view log and view output file , but it shows following error in window.
    Error: FS-CANT OPEN TEMPFILE.
    I never did anything in server recently. But it throws the "FS-CANT OPEN TEMPFILE" error in forms while running the concurrent program.
    Please Help How to resolve this issue.
    Thanks
    Prabu

    Pl post details of OS, database and EBS versions, along with complete steps to reproduce the issue. Are there any errors in the database alert log or the concurrent manager log ? Has this ever worked before ? If so, what has changed since then ?
    Pl see if these MOS Docs can help
    "FS-CANT OPEN TEMPFILE" MESSAGE WHEN OPENING ANY VIEW LOGS OR OUTPUT LOGS [ID 462277.1]
    Copy File functionality generates FS-CANT OPEN TEMPFILE [ID 780516.1]
    FS-Cant Open Tempfile When Try to Send Output to Excel [ID 236311.1]
    FS-CANT OPEN TEMPFILE in 11i
    HTH
    Srini

  • Automatic tempfile offline due to write error on

    Hi everybody,
    I am getting the following in my alert log and my TEMPFILE went offline.
    KCF: write/open error block=0x5a909 online=1
    file=4 /database1/oratemp1/temp1_04.dbf
    error=27091 txt: 'HP-UX Error: 28: No space left on device
    Automatic tempfile offline due to write error on
    file 4: /database1/oratemp1/temp1_04.dbf
    The funny thing is I found that it is not autoextensible. The sapce in the mount point is 100% utilized. But why would such an error come when the tempfile is in autoextend off??
    Any ideas?
    Thanks in advance

    Hi.
    Oracle does not guarantee whether temp datafiles are fully allocated on file system by OS when you create a temp tablespace or a add tempfile.
    Usually it will not be fully allocated on file system until you fully utilize the temp space.
    You should make some free space for tempspace to (really) allocate in the volume
    or create another temp tablespace on another volume and switch to it.

  • Tempfiles in 10.2.0.3

    Hi,
    i noticed that when i delete the tempfile from filesystem an restart the database the tempfile is created automatically...Is this the 10g feature?
    Regards

    Hi,
    I am refering to temporary tablespace tempfiles.
    FILE_NAME TABLESPACE_NAME
    /rel12/KAU/db/apps_st/data/temp01.dbf TEMP1
    /rel12/KAU/db/apps_st/data/temp02.dbf TEMP2
    i am deleteing temp01.dbf and restarting the database the temp01.dbf is getting created automatically.*i love this feature*
    Regards
    Edited by: hungry_dba on Jan 4, 2010 11:49 PM

  • Add tempfile and has erorrs?

    Hi all,
    I get the following errors and I add tempfile:
    SQL> alter tablespace temp add tempfile '/u01/uat/uatdata/temp02.dbf' size 500M
    2 ;
    alter tablespace temp add tempfile '/u01/uat/uatdata/temp02.dbf' size 500M
    ERROR at line 1:
    ORA-01119: error in creating database file '/u01/uat/uatdata/temp02.dbf'
    ORA-27040: skgfrcre: create error, unable to create file
    IBM AIX RISC System/6000 Error: 2: No such file or directory
    Best Regards,
    Amy

    Check PATH and Permission:
    use oracle user:
    $ ls -la /u01/uat/uatdata/
    if you no path, you should make sure where you store datafiles:
    check from another datafiles:
    SQL> select file_name from dba_data_files;
    if you don't have /u01/uat/uatdata/ PATH, you have to make it "mkdir"
    if you don't have permission ... you have to "su root" and change it for oracle user "chown".
    Good Luck.

  • Only on tempfile used during sql sorts

    environment : Entreprise 92010/W2K
    My temp tablespace (locally managed and temporary) has 3 tempfile, each with autoextend and maxsize limit.
    When i create an index on a big table, my 3 tempfile are used.
    But when a big sort occurs during a sql statement, only one tempfile is used and i get an ora-1652.
    Why all tempfiles are not used during sorts statements (union, max...) ?
    This behavior can be easily tested :
    - create a new temp ts with 3 small tempfile, autoextend on but very small maxsize
    - alter the user who will do the sorts
    - log on as user altered
    - create an index on a big table => the 3 tempfiles will grow
    - execute a query (max, min, union ,distinct...) => only one tempfile is used.
    SQL sort always done in only one file or bug ?
    Jean-Fran�ois L�guillier

    The 3 tempfile belong to the same ts.
    This ts is the temporary ts for my user which executes the sort sql statement.
    During execution, i monitor size of the 3 files (from v$tempfile) : only one was used during query and when it reached maxsize, i got ora 1652 but fres space were available in the 2 others tempfile.
    When i create a big index, i see changes in bytes for all tempfiles (in v$tempfile).
    One of my customer has same problem. He added tempfile to his temp ts but sort statement failed again.
    I tested this behavior with 92010/EE with W2K.
    I think it's a bug but nothing appears in patchset 9204.

  • ORA-01516: nonexistent log file, datafile, or tempfile

    Hi,
    in 10g R2 on Win XP when I do :
    alter database rename file 'C:\oracle\oradata\ORCL\USERS01.DBF' to 'C:\oracle\oradata\ORCL2\USERS01.DBF';
    I receive :
    ORA-01511: fail to change name ...
    ORA-01516: nonexistent log file, datafile, or tempfile
    'C:\oracle\oradata\ORCL\USERS01.DBF'
    But it realy exists.
    Please help.

    Hi,
    I'm comming back now.
    Before putting offline the data files, I tried with log file (since to duplicate database I should rename all (see the below script) but :
    SQL> alter database rename file 'C:\oracle\oradata\orcl\REDO01.LOG' to 'C:\oracle\oradata\ORCL2\REDO01.LOG';
    alter database rename file 'C:\oracle\oradata\orcl\REDO01.LOG' to 'C:\oracle\oradata\ORCL2\REDO01.LOG'
    ORA-01516: nonexistent log file, datafile, or tempfile
    'C:\oracle\oradata\orcl\REDO01.LOG'
    Can we put a log file off line ?
    Thank you.
    My script :
    alter database rename file     'C:\oracle\oradata\orcl\EXAMPLE01.DBF'     to     'C:\oracle\oradata\ORCL2\EXAMPLE01.DBF';
    alter database rename file     'C:\oracle\oradata\orcl\REDO01.LOG'     to     'C:\oracle\oradata\ORCL2\REDO01.LOG';
    alter database rename file     'C:\oracle\oradata\orcl\REDO02.LOG'     to     'C:\oracle\oradata\ORCL2\REDO02.LOG';
    alter database rename file     'C:\oracle\oradata\orcl\REDO03.LOG'     to     'C:\oracle\oradata\ORCL2\REDO03.LOG';
    alter database rename file     'C:\oracle\oradata\orcl\REDO04.LOG'     to     'C:\oracle\oradata\ORCL2\REDO04.LOG';
    alter database rename file     'C:\oracle\oradata\orcl\SYSAUX01.DBF'     to     'C:\oracle\oradata\ORCL2\SYSAUX01.DBF';
    alter database rename file     'C:\oracle\oradata\orcl\SYSTEM01.DBF'     to     'C:\oracle\oradata\ORCL2\SYSTEM01.DBF';
    alter database rename file     'C:\oracle\oradata\orcl\TEMP01.DBF'     to     'C:\oracle\oradata\ORCL2\TEMP01.DBF';
    alter database rename file     'C:\oracle\oradata\orcl\UNDOTBS01.DBF'     to     'C:\oracle\oradata\ORCL2\UNDOTBS01.DBF';
    alter database rename file     'C:\oracle\oradata\orcl\USERS01.DBF'     to     'C:\oracle\oradata\ORCL2\USERS01.DBF';
    Any way I put USER01.DBF off line on sourcr (orcl) :
    SQL> alter database datafile 'C:\ORACLE\ORADATA\ORCL\USERS01.DBF' offline;
    But again :
    SQL> alter database rename file 'C:\oracle\oradata\orcl\USERS01.DBF' to 'C:\oracle\oradata\ORCL2\USERS01.DBF';
    alter database rename file 'C:\oracle\oradata\orcl\USERS01.DBF' to 'C:\oracle\oradata\ORCL2\USERS01.DBF'
    ORA-01516: nonexistent log file, datafile, or tempfile
    'C:\oracle\oradata\orcl\USERS01.DBF'
    Message was edited by:
    user522961

  • Temporary tablespace and tempfile

    Hi,
    On one of our database, we have a temporary tablespace which is locally managed.
    This tablespace has 3 tempfiles.
    One query, which generate large sort, cause an Oracle error ORA-01652.
    But, when we see the date of tempfiles, it seems that there is only one tempfile which is use :
    rw-rw-rw-   1 iov816   fraud    31465472 Jun  6 18:10 temp2riskv5r.dbf
    -rw-rw-rw-   1 iov816   fraud    20979712 Jun  6 18:14 temp3riskv5r.dbf
    -rw-rw-rw-   1 riskv5r  fraud    152047616 Jun  8 14:47 tempriskv5r.dbf What happens exactly ? This database is a 8.1.6.0.
    Thanks for any explanations.
    Nicolas.

    When using OMF you do not not specify the file names. ASM does not really change the syntax any.
    SQL> create tablespace test_me
      2  datafile size 10m,
      3           size 10m
      4  extent management local uniform size 1m;
    Tablespace created.
    SQL> select file_name from dba_data_files where tablespace_name = 'TEST_ME';
    FILE_NAME
    +TESTDB/sandbox/datafile/test_me.1101.615385691
    +TESTDB/sandbox/datafile/test_me.1097.615385693
    SQL>

  • Tempfile not deleted at OS level

    hi friends,
    database: 9.2.0.4
    OS: windows server 2003 with sp2
    hi i had a temporary tablespace temp1 with one tempfile. i had created another temp tablespace temp2 with one tempfile and made it default. i dropped temp1 using following command
    SQL> drop tablespace temp1 including contents and datafiles;
    but still i file is residing at OS level. when i tried to delete it, it throwed error that the file is in use.
    once database is shutdown and started, the file is cleared from OS level automatically.
    is this normal behaviour? if not what could be the reason?
    thanks in advance.

    before dropping the temp1 tablespace, you may try this:
    select sid, serial# from v$session where saddr in (select session_addr from v$tempseg_usage v where v.tablespace = 'TEMP1');
    alter system kill session '<sid><serial#>'; (you do this for all the rows you got at the sql above or you may build this command with dynamic sql).
    Then you drop the temp1 tablespace and see if its deleted.

  • 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

  • Optimal size for TEMP tablespace tempfiles

    Hi all,
    I've rumaged through Oracle documentation on the above topic but can't find the answer I'm seeking:
    How do you determine the optimal size for your tempfiles? Are there rules to guide one in this area? For example for a 50G database, how do you determine if it's 2G, 3G or 4G that's best for the database? What about a 500G database?
    Anwers will be appreciated.
    Regards

    It's the size of the sets, as you say. And in a data warehouse, the data sets can be very large. I'd say that in an OLTP database, then the useage of temp would (should) be low; but in a data warehouse, all bets are off: one-off end of month runs; director wants a monolithic report running; all that sort of DWH-related type of processing, which, by its nature, happens all the time. Similarly, a large number of users (e.g. users of, say, a Third Party BI tool) amy lead to lots of big sorts, owing to the ad hoc nature of their queries. Standard DWH stuff.
    I don't often see tiddly-widdly bits of SQL in data warehouses, like your SELECT COUNT(*) FROM tab$ example. It could be done, sure, but more likely will be bit, fat queries, which a DWH is designed to deal with. And a lot of temp may be required.
    From that 6-years old (but relevant) article (my emphasis): "For example, if you join two *large* tables, and Oracle cannot do the sort in memory (see SORT_AREA_SIZE initialisation parameter), *space will be allocated in a temporary tablespace for doing the sort operation*."
    Regards - Don Lewis

  • Is their,Query to find the which tempfile our Database currently using ?

    Hi All,
    Is their,Query to find the which tempfile our Database currently using ?
    Regards,
    DB

    select property_name,property_value from database_properties where property_name like '%TABLE%';
    John Watson
    Oracle Certified Master DBA
    http://skillbuilders.com
    Edited by: JohnWatson on May 14, 2013 12:27 PM
    (assuming that you mean temporary tablespace rarther thsn tempfile)

  • 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 ?

  • How to drop a tempfile

    Hi,
    on 10g R2, my TEMP tablespace has 2 tempfiles. I want to drop one. In documentation I have :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/omf.htm#sthref1598
    ALTER TABLESPACE ... DROP TEMPFILEShould the tablespace be OFFLINE before ?
    Where should I add the name of tempfile ?
    Thank you.

    Hi,
    you can drop tempfile even if it is online, but make sure its nto been used currently.
    Below query will give temp file usage, according that u can drop tempfile.
    SELECT
    f.tablespace_name tname,
    round(SUM(ROUND((f.bytes_free + f.bytes_used) / 1024 / 1024, 2)),0) allocated_mb,
    round(SUM(ROUND(nvl(p.bytes_used, 0) / 1024 / 1024, 2)),0) Used_MB,
    round(SUM(ROUND(((f.bytes_free + f.bytes_used) - nvl(p.bytes_used, 0)) / 1024 / 1024, 2)),0) Free_MB,
    round((SUM(ROUND(nvl(p.bytes_used, 0) / 1024 / 1024, 2)) * 100) / (SUM(ROUND((f.bytes_free + f.bytes_used) / 1024 / 1024, 2))),2) "USED (%)",
    (100-round((SUM(ROUND(nvl(p.bytes_used, 0)/1024/1024, 2)) * 100) / (SUM(ROUND((f.bytes_free + f.bytes_used)/1024/ 1024, 2))),2)) "FREE (%)",
    round(SUM(maxbytes / 1024 / 1024),0) maxsize_mb,
    d.file_name file_name
    FROM
    sys.v_$temp_space_header f,
    dba_temp_files d,
    sys.v_$temp_extent_pool p
    WHERE f.tablespace_name(+) = d.tablespace_name
    AND f.file_id(+) = d.file_id
    AND p.file_id(+) = d.file_id
    GROUP BY f.tablespace_name, file_name
    ORDER BY 5 DESC
    regards
    Jafar

Maybe you are looking for

  • Homesharing from old PC to new Mac is not working.

    I turned on homesharing on both devices and tried to share the library from the old pc to the new macbook, but my macbook still says i have no music and there is no longer a homesharing button available. Please help!

  • WHERE Clause issue

    Hi, I have run the following command successfully without the WHERE clause on the last line.  However, when I try to use a parameter, it fails.  Is there anything wrong with it? CREATE TABLE #DateList Dates DateTime NOT NULL PRIMARY KEY DECLARE locDa

  • Error under "manage process"

    Hello, when i try to see all instances of a bpm process under "manage process" in the administration workbench i get following error message: Error occured while processing the request. Log entries are created with ID: (No log entries created due to

  • BAPI or FM to create Products t-code : commpr01

    HI, Please let me know the Bapi or FM to CReate Products  the commpr01 t-code. Thanks and Regards,

  • SHUT OUT BY BOGUS "PS EXTENDED" EXPIRATION

    I NEVER SIGNED UP FOR THE SO-CALLED PHOTOSHOP EXTENDED SERVICE.  SO I WAS RIPPED TONIGHT WHEN I TRIED TO START MY PS6 PROGRTAM TO DO SOME WORK -- ONLY TO BE DENIED ITS USE BECAUSE MY "TRIAL OF PS EXTENDED" HAD EXPIRED!!!  WHAT B.S.  I'VE BOUGHT EVERY