The size of datafile

I need to migration a ORACLE database. Try to use expdp / impdp to do the issue.
So I will create database first.
Now I met one problem: How big of the datafile will be better for performance? 5G one file or 10GB one file?
OS: windows 2008 standard 64bit
DATABASE: oracle 10.2.0.4.0 64bit
All datafiles will be stored in SAN disk.

Tom Shen wrote:
I need to migration a ORACLE database. Try to use expdp / impdp to do the issue.
So I will create database first.
Now I met one problem: How big of the datafile will be better for performance? 5G one file or 10GB one file?
OS: windows 2008 standard 64bit
DATABASE: oracle 10.2.0.4.0 64bit
All datafiles will be stored in SAN disk.Size is not a problem, of course number of more datafiles can be problem whenever checkpoint occurs.
>
Tom Shen      
     Newbie
Handle:      Tom Shen
Email:      [email protected]
Status Level:      Newbie
Registered:      Jul 24, 2011
Total Posts:      69
Total Questions:      14 (9 unresolved)
Name      Tom Shen
Location      Shanghai
Occupation      DBA
>
Consider closing your old threads and keep the forum clean.
Edited by: CKPT on Jun 29, 2012 9:40 AM

Similar Messages

  • How to shrink the system tablespace datafile Size

    iam using oracle 9i R2 and i want to reduce my datafile size but it's show's that error when i try to resize it. ORA-03297

    Hi,
    We can directly resize datafilesTEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME='SYSTEM';
    FILE_NAME
         BYTES
    /.../dbsGNX.dbf
    419430400
    TEST.SQL>ALTER DATABASE DATAFILE '/.../dbsGNX.dbf' RESIZE 390M;
    Database altered.
    TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME='SYSTEM';
    FILE_NAME
         BYTES
    /.../dbsGNX.dbf
    408944640But the minimum file size is the size of the extend the furthest in the datafile:TEST.SQL>SELECT FILE_ID,FILE_NAME FROM DBA_DATA_FILES WHERE TABLESPACE_NAME='SYSTEM';
       FILE_ID
    FILE_NAME
             1
    /.../dbsGNX.dbf
    TEST.SQL>SELECT MAX(BLOCK_ID) MBID FROM DBA_EXTENTS WHERE FILE_ID=1;
          MBID
         25129
    TEST.SQL>SELECT SEGMENT_NAME,OWNER,SEGMENT_TYPE FROM DBA_EXTENTS WHERE FILE_ID=1 AND BLOCK_ID=25129;
    SEGMENT_NAME                                                                      OWNER                          SEGMENT_TYPE
    I_OBJAUTH2                                                                        SYS                            INDEX
    TEST.SQL>SHOW PARAMETER BLOCK_SIZE
    NAME                                 TYPE                             VALUE
    db_block_size                        integer                          8192
    TEST.SQL>SELECT 8192*25129 FROM DUAL;
    8192*25129
    205856768about 200M.
    Regards,
    Yoann.

  • Can we decrease the size of existing datafile?

    Hi,
    can we decrease the size of existing datafile?
    Thanks,

    It is a very nice script.
    But it does not deal with something that appears to be being 'pushed' by some contributors (OK, one, really) to this forum as a suitable 'fix' for some performance problems: using multiple block sizes in one database. It's not surprising the script doesn't deal with this, though, because Tom Kyte has never particularly approved of using multiple blocksizes like that.
    Being specific, the script at Ask Tom queries for the setting of db_block_size parameter and uses that to work out what a datafile can be shrunk to. If you have datafiles using non-standard block sizes, however, then that script will not work correctly for them.
    It's always potentially dangerous making use of 5-year old scripts found on the internet, even somewhere as good as Ask Tom.
    It's also a good demonstration as to why, for at least one reason, it's potentially dangerous following Mr. Burleson's advice on multiple block sizes.

  • Add datafile or increase the size?

    Hi, I have this question. When is recomendable to add a datafile on the tablespace and when is recomendable to increase the size of the datafile on the tablespace?
    Thanks!

    What i feel is
    if you dont have free space in the file system then adding datafile to another filesystem is the only option.In this case we cannot increase the datafilesize.
    NO free space in filesystem---add datafile in another filsystem
    else increase data file size.
    increasing the datafile increases the time in recovery incase if datafile is crashed.
    Datawarehouse Db suits big tablespaxces.
    Correct me if i am wrong

  • How to calculate the size of database (a different one)

    Hello Friends,
    I am told to move the data from server to another machine (cloning is one very good option, I agree. But I expect a different answer regarding exports and imports). so How should I go about the task. The destination machine has got unlimited space. So thats not a problem. My questions are :
    1) How should I start the task ( I generally go for studying the structures and their sizes. Is it ok ?)
    2) If I am using Unix machine and there is a limitation that my server will not support file sizes of more than 2 GB, What should I do ?
    3) Shall I have to go for a full database backup or fragment the task ? If I do that , there are many schemas, so it will become tedious. But full backup will exceed OS size limitation. What should be done ?
    4) Is there anyway, I can go through a dump file, to find out, the database objects present inside that and note the related dependencies.
    Please respond.
    Regards,
    Ravi Duvvuri

    1) They are Unix machines. So will the size problem occur(if there is a limitation). How to overcome that?
    If the OS are of the same version you will have any problem. Regarding the storage only you have to have space in disk to store the datafiles, redo logs and controlfiles and nothing else.
    2) I am trying Export/import measure. Though there are other good methods, I just want to explore the full capabilities of Exp/Imp
    r.- Recreate the controlfiles is more effective and fast if the OS are of the same version.
    3) And the oracle version is 9i 2. (If I have to perform this on 8i (both source and destination, will the methods are going to differ ?)).
    R.- The method is the same for 8i/9i/10g.
    How should I go about doing this export/import ?
    r.- To use this method you have to have the original database started.
    To recreate the controlfile without having the datafile that you mentioned you have to get out it from the CREATE CONTROLFILE sentence and that's it.
    For Example: I mean, if your database has 8 datafiles and you have only 7, you have to include only 7 in the CREATE CONTROLFILE sentence.
    Joel Pérez
    http://otn.oracle.com/experts

  • How to find out the size of a database?

    I'm not an oracle dba but a report developer. I'd like to find out the size of my database.
    Is this possible using simple query?

    An oracle database consists of data files, redo log files, control files, temporary files. Whenever you say the size of the database this actually means the summation of these files.
    select a.data_size+b.temp_size+c.redo_size+d.controlfile_size "total_size in MB"
    from
    ( select sum(bytes)/1024/1024 data_size from dba_data_files ) a,
    ( select nvl(sum(bytes),0)/1024/1024 temp_size from dba_temp_files ) b,
    ( select sum(bytes)/1024/1024 redo_size from sys.v_$log ) c,
    ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024 controlfile_size from v$controlfile) d;
    here
    a is megabytes allocated to ALL datafiles
    b is megabytes allocated to ALL TEMP files
    c is megabytes allocated to ALL redo-logs
    d is megabytes allocated to ALL control files
    Nimish Garg
    Software Developer
    *(Oracle & ASP.NET)*
    Indiamart Intermesh Limited, Noida
    To Get Free Oracle & ASP.NET Code Snippets
    Follow: http://nimishgarg.blogspot.com

  • How to check/find the size of current ROLLBACK segment in oracle 10g

    How to check/find the size of current ROLLBACK segment in oracle 10g ? Kindly help

    A rollback segment name like "_SYSSMU231$" is used when you have Automatic Undo Management enabled.
    The only relevant parameters are :
    1. UNDO_MANAGEMENT=AUTO
    2. UNDO_RETENTION=n minutes ==> this is what everyone should be interested in
    3. The sizes of the Undo Tablespace datafiles and whether AUTOEXTEND is ON or OFF
    No one should be interested in the size of a single undo segment when Automatic Undo Management is enabled.
    Possible causes of ORA-01555 errors in Automatic Undo Management
    a. UNDO_RETENTION is too low
    b. Undo tablespace is too small
    Hemant K Chitale

  • To shrink the size of TEMP tablespace

    Dear all,
    There is a databse with RAC, now in OEM the size of TEMP tablespace has been reached at 99.9%. now we want to shrink the size of TEMP tablespace.
    how to we do that???????
    plz help me...........

    Temporary tablespaces usually show they are full, however this space is not actually in use. It is rather allocated. Oracle has evaluated the best way to obtain the most of performance, and he said it is better to allocate once than allocate-deallocate-reallocate extents, so temporary space is not 'released'.
    If you want to feel psychologically more confortable with lower allocated space, you can drop your tablespace (create an interim default temporary tablespace first) and recreate it.
    You can also rebuild temporary datafiles:
    alter tablespace temp add tempfile 'C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.dbf' size 32m;
    SQL> select name from v$tempfile;
    NAME
    C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP.DBF
    C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.DBF
    SQL> alter database tempfile 'C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.DBF' drop including datafiles;
    Database altered.

  • Setting the size of a tablespace prior to its creation

    Hi guys,
    Oracle version: 10.2.0.x
    OS: Windows 32bit
    I was wondering if there are any 'conditions' in setting the intial size of a tablespace prior to its creation. This is because, one of our customers wants to export and import from one schema into another but set an initial size for a tablespace during its creation and prior to importing data into it, but we have a database wizard tool that creates the accounts/schemas by using the following underlying sql:-
    CRETE TABLESPACE <tbl_name> datafile <path><datafile_name>.dbf SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE 32000M DEFAULT STORAGE (INITIAL 256 NEXT 256K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0) ONLINE;
    Under normal circumstances, what he would do is to use our wizard tool and create an account and then import data from an export dump.
    But he wants to create a tablespace using a SQL something like:-
    CRETE TABLESPACE <tbl_name> datafile <path><datafile_name>.dbf SIZE 2000M AUTOEXTEND ON NEXT 500M MAXSIZE 32000M DEFAULT STORAGE (INITIAL 256 NEXT 256K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0) ONLINE;
    He thinks this should be ok because his export dump would be on size 2GB and would want to import all of that 'at once' i.e. without actually using autoextend feature for the first 2GB.
    Does this make any sense? Do you guys see any difference 'performance-wise' between the 2 create tablespace statements?
    I think the second sql (with size 2000M initially) seems to be a more logical approach but I am not really sure of the implications going down the line performance-wise.
    Any help/input much appreciated!
    Thanks guys

    1) Provide the facility in your tool to change the default size of datafiles and keep autoextend off.You won't believe it...we had this option in a previous version but now it isn't there anymore!
    But why turning off AUTOEXTEND? I mean, our customers are not meant to modify anything in the database other than via using our software, hence we would want our customers to just use the software as it is but have their DBAs monitor the growth of any datafiles etc...
    2) Let your tool do what it is doing and then manually increasing the size of the datafiles and making autoextend off once you have created the tablespace and before doing import. This can be done by your tool or loggin to the database.We could do this, but we don't want our customers to manually finger the database as they are/might not be Oracle-efficient and wouldn't want production systems to crash for the same reason.
    Hence we could just give them the SQL to be replaced with the 'default' one and then create a tablespace via the tool which would create a tablespace with an initial size of 2GB+ and with greater autoextend facility (such as autoextend on 500M) rather than 100M so that there are fewer autoextends.
    Also, in your point 2, are you saying to turn off autoextend only for the import and set it back on by alter tablespace....?
    Thank you.

  • Finding the size of db and size of used space

    Greetings all good people.
    Can you please help me find out about 2 database information?
    One, I want to find out the size of a database =size of physical files.
    and the size of data which is the size occupied in physical files.
    We are about to start a new project and there is a table on the database but it is empty.
    We want to be exporting data into this table but we want to make sure that there is enough space on the db before we start populating the table with data.
    I believe the code below just gives me the size of the database.
    select (bytes/1024/1024) as total_gigs from dba_segments where owner='BELL' and segment_name='$TABLE_NAME
    But I want to know the total size of the database and how much size has been used already, much the same as you would want to know the size capacity of a hard drive and how much of the size has been used.
    Sorry if my request is confusing.
    Thanks a lot in advance

    db size can be found out
    select sum(bytes)/1024/1024/1024 from dba_data_files ;
    and size of data is -- in the datafiles
    select sum(bytes)/1024/1024/1024 from dba_segemnts ;
    You can find out by below query .. the tablespace sizes -- would be DBSIZE
    used space -- would be the actual occupied space.
    select t.tablespace, t.totalspace as " Totalspace(MB)",
    round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
    nvl(fs.freespace,0) as "Freespace(MB)"
    from
    (select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
    from dba_data_files d
    group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
    from dba_free_space f
    group by f.tablespace_name) fs
    where t.tablespace=fs.tablespace (+)
    order by t.tablespace

  • Using dbca silent mode change the location of datafiles how to force it

    Hello
    usually i create oracle databases using the create database command, however im trying this time to use the dbca -silent -createDatabase -templateName General_Purpose.dbc - i have edited the General_Purpose.dbc to have the control files. datafiles etc to go to a different location other then the $ORACLE_BASE and no luck so far, whatever i do even changing the $oracle_base just dumps all into a location, how can i force it / change it - this is Oracle 11GR2 on linux
    see sample of my General_Purpose.dbc
    <initParam name="control_files" value="/u01/oradata/control01.ctl, /u02/oradata/control02.ctl"/>
    <initParam name="diagnostic_dest" value="/backup/oracle/oradata"/>
    Name id="1" Tablespace="SYSTEM" Contents="PERMANENT" Size="700" autoextend="true" blocksize="1024">/u01/oradata/system01.dbf</Name>
    <Name id="2" Tablespace="SYSAUX" Contents="PERMANENT" Size="512" autoextend="true" blocksize="1024">/u02/oradata/sysaux01.dbf</Name>
    <Name id="3" Tablespace="UNDOTBS1" Contents="UNDO" Size="25" autoextend="true" blocksize="1024">/u01/oradata/undotbs01.dbf</Name>
    <Name id="4" Tablespace="USERS" Contents="PERMANENT" Size="5" autoextend="true" blocksize="1024">/u02/oradata/users01.dbf</Name>
    thank you

    I think you should use :
    [-datafileDestination <destination directory for all database files> | -datafileNames <a text file containing database objects such as controlfiles, tablespaces, redo log files and spfile to their corresponding raw device file names mappings in name=value format.>] [-datafileDestination <destination directory database for all files> |-datafileNames <a text file containing database objects such as controlfiles, tablespaces, redo log files and spfile to their corresponding raw device file names mappings in name=value format.>]Read this please
    http://docs.oracle.com/cd/E17559_01/em.111/e16599/appdx_creating_db_templates.htm#CJACEDCD

  • Increase the size of tablespace

    what is the sqlplus command to change the size of existing tablespace?
    Tablespace is USERS, I need to increase the size of table space.

    Hi,
    >>Do I need to increase the size of both tablespace & datafile?
    Remember: Oracle stores data logically in tablespaces and physically in datafiles associated with the corresponding tablespace. In resume, you can alter the size of a datafile.
    ALTER DATABASE DATAFILE '/u03/oradata/users01.dbf' RESIZE 5000M
    >>/u03/oradata/users01.dbf not a USERS01.ORA
    The name of the datafiles depends of notation that a DBA are using.
    Cheers

  • How to reduce the size of Temporary Tablespace - URGENT

    Hi all,
    I need your help urgently. I have one Default Temporary Tablespace TEMP in my Oracle 9i database. There are two files in the tablespace each of size 32GB. I need to reduce the size or if possible i need to remove on datafile from the tablespace.
    Could you please provide me with the solution of this?
    This is really very urgent.
    Thanks in advance
    Himanshu

    Add a new temporary tablespace.
    Set this to default database temp tablespace.
    Then you can drop the old TS when all the pending transactions are complete if they are using temp space.
    Also, you need to investigate as to why your temp tablespace files were 32 GB in size. Looks like your application is doing too much sorting.

  • Need help to change the size of the Tablespaces.

    Hi DBA's
    Kindly help me on bellow tablespaces, which are the tablespaces need to increase the size in my R12.1.1 Instance? what size should i increase?
    TABLESPACE_NAME SIZEMB FREEMB
    APPS_TS_QUEUES 1000 894.88
    CTXD 19 1.79
    OWAPUB 10 9.92
    APPS_UNDOTS1 1802 4
    APPS_TS_NOLOGGING 64 25.63
    APPS_TS_ARCHIVE 866 367.25
    APPS_TS_TOOLS 500 499.88
    APPS_TS_TX_IDX 7736.75 722.63
    XXKGI 100 99
    APPS_TS_SEED 2982 388.5
    SYSTEM 12012.1328 1169.96
    APPS_TS_INTERFACE 1041 253.63
    ODM 11 1.44
    PORTAL 100 99.53
    APPS_TS_TX_DATA 5680.125 512.63
    OLAP 17.2421875 1.75
    APPS_TS_SUMMARY 1146 253.25
    APPS_TS_MEDIA 1446 276.88
    SYSAUX 472.6875
    Regards,
    SG

    SG,
    Kindly help me on bellow tablespaces, which are the tablespaces need to increase the size in my R12.1.1 Instance? what size should i increase?You are the best one to tell which tablespaces need to be increased (based on your monitoring to the datafile growth). I always keep 30%-40% free space in the tablespaces and get an alert when the used space go beyond that limit.
    Another option is to enable AUTOEXTEND so you do not have to worry (assuming you have enough space at the OS level).
    How To Check For Autoextensible Datafiles Set To Maxsize Unlimited [ID 468096.1]
    How to Determine if a Datafile has AUTOEXTEND ENABLED [ID 1023280.6]
    Thanks,
    Hussein

  • Want to reduce the size of database

    Hi Guys,
    We have Oracle 10G database over Unix platform, Customer want to reduce the size of database as much as possible and the ami of customer to move the storage area of this database to other one. so we resize some datafiles and get lots of free space at mount point but while checking the utilzation of table is showing somw what different as other . kindly the below O/P:
                                                                                        %                         MaxPoss    Max
    Tablespace Name                         KBytes            Used            Free   Used         Largest          Kbytes   Used
    *a DATA                             45,875,200       8,740,992      37,134,208   19.1       1,728,512     100,663,248   45.6
    *a HIGH_S_DATA                      21,504,000       1,331,520      20,172,480    6.2       3,048,704               0     .0
    *a HIGH_S_IND                       15,360,000         853,568      14,506,432    5.6       1,661,504               0     .0
    *a IND_DATA                         57,241,600       3,512,832      53,728,768    6.1       3,995,648     100,663,248   56.9
    *a LOW_S_DATA                      357,376,000      28,436,736     328,939,264    8.0       4,063,232     167,772,080  213.0
    *a LOW_S_IND                       268,902,400      12,148,352     256,754,048    4.5       4,063,232      67,108,832  400.7
    *a SYSAUX                            1,433,600         897,152         536,448   62.6         485,312      33,554,416    4.3
    *a UNPARSED_DATA                       102,400             128         102,272     .1         102,272               0     .0
    *a USERS                             4,096,000              64       4,095,936     .0       4,063,232      33,554,416   12.2
    *m SYSTEM                            1,433,600         835,520         598,080   58.3         597,952      33,554,416    4.3
    *m TEMP                             54,033,408      54,033,408               0  100.0               0      33,554,416  161.0
    *m UNDOTBS1                         37,650,416         426,416      37,224,000    1.1       4,063,232      33,554,416  112.2
    sum                                865,008,624     111,216,688     753,791,936
    SQL> select sum(bytes/1024/1024/1024) from dba_segments;
    SUM(BYTES/1024/1024/1024)
                   54.5392456
    SQL> select sum(bytes/1024/1024/1024) from dba_data_files;
    SUM(BYTES/1024/1024/1024)
                   773.406235above all o/p is different, no able to understand it. please help me in this .
    Could you please tell me is there any way to reset the HWM at Datafile level and how we reset the HWM of those tables having Materlized view?

    Hello,
    I'm not really sure what is the problem here? Everything seems to be OK. From what I have seen ,your database can stand to be resized down quite a bit.
    The actual amount it can be resized down depends on the highet HWM for the segments in the datafile, as in:
    set line 200col file_name format a90
    select file_name,
    ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) USED_SPACE,
    ceil( blocks*&&blksize/1024/1024) SIZE,
    ceil( blocks*&&blksize/1024/1024) -
    ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) ECONOMY --how much of the space can be reclaimed
    from dba_data_files a,
    ( select file_id, max(block_id+blocks-1) hwm -- here we get the max hwm for the datafile from the extents residing within it
    from dba_extents
    group by file_id ) b
    where a.file_id = b.file_id(+)
    and ceil( blocks*&&blksize/1024/1024) -
    ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) > 2000
    >
    You can also do a reorganization of the segment you suspect has a high degree of reclaimable space within its extents (high HWM and low actual space used). You can run segment advisor to help with that.
    Hope it helps,

Maybe you are looking for