Adding a datafile  to a tablespace?

hi all,
what are the prequisites of adding a datafile  to a tablespace
& how is it performed? pls help?
regards,
vivek.

Hi,
prequisites of adding a datafile to a tablespace
1. check for Tablespace Threshold level should be more than 90%(in db02 tcode).
2. There shd be no backup running while adding datafile to Tablespace.
3. check for the size of datafile should be added to Tablespace.
Goto Brtools--->login as sidadm
BR*Tools main menu
1 = Instance management
2 - Space management
3 - Segment management
4 - Backup and database copy
5 - Restore and recovery
6 - Check and verification
7 - Database statistics
8 - Additional functions
9 - Exit program
select option 2 - Space management.> Then select  1 = Extend tablespace>  3 ~ Tablespace name (tablespace) ... []-->
5 - Size of the new file in MB (size) ..... [3500] then continuosly select  c-continue
With this steps your datafile will be added to Tablespace.
Thanks,
Ramakrishna.

Similar Messages

  • Query in adding a datafile to the tablespace ?

    Hi All,
    A small qry? Suppose i am having a datafile .DBF of Size 26 GB , and now i want to add another Datafile to the tablespace. Then how to stop insertion of data into that 26 GB file , while the 2nd Datafile should start accepting the data. Is it an automatic process or we have to issuse some commands ??. Kindly provide some document links.
    Regards

    Thanks for the reply sir
    But if we declare 3 datafiles at the time of DB
    Creation then how is three datafiles handled.
    Insertion of data is simultaneous in all of the three
    files or in a single file?????The Insertion of data in the datafile can't be handled be you. Oracle manages automatically. To elaborate further the freelist in the segments are response the data insertion. Better solution for your scenario is create tablespace with ample no. of datafiles and then export and import utility.
    with regards
    kccrga

  • Command to add multiple datafiles in multiple tablespace in one time.

    Send me command to
    command to add multiple datafiles in multiple tablespace in one time.

    Just list the files separated by a comma.
    SQL> alter tablespace example
    2 add datafile 'e:\oradata\scratch\example02.dbf' size 100m,
    3 'e:\oradata\scratch\example02.dbf' size 100m;
    Tablespace altered.
    SQL>
    You will have to use more then one command to add datafiles to multiple tablespaces.

  • Lost of datafile to 2 tablespaces, no rman but expdp image

    Hello,
    We lost 2 datafiles to 2 tablespaces in our non-production database. We can not open the database because of the missing 2 datafiles on the same mountpoint. The database is mounted. How to drop these 2 tablespaces and datafiles so the database can be open? We do not have rman but do have expdp files as backup. Thank you.

    Offline drop the datafiles,drop the tablespaces,recreate them,import the data.
    ALTER DATABASE DATAFILE '<full_path_file_name>' OFFLINE DROP;
    ALTER DATABASE OPEN;
    DROP TABLESPACE <tablespace_name> INCLUDING CONTENTS;
    CREATE TABLESPACE <tablespace_name> DATAFILE
    '<datafile_full_path_name'> SIZE <required_size>;
    impdp .....
    Werner

  • How to drop the datafile in a tablespace

    hi,
    I need to drop the datafile in a tablespace.How to drop the datafile in the tablespace.If iam able to drop the datafile and is it possible to create the datafiles with the same name.could u pls help me out..
    Thanks in advance,
    R.Ratheesh

    sql > alter database <datafile> offline drop ;
    sql > alter database open ;What if the datafile have the segments in it, I believe users will not be able to access them. And system will put the datafile to Recovry mode not drop it.
    Dropping a datafle is possible only in 10G. In 9i you can reduce the size of file below the size of your min extents so that the space wont be allocated from that datafile or you may need to recreate a new tablespace copy all the segments from old tablespace and drop old one.
    Cheers

  • Missing datafile from system-tablespace?

    Hello!
    We've got a major power-loss yesterday. After that our database does not start correct.
    I got the message:
    ORA-00600: Interner Fehlercode, Argumente: [kccpb_sanity_check_2], [9577], [9542], [0x0], [], [], [], []
    After that I searched the forum and recreated the controlfiles and started recover database.
    Now I always got the following error-message:
    ORA-01173:Data dictionary indicates missing data file from system tablespace
    I'm not really shure if I created another datafile for that tablespace. Even though there is no other datafile in the "oradata-directory".
    Does anyone know how to go further?
    Regards, Sascha
    Message was edited by:
    Sorehead

    Hello,
    Need help very quickly please!
    I have the same error message. ORacle 10.2.0.3 AIX 5.3 on a datawarehouse.
    I need to recover one tablespace from the database.
    I restored my system tablespace and the data tablespace on a test environment and recreated the controlfile. I recovered my database. Recover OK and when I open the database resetlogs the message is :
    Thread 1 opened at log sequence 1
    Current log# 2 seq# 1 mem# 0: /oradata5/RL_G2_1.ORA
    Successful open of redo thread 1
    Thu Feb 18 13:59:47 2010
    SMON: enabling cache recovery
    Thu Feb 18 13:59:47 2010
    Errors in file /opt/app/oracle/admin/MKT1/udump/mkt1_ora_2318672.trc:
    ORA-00704: bootstrap process failure
    ORA-00604: error occurred at recursive SQL level 2
    ORA-01173: data dictionary indicates missing data file from system tablespace
    Thu Feb 18 13:59:47 2010
    Error 704 happened during db open, shutting down database
    USER: terminating instance due to error 704
    Instance terminated by USER, pid = 2318672
    ORA-1092 signalled during: alter database open resetlogs...
    Thanks for help, production data ;)

  • Droping a datafile from a tablespace

    I want to drop a datafile from a tablespace by using the query
    SQL> alter tablespace TS1 drop datafile 'OS path\df1';
    This query drops the datafile. But physically the datafile is present in the OS path. how to delete the datafile completely from the disk.

    Version:-
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    Although it's dropped on database level, I can't delete.If dropped data file from ORACLE, it deletes from OS level too. By any other processes being locked like antivirus and so on?
    SQL> select file_name from dba_data_files where tablespace_name='USERS';
    FILE_NAME
    C:\ORACLE\ORADATA\ORCL\USERS01.DBF
    C:\ORACLE\ORADATA\ORCL\USERS02.DBF
    SQL> alter tablespace users add datafile 'c:\oracle\oradata\orcl\users03.dbf' size 10m;
    Tablespace altered.
    SQL> host
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\bn2676>cd c:\Oracle\oradata\orcl
    c:\Oracle\oradata\orcl>dir users*
    Volume in drive C is System
    Volume Serial Number is 1853-3E21
    Directory of c:\Oracle\oradata\orcl
    02/15/2012  11:25 PM         5,251,072 USERS01.DBF
    02/16/2012  09:04 PM        10,493,952 USERS02.DBF
    02/16/2012  09:05 PM        10,493,952 USERS03.DBF
                   3 File(s)     26,238,976 bytes
                   0 Dir(s)  177,196,707,840 bytes free
    c:\Oracle\oradata\orcl>exit
    SQL> alter tablespace users drop datafile 'c:\oracle\oradata\orcl\users03.dbf';
    Tablespace altered.
    SQL> select file_name from dba_data_files where tablespace_name='USERS';
    FILE_NAME
    C:\ORACLE\ORADATA\ORCL\USERS01.DBF
    C:\ORACLE\ORADATA\ORCL\USERS02.DBF
    SQL> host
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\bn2676>cd c:\Oracle\oradata\orcl\
    c:\Oracle\oradata\orcl>dir user*
    Volume in drive C is System
    Volume Serial Number is 1853-3E21
    Directory of c:\Oracle\oradata\orcl
    02/15/2012  11:25 PM         5,251,072 USERS01.DBF
    02/16/2012  09:04 PM        10,493,952 USERS02.DBF
                   2 File(s)     15,745,024 bytes
                   0 Dir(s)  177,207,398,400 bytes free
    c:\Oracle\oradata\orcl>

  • Chmod 640 (Datafile,UNDO,TEMP Tablespace, Controlfile, Redo Log Files, Arch

    If i change the permssion of these file to 640, will this break any thing?
    what are the suggested permission of Oracle files and directories?

    here i am doing to secure my DBs Just doing research that it dont break any thing
    These are the permission i am going to change in my DBs , any suggestion?
    chmod 750 /u02/oradata/sid_name
    Chmod 640 (Datafile,UNDO,TEMP Tablespace, Controlfile, Redo Log Files, Archivelogs)
    chmod 644 (alert Logs, init.ora files, config.ora files)
    Chmod 640 $ORACLE_HOME/rdbms/admin/utlpwdmg.sql
    Verify umask = 022 - type "umask" - should return 022; if not, modify in .profile
    Verify all files are readable--run the following:
    select file_name, status from dba_data_files where status != 'AVAILABLE'--should return 0 rows
    SUN - ls -al /var/opt/oracle/oratab = should be owner=oracle group=dba
    IF NOT, OPEN SR TO UNIX TEAM TO CHANGE
    Verify oraInst.loc - look at /u01/app/oracle/security/*.info - setting A271-
    /var/opt/oracle/oraInst.loc - owned by oracle:dba
    *IF NOT, OPEN SR TO UNIX TEAM TO CHANGE
    Verify ownership of $ORACLE_HOME/network/admin/listener.ora,$ORACLE_HOME/network/admin/tnsnames.ora
    = oracle:dba
    *IF NOT, OPEN SR TO UNIX TEAM TO CHANGE
    Verification:
    1. run gsd331 scan and verify fixed--
    execute /u01/app/oracle/security/orashc -m -a *output will go to [email protected]
    BACKOUT:
    Change permission back to 755

  • How to add more than one datafile while creating tablespace

    how to add more than one datafile while creating tablespace. I know by using alter command i can add datafile but i want while creating tablespace

    Hi Dadivela,
    how to add more than one datafile while creating tablespace.Here is the syntax:
    !http://www.dba-oracle.com/images/create_tablespace.jpg!
    I do it like this:
    create tablespace myts
    datafile
    *'/u01/app/oracle/db1.dbf' size 100m,*
    *'/u02/app/oracle/db2.dbf' size 200m;*
    Here are my complete notes:
    http://www.dba-oracle.com/t_tablespace_create_alter.htm
    Hope this answers your question . . .
    Donald K. Burleosn
    Oracle Press author

  • Adding datafile automatically when tablespace is 90% full

    Hi,
    I have a tablesspace having a name user01.dbf(Auto extensible to 4 GB) user02.dbf(Auto extensible to 4GB) ..........
    I am just thinking about automatically creating datafile(alter tablespace add datafile).
    1. (total number of datafiel in tablespace) *4 - space used by dba_segments belonging to user tablespace. if it returns less then 1 GB space, then add a datafile.
    And I will put it on CRONTAB. and it will run every 24/7.
    Does not this look weired?
    Advice:
    1. Don't we have any option like the database server will trigger an event when it is 90% and I can trap this event and run a command to add a datafile. I know internally it will do the same but still I feel if you have a feature then why not use it.
    Any information will be helpful in this regards. And the same question is for OS level do I have to check it every second, space on the file system?

    Do one thing ,write a script which will check free space of your tablespaces like..
    SELECT NAME FROM V$DATABASE;
    select to_char(sysdate,'dd-MON-yyyy hh:mi:ss')Snap_ShotTime from dual;
    SELECT Total.name "Tablespace Name",
    nvl(free_space, 0) free_space,
    nvl(total_space-free_space, 0) Used_space,
    total_space
    FROM
    (select tablespace_name, sum(bytes/1024/1024) free_Space
    from sys.dba_free_space
    group by tablespace_name
    ) free,
    (select b.name, sum(bytes/1024/1024) TOTAL_SPACE
    from sys.v_$datafile a, sys.v_$tablespace B
    where a.ts# = b.ts#
    group by b.name
    ) Total
    WHERE free.Tablespace_name(+) = Total.name
    AND Tablespace_name <> 'PERFSTAT'
    ORDER BY Total.name;
    and find the %age of used space Vs free space.Enable your mail server which will send you the alerts.
    Put in crotab file and set them accordingly..
    Pratap

  • Errors when adding a datafile

    I am trying to add a datafile in one of my QA environments via brtools.
    I keep getting this error msg. This file system does not exist anymore and i am not sure where is brtools reading that info from.
    Any help would be appreciated.
    Options for extension of tablespace PSAPEP1 (1. file)
    1 * Last added file name (lastfile) ....... [/oracle/EQ1/sapdata3/eq1_42/eq1.data42]
    2 * Last added file size in MB (lastsize) . [5320]
    3 - New file to be added (file) ........... [/oracle/EQ1/sapdata5/eq1_43/eq1.data43]
    4 ~ Raw disk / link target (rawlink) ...... []
    5 - Size of the new file in MB (size) ..... [5320]
    6 - File autoextend mode (autoextend) ..... [yes]
    7 - Maximum file size in MB (maxsize) ..... [10000]
    8 - File increment size in MB (incrsize) .. [20]
    9 - SQL command (command) ................. [alter tablespace PSAPEP1 add datafile '/oracle/EQ1/sapdata5/eq1_43/eq1.data43' size 5320M autoextend on next 20M maxsize 10000M]
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    c
    BR0280I BRSPACE time stamp: 2008-06-12 14.43.11
    BR0663I Your choice: 'c'
    BR0259I Program execution will be continued...
    BR0280I BRSPACE time stamp: 2008-06-12 14.43.11
    BR1091I Next data file can be specified now
    BR0675I Do you want to perform this action?
    BR0676I Enter 'y[es]' to perform the action, 'n[o]/c[ont]' to skip it, 's[top]' to abort:
    n
    BR0280I BRSPACE time stamp: 2008-06-12 14.43.18
    BR0257I Your reply: 'n'
    BR0678I The action will be skipped...
    BR0252E Function mkdir() failed for '/eq1_bk/sapreorg/sdydaple' at location BrDirCreate-1
    BR0253E errno 2: No such file or directory
    BR0280I BRSPACE time stamp: 2008-06-12 14.43.18
    BR0700E Fatal errors occurred - terminating processing...
    BR1020I Number of tablespaces processed: 0
    BR1004E BRSPACE function 'tsextend' failed
    BR1008I End of BRSPACE processing: sdydaple.tse 2008-06-12 14.43.18
    BR0280I BRSPACE time stamp: 2008-06-12 14.43.18
    BR1007I BRSPACE terminated with errors

    > BR0280I BRSPACE time stamp: 2008-06-12 14.43.18
    > BR0257I Your reply: 'n'
    > BR0678I The action will be skipped...
    > BR0252E Function mkdir() failed for '/eq1_bk/sapreorg/sdydaple' at location BrDirCreate-1
    > BR0253E errno 2: No such file or directory
    There are two possibilities for that error:
    - the logged in user has no permissions to create a directory
    - brtools were updated and "saproot.sh" did not run to adapt the permissions (s-user-bit) for brspace
    Markus

  • TEMP datafiles for temporary tablespaces don't have same timestamp

    Hi,
    This is what I have done:
    Installing 10G2 on XP PRO with sample database.
    Tried to install Designer Repository with the Wizard, created a user for the toolkit, that failed.
    Added 1 temp tablespace size 20Meg from OEM console.
    Dropped cascade Toolkit schema owner and recreated it
    Tried to install Designer Repository, that failed again
    Added 1 temp tablespace size 1giga from OEM console, failed again to import
    Dropped cascade Toolkit schema owner and recreated it
    Tried to install Designer Repository, that failed again
    Gave up for now: I have located a doc about installing manually by running scripts, will do as soon as I feel at ease with OEM.
    Then I put the PC on snooze while database was up, crashed it.
    Stopped the services, checked the logs, restarted manually and slowly, base up.
    Now both extra TEMP datafiles are lagging behind, seen from Windows explorer, but the tablespaces are seen as online from oem, not seen from sqlplus dba_tablespaces view.
    So the question is:
    Are the TEMP datafiles supposed to stay in sync with the others or is it ok if they show timestamps dating three days back, provided there has not been any users transactions in the database?
    I checked the 10G2 DBA online doc, but I can't find where it's mentioned.
    Many thanks if you can help.

    Hi,
    Everything allright, they do show!
    I'm a bit wary about resizing anything, maybe you remember the resizing bug for SYSTEM tablespace in version 7?
    I have to beef up on DBA tricks.
    Since I also have a 1 Giga Users tablespace, I'll do some heavy Inserting and Updating and Sorting see if that tickles the Temps.
    Many thanks for your prompt reply.
    Message was edited by:
    JeanParis

  • ORA-00060: deadlock detected while adding a datafile

    Hello all,
    I found a strange error today.
    We were trying add datafile to our existing tablespace as usually but suddenly caught in a problem.
    SQL> alter tablespace erp_dat2 add datafile '/hotdata2/irsdata/erp_dat2irs_145.dbf' size 2000M;
    alter tablespace erp_dat2 add datafile '/hotdata2/irsdata/erp_dat2irs_145.dbf' size 2000M
    ERROR at line 1:
    ORA-00060: deadlock detected while waiting for resourcelooks very strange.Searched on google but not found something useful.Still searching.No trace file is generated as such.
    Any ideas will be appreciated. Is it related to any batch job running?
    OS : SunOS 5.10 Generic_142900-13 sun4u sparc SUNW,Sun-Fire (64-bit)
    RDBMS : 11.1.0.7
    Regards!
    Edited by: Nitin Joshi on Sep 30, 2010 3:41 PM
    Changed subject line

    seems like you're hitting a bug in 11.1.0.7
    Bug 8332021 - Cannot add a datafiles when sessions reporting ORA-1653 [ID 8332021.8]
    ORA-60 can occur during datafile addition when concurrent sessions
    are reporting ORA-1653 .>>Workaround:
    >> Stop the sessions getting the errors then add the datafile.

  • How to open database when datafile of nonsystem tablespace is missing?

    Hi,
    I am runnig 10gR2 on Windows XP SP 2
    Here my situation:
    My db is running in archive mode. I have taken backup of my tablespace 'ocp' by using RMAN with Database Control.
    Now I shutdown the db and removed datafile which belongs to the tablespace.
    My problem is now that I am able to start db in mount only.
    I can not open it and getting folowing error:
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
    ORA-01110: data file 6: 'C:\ORACLE\ORADATA\ORCL\OCP.DBF'
    My question is:
    How to drop the tablespase and run backup?
    Thanks

    Hi, you must mount the database and put the datafiles in offline mode
    ALTER DATABASE DATAFILE '<full_path_file_name>' OFFLINE DROP
    After you must open the database.
    Luck.
    Have a good day.
    Regards.

  • How does oracle write to datafiles in a tablespace?

    hi all
    Suppose I have a tablespace consisting of two datafiles. When I need to wirte data onto it,how does ORACLE
    write ? Does it initially write to the first datafile and then write to the second datafile when the first datafile getting full or write to two datafiles in an random manner?
    Thanks for your reply.

    hi all
    I have read reply in reponse to thread "tablespaces or datafile " and testcase in that thread shows that ORACLE will write to datafiles in round-robin manner.
    But my test show totally different result:
    SQL>
    SQL> create tablespace ts_maoxl
    2 datafile '/crash/oradata/TESTDB/datafile/1.bdf' size 5m,
    3 '/crash/oradata/TESTDB/datafile/2.bdf' size 5m
    4 EXTENT MANAGEMENT LOCAL;
    Tablespace created
    SQL>
    SQL> create table maoxl(id char(2000),id3 char(2000),id2 char(2000)) tablespace ts_maoxl;
    Table created
    SQL>
    SQL> declare
    2 begin
    3 for i in 0..99 loop
    4 insert into maoxl values('x','y','z');
    5 end loop;
    6 commit;
    7 end;
    8 /
    PL/SQL procedure successfully completed
    SQL> select count(*) from maoxl;
    COUNT(*)
    100
    SQL> select t.file_id,t.extent_id,bytes from dba_extents t where tablespace_name='TS_MAOXL';
    FILE_ID EXTENT_ID BYTES
    5 0 65536
    5 1 65536
    5 2 65536
    5 3 65536
    5 4 65536
    5 5 65536
    5 6 65536
    5 7 65536
    5 8 65536
    5 9 65536
    5 10 65536
    5 11 65536
    5 12 65536
    5 13 65536
    14 rows selectedAll extents are allocated from datafile 5,none from datafile 6. My result is different from yours.
    BTW,The result of my testcase was from a 10.2.0.4 database running on HP-UNIX
    What could be the problem?
    thanks

Maybe you are looking for

  • Mac -Mini running at 100C CPU temperature after receiving back from servic

    Hello, I just received back my Mac-mini from Apple service. As other users reported, the fan was going mad, running at full speed all the time. By using: http://www.bresink.de/osx/TemperatureMonitor.html I could see that the temperature-sensor connec

  • What Resolution

    Rookie question I know but if I want to work at online resolution with standard def pal coming from digi what res do I need to capture at - is it the 625 25 frames 8 bit, dv-pal or another???? Many thanks

  • Two Step Authentiction Is it available in Bulgaria ?

    is two step authentication available in Bulgaria ? Thanks

  • How do I batch print emails in Thunderbird 24.4.0 (on mac)?

    I recently installed Thunderbird because I need to batch print a folder of emails. Apparently, older versions of Thunderbird allowed this function; but I can't find this print function on 24.4.0. I also have not been able to find any batch-printing a

  • Epson Stylus Photo 820 print workaround for OS 10.3.9?

    Howdy! I have an Epson Stylus Photo 820 that I'm using under OS 10.3.9- that I can't seem to (directly) print to out of in most applications. It works fine in Safari and Entourage and Quark; but out of Photoshop, Illustrator; InDesign, Word, etc., th