No of Datafiles needed in single tablespace ?

hi,
i have one tablespace of size 120gb with 23 datafiles in which first 19 datafiles are size with 2gb each. and rest data files are size with around 28 gb.
Recently i heard that by keeping more no of datafiles will affect the performance of Database . so my question is what are the advantage and disadvantage of keeping more no of
datafiles in single tablespace and how can i merge small data files of 2 gb ?
Regards,
Mithun Mathew
Oracle DBA

After going through couple of links provied by google i made a note on this issue :
Optimizer does not consider number of data files when selecting execution path. Also as a general rule, you do not deal with I/O performance at tablespace level. You cannot stripe the contents of a tablespace across multiple datafiles. This need to be dealt with at a lower level (like inside Oracle ASM).
Advantages: (More Datafiles)
1.By using more than one datafile per tablespace, you can spread data over many different disks to distribute the I/O load and improve performance.
2.Easy and faster restoration and recovery. The more datafiles for a given amount of data, some recovery scenarios will be faster due to having to restore/recover a smaller file.
3.Less chances of encountering 2gb
issue.(http://www.fors.com/velpuri2/Oracle%20block%20structure/2gb)
4.Having multiple datafiles per tablespace facilitates the adoption of a uniform datafile size policy, which in turn facilitates disk load rebalancing.
5.For file system based databases, having multiple datafiles may reduce the risk of contention for the operating system's datafile read/write locks (inode locks).
6.If any corruption happens in a datafile, then there is less data loss chances in compare to one or less datafile.
Disadvantages: (More Datafiles)
1.We can not have BigFile Tablespace's advantages.
2.Tough managebility and portability.
3.Putting tablespace offline will offline all the datafiles, which will stop other applications/of its parts unnecessarily.
4.More datafiles for DBWR for writting and more files for RMAN to backup.
5.Many datafiles are opens when we online tablespace; means many file handlers for OS at kernel side.
6.We have to carefull to create rollback segments because, never create rollback segments using multiple datafiles within a single tablespace.
7.The more datafiles, the more time required to do checkpoints and such, because every file has to have its header updated.
8.More entries in data dictionary, control file entries more file structs in SGA vs less or 1.
Regards
Girish Sharma

Similar Messages

  • Clubbing of datafiles in a single tablespace

    hi,
    i have 4 datafiles each of 2gb in size in a single tablespace.. i would like to know is it possible to club these four datafiles in to a single datafile..and is there any limitation for the maximumsize for the datafile in 32bit version..
    thanks in advance
    nsr

    Hi
    To put all your data into one data file you will have to create a new tablespace with one 8 GB data file and move all your data to the new tablespace.
    The maximum size of your data files depends on the block size of the data file and the type of tablespace you create. In 10g you can create a big file tablespace with 1 data file with no size limit. For a normal small file tablespace with an 8K block size the limit is 32 GB per file. For a 16K tablespace, the limit is 64 GB per file. The amount of files in your tablespace is only limited by the MAXFILES value that is specified when you create the database and that is stored in your control files. To change the value of MAXFILES you have to recreate your control files.

  • Is There a Way to Run a Redo log for a Single Tablespace?

    I'm still fairly new to Oracle. I've been reading up on the architecture and I am getting the hang of it. Actually, I have 2 questions.
    1) My first question is..."Is there a way to run the redo log file...but to specify something so that it only applies to a single tablespace and it's related files?"
    So, in a situation where, for some reason, only a single dbf file has become corrupted, I only have to worry about replaying the log for those transactions that affect the tablespace associated with that file.
    2) Also, I would like to know if there is a query I can run from iSQLPlus that would allow me to view the datafiles that are associated with a tablespace.
    Thanks

    1) My first question is..."Is there a way to run the
    redo log file...but to specify something so that it
    only applies to a single tablespace and it's related
    files?"
    No You can't specify a redolog file to record the transaction entries for a particular tablespace.
    In cas if a file gets corrupted.you need to apply all the archivelogs since the last backup plus the redologs to bring back the DB to consistent state.
    >
    2) Also, I would like to know if there is a query I
    can run from iSQLPlus that would allow me to view the
    datafiles that are associated with a tablespace.Select file_name,tablespace_name from dba_data_files will give you the
    The above will give you the number of datafiles that a tablespace is made of.
    In your case you have created the tablespace iwth one datafile.
    Message was edited by:
    Maran.E

  • Datafile need to be removed from 11g1 db

    Hi all,
    I'm in a situation to remove the wrongly added datafile from the database as the datafile is no longer present at OS/level.
    Database mode: archive log enabled.
    can I remove the datafile using the below commands?
    Difference between the below commands.
    ALTER DATABASE DATAFILE <datafile name> OFFLINE DROP
    ALTER DATABASE DATAFILE <datafile name> OFFLINE
    Need your suggestion.
    Thanks.

    Hi,
    Find out,the datafile belongs to which tablespace. Then,
    If a tablespace contains multiple datafiles, and you just want to drop one or some of the datafiles and keep
    the remaining datafiles together with the objects and contents, the objects or data must be exported for the
    affected table space. Once exported, the tablespace can be dropped with the command
    DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES;
    If one or more datafiles is missing after a recovery process or accidental deletion, you can use
    ALTER DATABASE DATAFILE <datafile name> OFFLINE DROP
    command to make the datafile offline so that database can starts up after which the troubled tablespace can be dropped
    Regards,
    Jai

  • Drop a partition with a corrupt datafile in the associated tablespace

    Hello,
    I desperately need to drop a partition. However, I am unable to do so as the datafile in the associated tablespace for the partition is corrupt. When I attempt to drop the partition, I receive the following error:
    ORA-00376: file 16 cannot be read at this time.
    ORA-01110: data file 16: '/data3/oradata/cdn/data/tran_part_20051115.dbf'
    Is there any way to get rid of the corrupted datafile so that I can successfully drop the partition? Maintaining the data is not a concern at this point. The priority is to solve this issue, so data loss is not a concern for me.
    Any assistance would be greatly appreciated!
    Thanks,
    Scott

    Does the file '/data3/oradata/cdn/data/tran_part_20051115.dbf' exist on the disk?
    What does; select distinct status from V$recover_file indicate?
    Thanks
    Chandra Pabba

  • How to set threshold value for single tablespace in grid control 11g

    Hi,
    I want to set the threshold value for a single tablespace in grid control 11g,
    please provide me a navigation path.

    Sandy wrote:
    Can you please provide me the full navigation path?go to Targets --> Databases
    Select the Database you like to set this alert for
    Select link Metrics and Policy Settings

  • Single tablespace or full database in 10g

    Hi,
    Which is the best regarding performance...what ever it may be...when doing hot backup...which is the best in all ways..
    (a) putting single tablespace in backup mode and copying
    or
    (b) Putting total database in Backup mode and copying...
    can anybody sched some light on this..in all ways..

    The best is to stop using paleolithic backup techniques and use RMAN with Block Change Tracking.

  • Please Help , I Need semicolon ; after TABLESPACE "MFEED_DATA"

    Hi All,
    please Help , I Need semicolon ; after TABLESPACE "MFEED_DATA"
    as I am getting ; like below example
    select dbms_metadata.get_ddl('TABLE', 'A') || ';' As Result
    from dual;
    CREATE TABLE "MFEED"."A"
    (     "A" NUMBER
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "MFEED_DATA"
    regards,

    Hi,
    well, I don´t know if this works for any table, but I tried two of mine and it was ok:
    select substr(dbms_metadata.get_ddl('TABLE', '<table_name>'), 1,
    length(dbms_metadata.get_ddl('TABLE', '<table_name>') || ';')-4)|| ';' As Result
    from dual;
    If the string gets too long, you must use dbms_lob - functions for string manipulation, but for "normally sized" tables, it should work.
    Regards,
    Gerd
    Message was edited by: Gerd
    OK, Jens has the perfect solution - forget mine!
    gerd_99

  • Problem after rename datafile belongs to SYSTEM tablespace

    Hi
    I've renamed one file belongs to SYSTEM tablespace.
    Then I brought database online and dropped the old file, now I can open database,
    but I can't run backup.
    I delete previous one so I can't restore that file from backup, I have the file because I clonned db,
    but when I restore file and run recover from RMAN database got recovered.
    After that I still can't run backup.
    Do you have idea what to do???
    SYS@orcl >select * from v$recover_file;
    FILE# ONLINE ONLINE_
    ERROR CHANGE#
    TIME
    14 OFFLINE OFFLINE
    OFFLINE NORMAL 0

    RMAN> report schema;
    Report of database schema
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace RB segs Datafile Name
    1 500 SYSTEM YES /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_48fprop3_.dbf
    2 245 UNDOTBS1 YES /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_48fprovo_.dbf
    3 260 SYSAUX NO /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_48fpropg_.dbf
    4 40 USERS NO /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_48fprowb_.dbf
    5 100 EXAMPLE NO /u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_48fpw04c_.dbf
    6 100 DBA1 NO /u01/app/oracle/oradata/ORCL/datafile/dba1.dbf
    7 5 TEST NO /u01/app/oracle/oradata/ORCL/datafile/test_reorg0
    9 10 UNDO1 YES /u01/app/oracle/oradata/ORCL/datafile/undo01.dbf
    10 10 VAL NO /u01/app/oracle/oradata/ORCL/datafile/val.dbf
    11 100 INVENTORY NO /u01/app/oracle/oradata/ORCL/datafile/o1_mf_inventor_4tts3q24_.dbf
    14 260 SYSAUX NO /u01/app/oracle/oradata/o2_mf_sysaux_48fpropg_.dbf
    15 500 SYSTEM YES /u01/app/oracle/oradata/ORCL/datafile/o2_mf_system_48fprop3_.dbf
    17 100 RCVCAT NO /u01/app/oracle/oradata/ORCL/datafile/rcvcat01.dbf
    List of Temporary Files
    =======================
    File Size(MB) Tablespace Maxsize(MB) Tempfile Name
    1 61 TEMP 32767 /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_48fpvnpt_.tmp

  • How to add a datafile in the temp tablespace

    how i can add a datafile in the temp tablespace.
    becuase i am getting tyhe following error
    SQL> select aa.question_desc,a.answer_desc from answer a ,
    2 (select * from question_t where rownum <=100 order by dbms_random.random) aa
    3 where a.question_id = aa.question_id
    4 /
    select aa.question_desc,a.answer_desc from answer a ,
    ERROR at line 1:
    ORA-01652: unable to extend temp segment by 256 in tablespace TEMP

    select * from question_t where rownum <=100 order by dbms_random.random<br>After all the discussion about random select a random generated number... why don't you go for one of the suggestion like :<br>
    select *
    from (select * from question_t order by dbms_random.random)
    where rownum <=100 The result is different.<br>
    In your query, you take 100 rows and order randomly, in the second query, order randomly, and take 100 first rows...<br>
    As you can see above, with your last query, output row are always same, but in different order :<br>
    SCOTT@demo102> select ename from emp where rownum<=5 order by dbms_random.random;
    ENAME
    SMITH
    ALLEN
    MARTIN
    JONES
    WARD
    SCOTT@demo102> /
    ENAME
    MARTIN
    JONES
    SMITH
    ALLEN
    WARD
    SCOTT@demo102> /
    ENAME
    JONES
    ALLEN
    MARTIN
    SMITH
    WARD
    SCOTT@demo102> /
    ENAME
    ALLEN
    SMITH
    WARD
    MARTIN
    JONES
    SCOTT@demo102> <br>
    Anyway, I don't restart this discussion here.<br>
    For your actual problem, Pierre has already give you a suggestion.<br>
    <br>
    Nicolas.

  • How to know how much size we need in a tablespace to create index

    Hi,
    can anybody plz let me know,
    how to know how much space i need in a tablespace to create an index.
    thanks in advance

    Estimate Index Size and Set Storage Parameters
    http://www.camden.rutgers.edu/HELP/Documentation/Oracle/server.815/a67772/indexa.htm#388
    Estimating Bitmap Index Size
    http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a76992/ch6_acce.htm#3625
    HTH
    Girish Sharma

  • I need a single query  ?

    Hi
    My emp table consists of 10 records .
    empcode empname
    1 abc
    2 bcd
    10 zzz
    Now i need a single select query to display the empcode in a single row
    output should be in 1 2 3 ...10
    Thanks
    Jeny

    Hi,
    Searching for "Row to Column", like Nicolas said, will find lots of relevant pages, and a lot about turning n rows into n columns. If you want to turn n rows into one column, searching for "String Aggregation" might be better. (Even though 1, 2, 3, ..., 10 are numbers, '1 2 3 ... 10' is a string.)

  • Help: i need smtp single attachment code

    hy
    i need smtp single attachment code with out any html tag.
    thnx with regards

    There is some sample code on OTN
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html

  • Having one single tablespace versus multiple tablespace?

    My database version is
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    My os version is
    Linux damdat01 2.6.18-128.7.1.el5 #1 SMP Wed Aug 19 04:00:49 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
    My database is OLP system.
    My question is what are the advantages and disadvantages having one single tablespace versus multiple tablespace?
    Easy to maintain when you have single tablespace. but hard to track the IO issues.
    Any other input from any one? Please let me know.

    Billy  Verreynne  wrote:
    EdStevens wrote:
    Does the term "keeping all your eggs in one basket" mean anything ....Well, in the majority of cases, even when using multiple tablespaces they will be on the same storage array or same file system. So the "+all eggs in one basket+" goes a lot a deeper down the storage layer than just the top part where you deal with logical tablespace storage containers.
    Absolutely. Except for the bazillion microscopic solid-state switches and a layer of rust on a spinning platter, everything else is just layers of abstraction. One's thinking and frame of reference depends on what layer of abstraction one is dealing with.
    The major problem with multiple tablespace for a single application And here is where there was some 'fuzz' in the OPs question. I don't recall him specifying one TS per application. Maybe he assumed that, but I read it as one (user) TS per database.
    a) deciding the space allocation of each tablespace
    b) managing what is created in which tablespace
    This comes down do an issue of micro-managing space versus simply chucking everything into a single container and let god ASM/Oracle/LUN/driver/whatever sort them out.
    Issues like transportable tablespaces... separating your logical data into different containers... and the like? That is not really sufficient justification to me for having to micro-manage space for a 101 tablespaces. This simply creates a huge workload on the space management part of the database - that is complex and difficult to deal with. Free space from an underutilised (incorrectly sized) tabelspace cannot simply be moved and reallocated to a tablespace stressed for more space. Everything but...
    Which is why I prefer having fewer tablespaces as this means not having to micro-manage space and continually having to wave a threatening lead pipe around to make sure that applications and developers play rigidly within the large set of strict rules of how these many tablespaces are to be used.Agreed. One can go way overboard, and a lot of this discussion hinges on the OP's intent, as I mentioned above -- one TS per ... what? My default position is one TS per application schema. Normal human users all default to one USERS ts, but don't have any quota because they don't have any reason to create objects.

  • Need to drop tablespace

    i need to drop tablespace but i am getting error. can someone help me to to drop this table.
    i bring the tablespace offline but i am getting error about ora-00604.
    can someone help me

    This is a generic error that means "An error occurred while processing a recursive SQL statement (a statement applying to internal dictionary tables". Could you further describe the circumstances you faced when you issued the drop tablespace command? Could you define the kind of tablespace?
    ~ Madrid

Maybe you are looking for

  • Why doesn't the Wi-Fi work on my IPod

    My IPod is connected to my wifi but it doesn't actually work.

  • Why did the playlist time format change in iTunes 10.6? Can I get the old format back?

    My iTunes playlists used to give a precise total play time. Now that I downloaded the new version of iTunes, the playlist just estimates the time. So, "1 hour" could mean 1 hour and 2 or 3 or 4 minutes. That is a big problem for people who teach 60-m

  • WMA to MP3 Help

    Hey All + Apple,                          I have in excess of 1000 songs still in .wma format from my Windows days. I crossed over to the dark side and now realize that my Mac wont automatically convert my wma songs like the Windows version of iTunes

  • After factory reset the phone encounters an error.

    I recently upgraded so I decided to reset my old cell to factory settings. The old device is a Droid HD Maxx. After the restart the small android comes up with the front open and the little blue ball swirls and it says erasing. After a few moments it

  • 4.7X200 DB instance installation error CJS-00095

    Hi All,    Please help me in resolving this issue    I am trying to install 4.7X200 on windows 2K SP4 using Oracle 9i.   Successfully installed CI installation and encountered error in DB instance at "Create Oracle Database" Phase. Execution of the c