Tablespace and Datafiles... HELP

Hi, I3m new to Oracle, I3m trying to install Oracle 8.1.5 under
Tru64 UNIX, I3m having a hard time creating the Tablespace and
Datafiles to the oracle User... I cannot find documentation
about it, can somebody here tell me how to do it????, it3s
urgent, Please HELP mee!!!!
null

Hi Ruben,
I'm an Ora admin working under NT.
Use oracle server manager to create datafiles & tablespaces.
You can find the executable file name for oracle server manager
(svrmgr??.exe for NT) under BIN irectory of ORACLE HOME.
Hope this will be tip for you.
Regards
Sukumar
Ruben Gomez (guest) wrote:
: Hi, I3m new to Oracle, I3m trying to install Oracle 8.1.5 under
: Tru64 UNIX, I3m having a hard time creating the Tablespace and
: Datafiles to the oracle User... I cannot find documentation
: about it, can somebody here tell me how to do it????, it3s
: urgent, Please HELP mee!!!!
null

Similar Messages

  • Tablespace and datafiles

    I have 3 test databases with Oracle 11.2.3 on the same box
    data.dbf and index.dbf were deleted from 2 of the databases in SQL and now EP Manager can't get to any of the tablespaces.  when clicking on Server - Tablespace i get the following error:
    java.sql.SQLException: ORA-01116: error in opening database file 2 ORA-01110: data file 2: '/u02/oradata/LAWTEST/dev_data01.dbf' ORA-27041: unable to open file IBM AIX RISC System/6000 Error: 2: No such file or directory Additional information: 3 Additional information: 4 Additional information: 4194304
    I have tried dropping the tablespaces and refreshing the database from a Prod backup but no luck and have been searching the web for any info.
    Any help would be greatly appreciated.

    Hi,
    I would like to ask where is stored in the database
    the information regarding the tablespace and
    datafiles (for example for a tablespace which
    datafiles belong?). Is it in controlfile? I think no.
    Where is it?
    Thank you,
    MihaelaHi,
    You may query DBA_TABLESPACES or V$TABLESPACE to views to gain information on tablespaces. Similarly, DBA_DATA_FILES and V$DATAFILE views will list you the details related to the data files like tablespace name/id, file location ......etc..
    Regards

  • Database Performance (Tablespaces and Datafiles)

    Hi guys!
    What's the best for performance in database, tablespace with various datafiles distribuited in diferents filesystems or tablespaces with various datafiles in only one filesystem?
    Thanks,
    Augusto

    It depends on contents of the tablespaces, tablespace level LOGGING/NOLOGGING and env such as either OLTP or OLAP and LUN presentation to the server with RAID or without RAID and SAN Read per second and write per second.
    In general, tablespace with various datafiles distribuited in diferents filesystems/LUN's is in practice for non dev/system test databases.
    Moreover using ASM is better then standard filesystems.
    Regards,
    Kamalesh

  • Drop a tablespace and datafile when database is mounted

    I tried to import data in my oracle 11g. It failed midway. I presumed that i did not size the redolog properly. Now my database cannot go beyound the mounted mode.
    ORA-01157: cannot identify/lock data file 7 – see DBWR trace file
    ORA-01110: data file 7: ‘ /data1/owprojects/xxxxx.dbf ‘
    Its a new oracle installation and i do not need the corrupt datafile.
    I cant take the tablespace offline neither can i drop the tablespace including its contents.
    Do i drop from the Linux OS. If yes which other file to i edit to remove the pointer to this tablespace.
    Thanks and Best Regards
    J

    Try:
    alter database datafile 7 offline for drop;Example:
    SQL> startup mount;
    ORACLE instance started.
    Total System Global Area 1071333376 bytes
    Fixed Size                  1388352 bytes
    Variable Size             658505920 bytes
    Database Buffers          406847488 bytes
    Redo Buffers                4591616 bytes
    Database mounted.
    SQL>
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
    ORA-01110: data file 5: 'C:\TEMP\TEST01.DBF'
    SQL> alter database datafile 5 offline for drop;
    Database altered.
    SQL> alter database open;
    Database altered.
    SQL> archive log list;
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     396
    Next log sequence to archive   397
    Current log sequence           397
    SQL> alter tablespace test drop datafile 5;
    alter tablespace test drop datafile 5
    ERROR at line 1:
    ORA-03261: the tablespace TEST has only one file
    SQL> drop tablespace test;
    Tablespace dropped.
    SQL>Please read http://docs.oracle.com/cd/E11882_01/server.112/e25494/dfiles004.htm#ADMIN11428.
    Edited by: P. Forstmann on 19 mars 2012 18:53

  • Tablespace and datafile hot backup

    Hi,
    I wanted to if there is a command to copy a datafile using sqlplus command. I making a script that will backup the database while its online.I made a script for the alter tablespace begin backup but I wanted to know how to copy the datafiles without using the OS command,instead I wanted to use a sql commands. Is there any script or procedure to do this one.
    thanks
    Best Regards,
    Antok

    RMAN is the best utility to do the backup and recover activities. It take care copy and paste itself. Bellow given script is also usefull for hot backup
    spool hotbackup_PROD3.sql;
    set feedback off;
    set verify off;
    set pagesize 2500
    set linesize 132
    set serveroutput on size 50000;
    declare
    cursor tablespace is select tablespace_name from dba_tablespaces where tablespace_name
    in('RBS1',
    'STORAGE',
    'SYSADM_IDX2',
    'SYSADM_IDX3',
    'SYSADM_IDX4',
    'SYSTEM');
    cursor datafile(tsname varchar2 ) is select file_name from dba_data_files
    where tablespace_name = tsname;
    begin
    dbms_output.put_line('spool hotbackup_PRODc.log;');
    dbms_output.put_line('alter system switch logfile;');
    dbms_output.put_line('select ''log''||sequence#,sysdate from v$log where status = ''CURRENT'';
    for tsname in tablespace
    loop
    dbms_output.put_line('alter tablespace '||tsname.tablespace_name||' begin backup;');
    dbms_output.put_line('prompt Starting Backup for '||tsname.tablespace_name||' Tablespace')
    for dname in datafile(tsname.tablespace_name)
    loop
    dbms_output.put_line('prompt Copying File '||dname.file_name||'.....');
    dbms_output.put_line('!cp '||dname.file_name||' /backup2/hotbak'||dname.file_name);
    end loop;
    dbms_output.put_line('alter tablespace '||tsname.tablespace_name||' end backup;');
    dbms_output.put_line('prompt Finished backing up '||tsname.tablespace_name||' Tablespace')
    dbms_output.put_line('alter system switch logfile;');
    end loop;
    dbms_output.put_line('spool off;');
    dbms_output.put_line('!mailx -s "KL_PROD521_HOTBACKUP1" [email protected] < /prod1/HOTBKUP/hotbackup_PRODc.log');
    dbms_output.put_line('exit');
    end;
    spool off;
    @hotbackup_PROD3.sql
    exit;

  • Use of backing up a single tablespace or datafile

    Hello,
    I am reading the RMAN manual and I'm quite familiar with backup up a tablespace or datafile, but I can find very few uses for that. Backup up a tablespace is useful for TPITR, but since that needs another instance its of very little use in most production environments. I think you cannot restore an old version of tablespace in a normal database, unless the tablespace has long been made read-only, in which case RMAN's optimizations will do the trick.
    Even less use I can find for datafile backup. I have absolutely no idea what you can do with a single datafile.
    Can you please clarify me on the uses of these RMAN features?
    Thank you.

    Dear Albi!
    Think of the following scenario:
    You have a very large (let's say 1 Terabyte) production database that is split into n tablespaces. This database is in archivelog mode and a full backup of the hole database would take more than 10 hours.
    scenario end.
    In such a scenario I think you will not take a full database backup very often. Therfore you can backup portions (tablespaces and datafiles) of your database. This will take less time then a hole DBbackup.
    If you have to restore your DB then RMAN will take all the files it needs from all your backup. RMAN uses always the most actual version of your datafiles. After the restore RMAN will take the archivelogs to recover all datafiles to the most actual point in time. And that's the point why partial backups of your db are not only usefull for TSPITR.
    I hope I could make clear what the operative point is with partial backups.
    Yours sincerely
    Florian W.

  • Administer datafiles, tablespaces and free space

    Hi all,
    Firstly i want to apologize if my English is not very good, and secondly for if there is such topic already. I tried the "search" but didn't find something that suits my requirements...
    We are using Oracle9i.
    Here is the (potential) problem:
    I noticed that the some of the filesystems soon will run out of space.
    Example:
    /dev/vg07/lv_data7 71671808 68657701 2825782 96% /var/application/oracle/data07
    /dev/vg07/lv_data6 71671808 58102994 12720766 82% /var/application/oracle/data06
    /dev/vg07/lv_data5 71671808 69448894 2084034 97% /var/application/oracle/data05
    /dev/vg07/lv_data4 71671808 67765635 3662100 95% /var/application/oracle/data04
    /dev/vg06/lv_data3 71675904 65840498 5470722 92% /var/application/oracle/data03
    /dev/vg05/lv_data2 71675904 65730929 5573472 92% /var/application/oracle/data02
    /dev/vg03/lv_data1 70656000 65924095 4436216 94% /var/application/oracle/data01
    /dev/vg10/lv_data10 292929536 7301210 267776605 3% /var/application/oracle/data10
    /dev/vg10/lv_data11 292929536 0 292929536     0% /var/application/oracle/data11
    Lets for example take a look at data05:
    /var/application/oracle/data05 > ls -l
    There are many tablespaces and some of their datafiles there.
    -rw-r----- 1 oracle dba 367005696 Jul 21 13:19 e1_data_d_d_11.dbf
    -rw-r----- 1 oracle dba 209719296 Jul 21 13:20 e1_data_d_d_12.dbf
    -rw-r----- 1 oracle dba 1022365696 Jul 21 13:19 m_data_d_07.dbf
    -rw-r----- 1 oracle dba 812650496 Jul 21 13:19 m_data_d_08.dbf
    -rw-r----- 1 oracle dba 707792896 Jul 21 13:19 m_data_d_09.dbf
    -rw-r----- 1 oracle dba 2097156096 Jul 21 13:19 e_data_d_30.dbf
    -rw-r----- 1 oracle dba 734007296 Jul 21 13:20 e_data_d_38.dbf
    -rw-r----- 1 oracle dba 629149696 Jul 21 13:20 e_data_d_39.dbf
    -rw-r----- 1 oracle dba 419434496 Jul 21 13:20 e_data_d_40.dbf
    -rw-r----- 1 oracle dba 812650496 Jul 21 13:25 m1_data_d_03.dbf
    -rw-r----- 1 oracle dba 393220096 Jul 21 13:27 m1_data_d_04.dbf
    -rw-r----- 1 oracle dba 209719296 Jul 21 13:20 m1_data_d_05.dbf
    -rw-r----- 1 oracle dba 2097160192 Jul 21 13:19 m1_data__03.dbf
    -rw-r----- 1 oracle dba 2097160192 Jul 21 13:39 m1_data__04.dbf
    -rw-r----- 1 oracle dba 2097160192 Jul 21 13:19 m1_data__05.dbf
    -rw-r----- 1 oracle dba 2097160192 Jul 21 13:39 m1_data__06.dbf
    -rw-r----- 1 oracle dba 2097160192 Jul 21 13:19 m3_data_d_d_03.dbf
    -rw-r----- 1 oracle dba 2097160192 Jul 21 13:42 m3_data_d_d_04.dbf
    -rw-r----- 1 oracle dba 1572872192 Jul 21 13:20 m3_data_d_d_05.dbf
    drwxr-xr-x 2 root root 96 Nov 21 2006 lost+found
    -rw-r----- 1 oracle dba 942678016 Jul 21 13:19 system02.dbf
    -rw-r----- 1 oracle dba 72359936 Jul 21 13:20 system04.dbf
    The situation is similar in the other filesystems - various tablespaces and a lot of datafiles.
    Perhaps you've noticed that /data10 and /data11 are empty.
    What is the best approach in this situation so that we start using those two filesystems .
    Is moving datafiles from heavily used filesystems to the empty ones there is a good solution?
    My idea is to make Oracle to automatically extend the tabespaces over the empty volumes and start creating the new datafiles there, but i am not sure how exactly to do that.
    Any help will be appreciated.
    Regards.
    /R
    Message was edited by:
    user648100

    Thanks for the quick reply.
    MYH,
    Yes, the tablespaces are autoextend on. Here is the information about one of them from the GridControl:
    Name e1_data_d_d
    Status ReadWrite
    Type Permanent
    Extent Management local
    Storage
    Allocation Type Automatic
    Segment Space Management Automatic
    Enable logging Yes
    Block Size (B) 4096
    I did not understand the second question - about partition a datafile?!? I can move datafiles but i'm still learning... never heard of partitioning a file, sorry.
    Yas, i think the datafiles are Oracle Managed and oracle, after filling up a file, creates the new datafile automatically. I can create new file within the empty filesystems, but isn't it dangerous.
    And with regards to same question - if i create a new datafiles, or move old datafiles - will Oracle start to use the new filesystems automatically?

  • To capture all the objects from an tablespace and restore.

    Hi All,
    I have a situation in the  Schema  refresh process where i may have  to delete a tablespace  and its datafiles.
    Then I have to recreate it as it was before and restore all it objects .
    Is there any way that i can capture all the objects of that tablespace before it is deleted  and then later restore it back as it was .
    Any Expert sugggestion is highly apprciated .
    The Platform is as below ..
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Thanks In Advance .

    There are 2 methods you could use with Data Pump.
    1. tablespace mode export.  expdp user/password tablespaces=<your list here> ...
    2. transportable tablespace mode.  expdp user/password transport_tablespaces=<your tablespace list here> ...
      NOTE:  for #2, you need to have your tablespaces in read only mode, then you need to copy the data files, and the
                    tablespaces need to be self contained.
    Hope this helps.
    Dean

  • Drop tablespace and flashback : ORA-01245: offline file 7 will be lost if RESETLOGS is done

    Hello,
        1 create tablespace TS1
        2  create restore point RP1;
        3 drop tablespace TS1 (datafile  '/c:/ts1.dbf')  including files
        4 restore database to RP1
        5 alter database open resetlogs failed with this error :
            ERROR at line 1:
      ORA-01245: offline file 7 will be lost if RESETLOGS is done
      ORA-01110: data file 7: '/c:/ts1.dbf'
       Can you help me please to fix this issue and to understand why it's occured.

    Hi,
    If you check the alert log you will get message similar to
    Recovery deleting file #7:'<Oracle_Home>/db/dbs/UNNAMED00007' from controlfile.
    Now you have 2 option
    1. If you have backup of that tablespace TS1  then you can restore and recover it
    If you don't need that tablespace then you offline drop that datafile 7 . Open the database in resetlogs mode and then drop tablespace TS1
    Thank you

  • Online material for tablespace and backup

    Hi All,
    As i am a beginner, can anyone please suggest me any online link for better understanding about tablespace and backup for a beginner.
    Thanks in advance
    Arun

    Hi, follow down a resume did for me in my blog:
    Creating Tablespaces Permanent, Temporary and UNDO in ORACLE
    Tablespace Datafiles is a set that contains the physical structure of the data storage system Operacional.Sendo thus tablespace is an allocation of space used to store objects of a given user. To create a tablespace in a database, the user will have to have the grant (permission) of Tablespace and Create to create the SYSAUX tablespace (beside SYSTEM, are the most important database), should have the grant of SYSDBA. A tablespace is a logical unit of database and that is part of the following structure:
    Database> Tablespace (logical drive)> Datafile (physical file)> Segments (logical drive Example: Tables)> Extents (set of blocks, logical drives) >> Blocks Bank Data (logical unit, a smaller structure database)> Blocks Operating System.
    In this article we will be focused on the following types of tablespaces : The permanent tablespaces, the tablespace temporary tablespace and Undo. However, it also will be elucidated creating tablespace with multiple datafiles at once.
    - Permanent Tablespaces: Contains a user objects in a database. These objects are stored in physical structures called Datafiles.
    SQL> create tablespace TBSEXEBRUNORS
    logging
    datafile '/ dbbruno/datafiles/datafile1.dbf'
    size 64m
    autoextend on
    next 64m maxsize 2048m
    Local extent management uniform size 1m; 2 3 4 5 6 7
    Tablespace created.
    Creating a Tablespace with multiple Datafiles at once:
    SQL> create tablespace TBSMISCBRUNORS
    datafile '/ dbbruno/datafiles/datafile2.dbf' size 4M
    '/ Dbbruno/datafiles/datafile3.dbf' size 4M
    '/ Dbbruno/datafiles/datafile4.dbf' size 4M
    logging
    extent management site; 2 3 4 5 6
    Tablespace created.
    It follows a consultation in view DBA_TABLESPACES:
    SQL> SET PAGESIZE 180
    SQL> SET linesize 180
    SQL> SELECT * FROM WHERE DBA_TABLESPACES tablespace_name = 'TBSEXEMPLO' order by 1,2;
    Tablespace_name BLOCK_SIZE INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS MAX_SIZE PCT_INCREASE MIN_EXTLEN STATUS CONTENTS LOGGING FOR EXTENT_MAN
    ALLOCATIO PLU segments DEF_TAB_ RETENTION BIG PREDICA ENC COMPRESS_FOR
    TBSEXEMPLO 8192 65536 1 2147483645 2147483645 65536 ONLINE PERMANENT LOGGING NO LOCAL
    NO SYSTEM AUTO DISABLED NOT APPLY IN THE HOST
    - Clause for managing EXTENTS
    The autoallocate clause specifies that the tablespace is managed by ORACLE , and that users can not specify sizes. Moreover, this clause is not allowed to UNDO tablespaces or Temporary. However, the clause UNIFORM specifies that the tablespace is managed by a user (you can specify sizes) via byte sizes, the default 1M (megabyte) to use this clause. Already the LOCAL clause specifies that the tablespace is locally managed and some part of the tablespace is reserved for Bitmap, which is the DEFAULT option for the type of permanent tablespace. But the DICTIONARY clause specifies that you want the tablespace is managed using the data dictionary.
    - Management of SEGMENTS clause
    The AUTO clause specifies that you want the ORACLE control the free space of segments in the tablespace using BITMAPS. When making use of this option, ORACLE ignores any storage specification later this tablespace. ORACLE strongly recommends using this option. However, this option should only be used in permanent and never tablespaces in a tablespace SYSTEM. However, the clause MANUAL option is not recommended by Oracle, specifies that you want the ORACLE control the free space of segments in the tablespace using freelists (PCTUSED, FREELIST, FREELIST GROUPS).
    - Temporary Tablespaces: Contains temporary data for a given session for a given period of time. Furthermore, this type of tablespace tempfiles and have no, Datafiles. This tablespace is used when a user, to which was assigned temporary tablespace, begins operations. Thus, the tablespace temporary stores temporary data used in transactions of users.
    SQL> create temporary tablespace TEMPEXEBRUNORS
    tempfile '/ dbbruno/datafiles/tempfile1.dbf'
    size 128m
    autoextend on
    next 32m maxsize 2048m
    extent management site; 2 3 4 5 6
    Tablespace created.
    - UNDO Tablespaces or Tablespaces Undo: Tablespace used for operations redone, so that objects can not be created in this tablespace. When this tablespace is created, the ORACLE tablespace SYSTEM takes for you to make such operations. However, the default is to always create an UNDO tablespace when creating the database, so that it is in the mode of automatic undo management.
    SQL> create undo tablespace TBSUNDOBRUNORS
    datafile '/ dbbruno/datafiles/tbs_datafileundobrunors_1.dbf "
    size 200M; 2 3
    Tablespace created.
    It follows a consultation in view DBA_TABLESPACES:
    SQL> SET PAGESIZE 180
    SET linesize 180
    SELECT tablespace_name, STATUS, RETENTION, SEGMENT_SPACE_MANAGEMENT, EXTENT_MANAGEMENT, INITIAL_EXTENT DBA_TABLESPACES FROM WHERE tablespace_name = 'TBSUNDOBRUNORS' order by 1,2; SQL> SQL>
    STATUS tablespace_name RETENTION segments EXTENT_MAN INITIAL_EXTENT
    TBSUNDOBRUNORS NOGUARANTEE MANUAL ONLINE LOCAL 65,536
    - Clause for retaining segments
    The RETENTION GUARANTEE clause specifies that the data store should ORACLE undo expired, even though current operations return fails due to lack of space. This option can be useful in operations FLASHBACK (which is a "flashback" to obtain, for example, the value from a table that was deleted and it is necessary to know the value of that in a certain period). However, the provision RETENTION NOGUARANTEE (as above) specifies that the ORACLE data undo may replace expired undo by new data being processed due to the operations in the current environment, this being the provision pattern.
    I hope I helped, hugs!!
    References:
    http://brunors.com/?p=208

  • Undo Tablespace and Temporary Tablespace - autoextend ?

    - In general, should I allow the Undo Tablespace to grow (autoextend)?
    - In general, should I allow the Temporary Tablespace to grow (autoextend)?

    The size of undo tablespace should always keeps in mind otherwiase you eill get ORA-1555 or out of space errors.
    This paper is to help DBA’s in calculating the size of UNDO tablespace by using a simple formula.
    It is tough to know about the number of transactions and subsequently number of rows changed per second.
    So I suggest having a “big undo tablespace” to start with and based on load, after doing some calculations and resize your UNDO tablespace.
    In my case one of the applications was going to production (live), and I had no idea that how many transactions will happen against this database. All what I was told that there will be optimum (transactional) activity on this database.
    So I started with UNDO tablespace with size of 3GB and datafiles with autoextend “on” .
    Note:
    In production, you must be very careful in using this (autoextend on) as the space may grow to inifinity very fast. So my advice is either dont use this option, or use with "maxsize" or continuously monitor space (which is tough).
    I month later, I noticed the activity from V$undostat.
    Here is the step by step approach:
    Step 1: Longest running query.
    SQL> select max(maxquerylen) from v$undostat;
    MAX(MAXQUERYLEN)
    1793
    This gives you ideal value for UNDO_RETENTION. To be on the safer size you should add few more seconds to get the right value. So in my case, the size of undo retention should be say 2000 secs.
    Step 2: Size of UNDO tablespace.
    Size of UNDO needed = UNDO_RETENTION x [UNDO block Generation per sec x DB_BLOCK_SIZE] + Overhead(30xDB_BLOCK_SIZE)
    Out of these we know UNDO_RETENTION and DB_BLOCK_SIZE
    All we need is to find out “UNDO Blocks per second”
    Which can be easily fetched from v$undostat
    SQL> SELECT (SUM(undoblks))/ SUM ((end_time - begin_time) * 24*60*60) "UPS"
    2 FROM v$undostat;
    UPS
    8.11985583
    V$undostat stores data for every 10 mins and begin/end times are start/end time of those intervals. We multiplied it with 24*60*60 because the difference between two dates will be in days and to get to seconds, we need it to multiply with 24hrs*60mins*60secs
    So now we have all the values needed.
    Undo size needed = [8.12 x 2000 x 8192] + [30 x 8192] = 133283840 bytes = 127.11 MB

  • Explain local manage tablespace and dictionary manage tablespace

    hi all,
    kindly help me to understand local manage and dictionary manage tablespace
    i have read search result and oracle corporation book still unable to understand
    what i know that local is managed by bitmap(no redo) and dictionary is managed by dictionary(generates redo) plz explain this as well
    and also suggest me some documentation.
    thanks
    Navin

    Navin,
    These are excerpts from Oracle documentation
    Dictionary Managed Tablespace_
    If you created your database with an earlier version of Oracle, then you could be using dictionary managed tablespaces. For a tablespace that uses the data dictionary to manage its extents, Oracle updates the appropriate tables in the data dictionary whenever an extent is allocated or freed for reuse. Oracle also stores rollback information about each update of the dictionary tables. Because dictionary tables and rollback segments are part of the database, the space that they occupy is subject to the same space management operations as all other data.
    Lcaolly Managed Tablesapce_
    A tablespace that manages its own extents maintains a bitmap in each datafile to keep track of the free or used status of blocks in that datafile. Each bit in the bitmap corresponds to a block or a group of blocks. When an extent is allocated or freed for reuse, Oracle changes the bitmap values to show the new status of the blocks. These changes do not generate rollback information because they do not update tables in the data dictionary (except for special cases such as tablespace quota information).
    Locally managed tablespaces have the following advantages over dictionary managed tablespaces:
    Local management of extents automatically tracks adjacent free space, eliminating the need to coalesce free extents.
    Local management of extents avoids recursive space management operations. Such recursive operations can occur in dictionary managed tablespaces if consuming or releasing space in an extent results in another operation that consumes or releases space in a data dictionary table or rollback segment.
    The sizes of extents that are managed locally can be determined automatically by the system. Alternatively, all extents can have the same size in a locally managed tablespace and override object storage options.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/physical.htm#sthref518
    Regards

  • Control file lost and datafile addeed restore/recovery with no data loss

    Here i have tried to the following
    created new table called t2 and made sure data went to a specific tablespace...
    took a level 0 backup
    removed the control file
    added couple of datafile to above tablespace and then inserted more data
    then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
    SQL> @datafile
    -- list of datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          1          9         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    7 rows selected.
    -- new table is created called t2 and its going into TS called cnt_tst
    SQL> CREATE TABLE TEST.T2
      C1  DATE,
      C2  NUMBER,
      C3  NUMBER,
      C4  VARCHAR2(300 BYTE)
    TABLESPACE cnt_tst;  2    3    4    5    6    7    8
    Table created.
    -- data inserted
    SQL> INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> commit;
    Commit complete.
    -- to check of cnt_tst has any free space or not, as we can see its full
    SQL> @datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    7 rows selected.
    SQL> select count(*) from test.t2;
      COUNT(*)
         10000
    1 row selected.
    -- to get a count and max on date
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:47:52
    1 row selected.
    SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
    SQL> -- now control files are removed
    SQL> select name from v$controlfile;
    NAME
    /ctrl/trgt/control01.ctl
    /ctrl/trgt/control02.ctl
    2 rows selected.
    SQL>
    SQL> ! rm /ctrl/trgt/control01.ctl
    SQL> ! rm /ctrl/trgt/control02.ctl
    SQL> ! ls -ltr /ctrl/trgt/
    ls: /ctrl/trgt/: No such file or directory
    SQL>
    -- new datafile is added to CNT_TST TABLESPACE and new data is added as well
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL> ALTER SYSTEM CHECKPOINT;
    System altered.
    SQL> alter system switch logfile;
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST03.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL>  INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> /
    10000 rows created.
    SQL> commit;
    Commit complete.
    SQL> INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 40000)
    ;  2    3    4    5    6    7    8    9   10   11   12   13   14   15
    40000 rows created.
    SQL> commit;
    Commit complete.
    SQL> @datafile
    -- to make sure new datafile has been registered with the DB
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    CNT_TST    Datafile ONLINE    AVAILABLE          9         91        100        0 /data3/trgt/CNT_TST03.dbf               9 NO
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          9         91        100        0 /data3/trgt/CNT_TST02.dbf               8 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    9 rows selected.
    -- now the count and max ... note count before backup was 10000 and max(c1) was diff
    SQL> select count(*) from test.t2;
      COUNT(*)
         70000
    1 row selected.
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:58:25
    1 row selected.
    SQL> -- now restore starts
    SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@berry trgt]$ rman
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 29 14:01:48 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    RMAN>  connect catalog rman/pass@rcat
    connected to recovery catalog database
    RMAN>  connect target /
    connected to target database (not started)
    RMAN> startup nomount;
    Oracle instance started
    Total System Global Area     188313600 bytes
    Fixed Size                     1335388 bytes
    Variable Size                125833124 bytes
    Database Buffers              58720256 bytes
    Redo Buffers                   2424832 bytes
    RMAN> restore controlfile from autobackup;
    Starting restore at 29-FEB-12 14:02:37
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=20 device type=DISK
    recovery area destination: /backup/trgt/flash_recovery_area
    database name (or database unique name) used for search: TRGT
    channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
    channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120229
    channel ORA_DISK_1: AUTOBACKUP found: /backup/trgt/backup/cont_c-3405317011-20120229-09
    channel ORA_DISK_1: restoring control file from AUTOBACKUP /backup/trgt/backup/cont_c-3405317011-20120229-09
    channel ORA_DISK_1: control file restore from AUTOBACKUP complete
    output file name=/ctrl/trgt/control01.ctl
    output file name=/ctrl/trgt/control02.ctl
    Finished restore at 29-FEB-12 14:02:39
    RMAN> alter database mount;
    database mounted
    released channel: ORA_DISK_1
    RMAN> recover database;
    Starting recover at 29-FEB-12 14:02:55
    Starting implicit crosscheck backup at 29-FEB-12 14:02:55
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=20 device type=DISK
    Crosschecked 96 objects
    Finished implicit crosscheck backup at 29-FEB-12 14:02:57
    Starting implicit crosscheck copy at 29-FEB-12 14:02:57
    using channel ORA_DISK_1
    Finished implicit crosscheck copy at 29-FEB-12 14:02:57
    searching for all files in the recovery area
    cataloging files...
    no files cataloged
    using channel ORA_DISK_1
    starting media recovery
    archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
    archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
    archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
    archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
    archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
    archived log file name=/redo_archive/trgt/archive/1_11_776523284.dbf thread=1 sequence=11
    archived log file name=/redo_archive/trgt/archive/1_12_776523284.dbf thread=1 sequence=12
    archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 02/29/2012 14:02:59
    ORA-01422: exact fetch returns more than requested number of rows
    RMAN-20505: create datafile during recovery
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/redo_archive/trgt/online/redo01.log'
    ORA-00283: recovery session canceled due to errors
    ORA-01244: unnamed datafile(s) added to control file by media recovery
    ORA-01110: data file 9: '/data3/trgt/CNT_TST03.dbf'
    RMAN> -- wnet to session 2 and renamed datafile from unammed-- wnet to session 2 and renamed datafile for unammed file
    SQL> select name from v$datafile;
    NAME
    /data/trgt/system01.dbf
    /data/trgt/sysaux01.dbf
    /data/trgt/undotbs01.dbf
    /data3/trgt/move/users01.dbf
    /data3/trgt/user02.dbf
    /data3/trgt/users03.dbf
    /data3/trgt/cnt_tst01.dbf
    /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008
    /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009
    9 rows selected.
    SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008' as '/data3/trgt/CNT_TST02.dbf';
    Database altered.
    SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009' as '/data3/trgt/CNT_TST03.dbf';
    Database altered.
    SQL>  select name from v$datafile;
    NAME
    /data/trgt/system01.dbf
    /data/trgt/sysaux01.dbf
    /data/trgt/undotbs01.dbf
    /data3/trgt/move/users01.dbf
    /data3/trgt/user02.dbf
    /data3/trgt/users03.dbf
    /data3/trgt/cnt_tst01.dbf
    /data3/trgt/CNT_TST02.dbf
    /data3/trgt/CNT_TST03.dbf
    9 rows selected.after above was done, went back to session 1 and tried recovered the DB
    RMAN> recover database;
    Starting recover at 29-FEB-12 14:06:16
    using channel ORA_DISK_1
    starting media recovery
    archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
    archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
    archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
    archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
    archived log file name=/redo_archive/trgt/online/redo02.log thread=1 sequence=14
    archived log file name=/redo_archive/trgt/online/redo03.log thread=1 sequence=15
    media recovery complete, elapsed time: 00:00:00
    Finished recover at 29-FEB-12 14:06:17
    RMAN> alter database open resetlogs;
    database opened
    new incarnation of database registered in recovery catalog
    starting full resync of recovery catalog
    full resync complete
    starting full resync of recovery catalog
    full resync complete
    RMAN> exit
    Recovery Manager complete.
    [oracle@berry trgt]$
    [oracle@berry trgt]$
    [oracle@berry trgt]$ sq
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 29 14:07:18 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss:
      2
    SQL>
    SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss";
    Session altered.
    SQL> select count(*) from test.t2;
    select count(*) from test.t2
    ERROR at line 1:
    ORA-00376: file 8 cannot be read at this time
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    SQL> select max(c1) from test.t2;
    select max(c1) from test.t2
    ERROR at line 1:
    ORA-00376: file 8 cannot be read at this time
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    SQL> alter database datafile 8 online;
    alter database datafile 8 online
    ERROR at line 1:
    ORA-01190: control file or data file 8 is from before the last RESETLOGS
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    {code}
    so what did i do wrong in my recovery that i could not get my data?? how can i avoid this?? and restore my DB?
    Edited by: user8363520 on Feb 29, 2012 12:24 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    user8363520 wrote:
    Here i have tried to the following
    created new table called t2 and made sure data went to a specific tablespace...
    took a level 0 backup
    removed the control file
    added couple of datafile to above tablespace and then inserted more data
    then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
    SQL> @datafile
    -- list of datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf ;               3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf ;                 5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          1          9         10        0 /data3/trgt/cnt_tst01.dbf ;              7 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf ;                2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf ;           4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf ;                1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf ;                6 YES
    7 rows selected.
    -- new table is created called t2 and its going into TS called cnt_tst
    SQL> CREATE TABLE TEST.T2
    C1  DATE,
    C2  NUMBER,
    C3  NUMBER,
    C4  VARCHAR2(300 BYTE)
    TABLESPACE cnt_tst;  2    3    4    5    6    7    8
    Table created.
    -- data inserted
    SQL> INSERT INTO
    test.T2
    SELECT
    FROM
    (SELECT
    SYSDATE,
    ROWNUM C2,
    DECODE(MOD(ROWNUM,100),99,99,1) C3,
    RPAD('A',300,'A') C4
    FROM
    DUAL
    CONNECT BY
    LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> commit;
    Commit complete.
    -- to check of cnt_tst has any free space or not, as we can see its full
    SQL> @datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf ;               3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf ;                 5 YES
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf ;                2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf ;           4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf ;                1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf ;                6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf ;              7 NO
    7 rows selected.
    SQL> select count(*) from test.t2;
    COUNT(*)
    10000
    1 row selected.
    -- to get a count and max on date
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:47:52
    1 row selected.
    SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
    SQL> -- now control files are removed
    SQL> select name from v$controlfile;
    NAME
    /ctrl/trgt/control01.ctl
    /ctrl/trgt/control02.ctl
    2 rows selected.
    SQL>
    SQL> ! rm /ctrl/trgt/control01.ctl
    SQL> ! rm /ctrl/trgt/control02.ctl
    SQL> ! ls -ltr /ctrl/trgt/
    ls: /ctrl/trgt/: No such file or directory
    SQL>
    -- new datafile is added to CNT_TST TABLESPACE and new data is added as well
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL> ALTER SYSTEM CHECKPOINT;
    System altered. Upto this i was clear, but now i cann't understand when you actually dropped the control file from you database(in running stat) how can you perform "alter system checkpoint" and other "alter tablespace.." command? Once controlfile is inaccessible, oracle database is not suppose to function.

  • Tablespace or datafile  creation during recovery

    Hello
    During recovery,
    If there is new tablespace or datafile added in archivelogs or redologs I have to manually issue:
    alter database create datafile .. as ..
    Why doesnt oracle automatically create the datafiles ?

    The datafile doesn't exist in the control file. The control file maintains the physical structure of the database. During the RECOVERy phase, Oracle reads the ArchiveLogs to identify what updates are to be done -- these are mapped in terms of file, block and row. If the file doesn't exist in the controlfile, the rollforward cannot be applied.
    Therefore, the ALTER DATABASE CREATE DATAFILE ... AS .... allows Oracle to "add' the file to the controlfile and then proceed with the rollforward.
    Oracle doesn't automatically create the datafile because it can't know what the target file name is.
    In your backup your datafiles may have been spread across /u01/oradata/MYDB, /u02/oradata/MYDB, /u03/oradata/MYDB and this file may have been in /u03/oradata/MYDB. However, in your target (restored) location the files may be at only two, differently named, mountpoints : /oradata1/REPDB, /oradata/REPDB. Oracle can't decide for you where the new datafile (which was in /u03/oradata/MYDB) should be created -- should it be in /oradata1/REPDB or /oradata/REPDB or, you might have avaialable /oradata3/REPDB which the database instance isn't aware of !

  • Tablespace or Datafile in Backup mode

    Hi,
    Can anyone explain me what happen at the background when a tablespace or a datafile is in backup mode.
    Thanks in advance
    Regards
    Aruna
    Edited by: user11144654 on May 8, 2009 3:10 AM

    The tablespace is checkpointed, the checkpoint SCN marker in the datafile headers cease to increment with checkpoints, and full images of changed DB blocks are written to the redologs.
    Those three actions are all that is required to guarantee consistency once the file is restored and recovery is applied. By freezing the checkpoint SCN in the file headers, any subsequent recovery on that backup copy of the file will know that it must commence at that SCN. Having an old SCN in the file header tells recovery that the file is an old one, and that it should look for the redolog file containing that SCN, and apply recovery starting there. Note that checkpoints to datafiles in hot backup mode are not suppressed during the backup, only the incrementing of the main checkpoint SCN flag. A “hot backup checkpoint” SCN marker in the file header continues to increment as periodic or incremental checkpoints progress normally.
    There is a confusing side effect of having the checkpoint SCN artificially frozen at an SCN earlier than the true checkpointed SCN of the datafile. In the event of a system crash or a ‘shutdown abort’ during hot backup of a tablespace, the automatic crash recovery routine at startup will think that the files for that tablespace are quite out of date, and will actually suggest the application of old archived redologs in order to bring them back into sync with the rest of the database. It is unnecessary, in this case, to heed Oracle’s suggestion. With the database started up in mount mode, simply check v$backup and v$datafile to determine which datafiles were in backup mode at the time the database crashed. For each file in backup mode, issue an ‘alter database datafile '<file name>' end backup;’ This action will update the checkpoint SCN in the file headers to be the same as the hot backup checkpoint SCN (which is a true representation of the last SCN to which the datafile is truly checkpointed. Once this action is taken, it allows normal crash recovery to proceed during the ‘alter database open;’ command.
    By initially checkpointing the datafiles that comprise the tablespace and logging full block images to redo, Oracle guarantees that any blocks changed in the datafile while in hot backup mode will also be available in the redologs in case they are ever used for a recovery.
    It is well understood by much of the Oracle user community that during hot backup mode, a greater volume of redo is generated for changes to the tablespace being backed up than when the tablespace is not in backup mode. This is the result of the logging of full images of changed blocks in these tablespaces to the redologs. Normally, Oracle logs an entry in the redologs for every change in the database, but it does not log the whole image of the database block. By logging full images of changed DB blocks to the redologs during backup mode, Oracle eliminates the possibility of the backup containing irresolvable split blocks. To understand this reasoning, you must first understand what a split block is.
    Typically, Oracle database blocks are a multiple of O/S blocks.  For instance, most Unix filesystems have a default block size of 512 bytes, while Oracle’s default block size is 2k. This means that the filesystem stores data in 512 byte chunks, while Oracle performs reads and writes in 2k chunks, or multiples thereof. While backing up a datafile, your backup script makes a copy of the datafile from the filesystem, using O/S utilities such as copy, dd, cpio, or OCOPY.  As it is making this copy, it is reading in O/S-block sized increments. If the database writer happens to be writing a DB block into the datafile at the same time that your script is reading that block’s constituent O/S blocks, your backup copy of the DB block could contain some O/S blocks from before the database performed the write, and some from after. This would be a split block.
    By logging the full block image of the changed block to the redologs, it guarantees that in the event of a recovery, any split blocks that might be in the backup copy of the datafile will be resolved by overlaying them with the full legitimate image of the block from the redologs. Upon completion of a recovery, any blocks that got copied in a split state into the backup will have been resolved through application of full block images from the redologs.

Maybe you are looking for

  • Report on a table from another schema

    hi, i have a table PROJECTS in schema CSALE when i create a report in APPEXP application (persing via user TESTER2) it gives me the error table does not found while TESTER2 has full writes on PROJECTS table. select project_id ID, Project_name DESC fr

  • Shared services  9.3.1  configuration  to connect to oracle 10g xe fails

    I am trying to install Hyperion shared services on Windows XP media center. I have Apache Tomcat running as localhost and Oracle 10g express edition running as database. When I try to install hyperion shared services, the installation process goes we

  • How do I copy the DVR recorded content to Laptop or any external drive.

    How do I copy the DVR recorded content  to Laptop or any external drive. Pl suggest. Thx.

  • First package - created with compilation errors

    I'm working my way through Learning Oracle PL/SQL, the O'Reilly book, the 2002 edition, page 92. These procedures work fine stand-alone but when one calls the other, when mxb_add_books calls mxb_add_book_copy, in a package I get compilation errors: C

  • Page advancing problem in dotmatrix printing

    Hi Experts, We are trying to print 6 X 2 Inch sticker using dotmatrix printer in smartforms, For this I have defined a page formate assigned it to Device type and under the initialization written the following code reset \e\0x40 set line spacing 6 LP