Resizing an Oracle Datafile

Oracle Version: 9.2.0.4.0
O.S. Windows 2000 SP4
1Gb Ram
I´ve truncated an table and now the datafile has 3,000,000 but using only 703,000.
How I can resizing the Datafile ?
I understood that I need to create another tablespace and data file. After that export and import in it. Is it corret ?
Thanks for the help !
Luciano

Hi,
Or resize directly datafile.
Read the next post : Re: How to shrink the system tablespace datafile Size
Nicolas.

Similar Messages

  • Change the default oracle datafile permission from 640 to 644 internally.

    Is there any method available to change the default datafile permission (640-(RW-R-----)) to (644-(RW-R--R--)).Please check the below example which I required.
    existing:
    rw-r----- 1 orasd dba 104865792 Mar 15 01:17 users01.dbf
    Required:
    -rw-r--r-- 1 orasd dba 104865792 Mar 15 01:17 users01.dbf
    we can bring the expected result by setting the value of UMASK to 022, only for OS level files not for oracle datafiles.
    So anyone can help me which method or which parameter we need to set to create datafiles in 644 permission from internally(create tablespace command).
    I know very well oracle software is creating the datafile,controlfile and logfile with 640 file permission, to maintain discretionary access to data (for security purpose).

    Is there a reason for posting duplicates ? Want to change the default datafile permission (640) to (644)

  • Increase the Oracle datafile size or add another datafile

    Someone please explain,
    Is it better to increase the Oracle datafile size or add another datafile to increase the Oracle tablespace size?
    Thanks in advance

    The decision must also includes:
    - the max size of a file in your OS and/or file system
    - how you perform your backup and recovery (eg:do you need to change the file list)
    - how many disks are available and how they are presented to the OS (raw, LVM, striped, ASM, etc.)
    - how many IO channels are available and whether you can balance IO across them
    Personal default is to grow a file to the largest size permitted by OS unless there is a compelling reason otherwise. That fits nicely with the concept of BIGFILE tablespaces (which have their own issues, especially in backup/recovery)

  • Best Oracle datafile size for a SAP ECC6 database.

    Hello,
    We plan to migrate our ECC6 SAP database on a new Windows X64 plateforme running with :
    - Windows 2008 R2
    - Oracle 10.2.0.5.
    The actual Oracle database size is more 2 Tbytes.
    Please could help me to find the best size for the Oracle datafile in this new plateform ?
    Today we create Oracle Tablespace for SAP with 8 GBytes datafiles but we have too many datafiles to managed.
    Do you have experimented 16 GBytes, 32 GBytes, 64 Gbytes datafiles for Oracle Tablespaces on this kind of SAP Plateform ?
    Thank you very much for your reply.
    Best regards.
    Jean-Pascal.

    Hello Jean-Pascal,
    well the answer as usual - it depends )
    We already discussed that topic some time ago - please check this thread:
    big file or small file
    Your storage sub system and stripping matters of course too.
    Regrds
    Stefan

  • Resizing an Oracle Forms window.

    Hi there,
    I have a basic Forms Question. I am looking at the ability to resize the window for an Oracle Form. I understand that this requires modification to the Java code(in the JAR files). Can someone please let me know where I can make this change in the Forms. Which Jar files have to be modified for making this change ?
    Thanks
    IQ

    IQ wrote:
    Hello,
    I dont want the Root Window of my Applications to occupy the full screen. Users are using 27 inches monitors, they would like to resize the Oracle Applications Window just as they can other windows, but some setting within the JAR files is causing the Oracle Window to be full size. So how can I let the users resize the Oracle Window.
    Please advise.To resize your application window you have to set the windows property of your application.
    Resize Allowed=YesIf you want to resize the root window at want to set in a custom position,set the width and height as you need. Like
    Width=800
    height =600Hope this will help you
    If someone's response is helpful or correct, please mark it accordingly.

  • Why not to place Oracle Datafiles on local disks

    Hi, I want to ask a basic question.
    Almost any Oracle installation I saw, the datafiles were placed on mount points, disks etc.
    Is there a reason for this? Why does no one place oracle datafiles to local disks? I couldnt find the answer on installation guide's
    I am asking this because I am going to install oracle (10g) on vmware and trying to decide whether or not to put datafiles on vmdk (local disk of virtual machine)...
    Is this recommended? Or otherwise, why it is recommended to put datafiles to a mount point/external disk etc.
    Thanks in advance

    Hi,
    Oracle is flexiable to place datafiles at your desired location. To reduce IO contention, It's adviced to place datafiles of particular database on specific folder.
    For an instance, While you create database using DBCA, There will be an option asked to choose the datafile location.
    Regards
    KSG

  • How to resize 11g express datafile.

    Hi,
    i am using 11g express,windows 2008, (new bie)
    i want to extend the size of userdata file. becasue while inserting record it is showing database has reached it's maximum size 11GB.
    1) Please tel me solution, because i heard there is limitation in express edition.
    2) why in document it is written "oracle Database XE storage is limited to 5 GB", but it is showing message that it has reached maxsize 11gb,
    and when i calculated max space of table space it was 32767.984375+600+32767.984375+11264+32768 =110168
    and when i caluclated max space of dataifle it was 32767.984375+600+32767.984375+11264=77400 ( temp was not showin in report of datadisctionary)
    3) and from where i should run this command system or sys , ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf'
    RESIZE 11000M; that is 11Gb of size.
    yours sincerely
    Edited by: 944768 on Jan 17, 2013 8:06 AM
    Edited by: 944768 on Jan 17, 2013 10:32 PM
    Edited by: 944768 on Jan 17, 2013 10:41 PM

    i haved asked few more question after reading doc.Okay, let's try to go through each of them directly:
    i want to extend the size of userdata file. becasue while inserting record it is showing database has reached it's maximum size 11GB.
    1) Please tel me solution, because i heard there is limitation in express edition.You can't achieve this by resizing the data file: If your database has acutally reached the limit (and the message you get is clear about that) you can't add more data.
    Either delete existing data to make room for new, or upgrade to another Edition of Oracle Database (e. g. Standard Edition One).
    In {thread:id=2487651} one of the "compact" options was compression. This could be an option, too...
    2) why in document it is written "oracle Database XE storage is limited to 5 GB", but it is showing message that it has reached maxsize 11gb,As pointed out, there is a 4 GB Limit in 10.2 XE and a 11 GB Limit in 11.2 XE. There never has been a 5 GB Limit and the message concerning the maxsize for your 11.2 XE database is accurate.
    and when i calculated max space of table space it was 32767.984375+600+32767.984375+11264+32768 =110168
    and when i caluclated max space of dataifle it was 32767.984375+600+32767.984375+11264=77400 ( temp was not showin in report of datadisctionary)The maximum sizes don't matter at all. The database counts the bytes acutally consumed by user data. There have been a few discussions on how to monitor this yourself in order to know you are close to the limit and take some action before you hit it. One solution is to use the means provided in XE database home page, another to run queries like the one provided here: {message:id=10688588}
    3) and from where i should run this command system or sys , ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf'
    RESIZE 11000M; that is 11Gb of size.This can be run by any dba connected to your database, e. g. using sqlplus (command line client included in your XE install) or SQL Developer (GUI-based client, separate download).
    The current release of SQL Developer (and the XE database home page) offer features to manage data files using a GUI rather than entering the commands yourself.
    If I didn't answer all your questions clear enough or you need additional information, please let us know where you are struggling.
    -Udo

  • Unable to resize asm datafile even though I resized the (logical) datafile

    I have a bigfile that went above 16tb - this is causing me grief in a restore to a netapp filer that has a 16tb limit.
    So we went thru the hassles of moving data around. I issued the
    Mon Dec 10 21:15:06 2012
    alter database datafile '+DATA/pcinf/datafile/users1.303.777062961' resize 15900000000000
    Completed: alter database datafile '+DATA/pcinf/datafile/users1.303.777062961' resize 15900000000000
    Mon Dec 10 21:40:10 2012
    The datafile itself from v$datafile shows 15tb - BUT the asm file is still 18tb in size.
    Should it not be the same - is this something others have faced where the asm file doesnt match?
    Name     USERS1.303.777062961
    Type     DATAFILE
    Redundancy     MIRROR
    Block Size (Bytes)     8192
    Blocks     2281701377
    Logical Size (KB)     18253611016
    Linux, Exadata, 11.2.0.2 + psu
    SR Created but not getting anywhere - Why such a large file, are you sure its really not 18tb, etc .etc
    Daryl

    So I just ran another test of my real datafile issue and it appears to have corrected itself..
    OEM Shows this: (Correct)
    Block Size (Bytes)     8192
    Blocks     1934814455
    Logical Size (KB)     15478515640
    select file_id, bytes from dba_data_files where tablespace_name = 'USERS1';
    select file#, bytes from v$datafile where file# = (select file_id from dba_data_files where tablespace_name = 'USERS1');
    select file#, trunc(bytes/1024/1024/1024) G from v$datafile where file# = (select file_id from dba_data_files where tablespace_name = 'USERS1');
    alter database datafile '+DATA/pcinf/datafile/users1.303.777062961' resize 15850000000000;
    select file_id, bytes from dba_data_files where tablespace_name = 'USERS1';
    select file#, bytes from v$datafile where file# = (select file_id from dba_data_files where tablespace_name = 'USERS1');
    select file#, trunc(bytes/1024/1024/1024) G from v$datafile where file# = (select file_id from dba_data_files where tablespace_name = 'USERS1');
       FILE_ID                BYTES
            12   15,900,000,002,048
    1 row selected.
         FILE#                BYTES
            12   18,691,697,672,192    <<<< CAUSING ME MUCH MUCH GRIEF!!
    1 row selected.
         FILE#          G
            12      17408
    1 row selected.
    Database altered.
       FILE_ID                BYTES
            12   15,850,000,007,168
    1 row selected.
         FILE#                BYTES
            12   15,850,000,007,168
    1 row selected.
         FILE#          G
            12      14761
    1 row selected.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Renaming oracle datafiles at the unix level

    I have noticed that some of the datafile under /oracle/DV1/sapdata2/ have some strange characters in them
    Grrr - DBAs that don't know brtools.....
    for example:
    drwxr-xr-x   2 oradv1   dba             256 Nov 02 23:22 sr3\177_2
    and it shows as sr3_2 unless you use ls -lb which shows the above:
    Now can I simply stop the DB and cp -rp sr3\177_2 to sr3_2?
    I can actually cp -rp  sr3\177_2 to sr3_X and then copy sr3_X to sr3_2 or an mv.
    So can I do this without screwing up Oracle and SAP?
    What should I do as the \177 characters should not be there?
    Thanks Mikie

    Hello Mike,
    at first... the naming of the folder is no problem in running SAP ... it is only a "cosmetic" failure.
    But to your question.....
    1) Shutdown SAP and Oracle (shutdown immediate)
    2) Copy (and remove) or move your data files
    3) Publish the new file names to oracle the following way:
    > startup mount;
    > alter database rename file '<OLD_FILENAME>' to '<NEW_FILENAME>';
    > shutdown immediate;
    > startup ;
    After this the database should start "normally" with the new data file names / directory structure. After these steps i would make a backup of the database.
    I have done this many times (not only in SAP environment).
    For more information of the rename command:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1004.htm#i2079942
    Regards
    Stefan

  • Oracle Datafiles.

    Hi,
    I have installed oracle 9i on Win 2k.
    When i Create a new database by using "Database configuration assistant" it creates total 9
    .dbf files.
    like SYSTEM01.DBF, TOOLS01.DBF,UNDOTBS01.DBF,USERS01.DBF,TEMP01.DBF etc
    what I want to know is , if i login with default user : "scoot", "tigger" and create some tables,
    where is this information stored ?
    if i need to create new application and assign new tablespace and users do i need to create new datafile for this?

    when i login withe these new user , all data will be by default stored to assign datafile ?
    yes, but a user has associated tablespaces instead datafailes and the tablespaces are logic units that stored information about the datafiles that belongs to it.
    In that case if i want to move this data to other server i just need to transfer the data file ?
    You never transfer that datafiles to transport the information of a user. You transfer the datafiles in you want to backup all the database or part of it.
    Joel P�rez

  • Oracle Datafile block corruption

    HI all
    i am facing datafile block corruption in following datafile .
    i don't have any backup.
    how i can recover these blocks
    Regards
    Vivek Rawat

    Hi Vivek,
    Please refer below SAP notes to analyze the affected objects which needs to be recovered
    365481 - Block corruptions
    1559652 - How to deal with block corruptions on Oracle
    923919 - Advanced Oracle block checking features
    http://www.dba-oracle.com/t_repair_corrupt_blocks.htm
    Hope this helps.
    Regards,
    Deepak Kori

  • Putting Oracle Datafiles on an encrypted filesystem

    Hi,
    Has anyone had any luck in keeping datafiles on an encrypted filesystem?
    We have a possible requirement to host a copy of a database that is provided by a third party in a location that isn't manned 24/7. Some people have raised concerns and said that the data must be encrypted - I personally think it's a bit of a waste of time but I'd like to know if it is at least technically feasible.
    We are running Oracle 10.1.2, at the moment on Windows server 2003, but at some point we will move it onto AIX (It currently gets loaded by import/export, but we are going to start using data guard)
    There isn't a lot we can do with the application as it's third party, if we were on 11g we might be able to use the transparent tablespace encryption stuff, if we forked out for it but the application hasn't been tested at all on v11.
    Any ideas?
    Cheers
    Carl

    I'm not sure if this would help,
    http://www.oracle.com/technology/oramag/oracle/05-jan/o15security.html
    http://www.oracle.com/technology/oramag/oracle/05-sep/o55security.html
    sbs

  • Resizing the oracle form runtime window

    hello guys
    i m making one login form in oracle 6i form builder
    and i want as user run it it open as the rectangle box in the centre of user screen.
    i have done for it but the problem that i m facing inthat is that i m unable to resize the size of oracle form runtime window according to the size og my login
    form window.
    pl tell me how to do this.
    Thanks
    With Regards
    Vishal Agrawal

    Hi
    Since you are using Forms6I - just presss F1 - and search for Set_Windows_Property - example - this will take to a proper note

  • Oracle datafile moving soft links

    hi,
    i need to move my datafile from one location to other location. actually in database the data files are confiured with softlinks..
    so how can i move my data file (physicl location )from one location to other physical location,
    i thinking
    1. put the tablespace offline .
    2. move the datafile from one location to other.
    my doublt is how i alter the link location to point to new location.
    should i create new link to point this new location and
    3.alter tablespace rename datafile <old link> to <new link >
    put the tablespace online .
    is any method i can alter the link to point to new location so that i can avoid step 3.
    thanks
    aditya

    You need to do 1, 2 but not 3.
    Instead you need to drop the old link and create a new link to point to the new location of the datafile.
    The name is unchanged as far as the DB is concerned, but you need to make sure the tablespace is offline while making the change.

  • Unix file system & Oracle datafiles--urgent plz

    How i can chech my oracle db files on which unix file system? In HP/UX exvirnment??

    select * from dba_data_files
    AUTOEXTENSIBLE column gives you whether autoextend is on or not.
    Join with dba_free_space to get free space for each file.
    You can check the following link
    http://www.oracle.com/technology/oramag/code/tips2003/083103.html

Maybe you are looking for