Alter tablespace

hi all, what do the following means ?
1) ALTER TABLESPACE MYTABSPACE LOGGING
2) ALTER TABLESPACE MYTABSPACE NOLOGGING
regards,
Kong

From the documentation:
logging_clause
You should read that page. An excerpt:
Only the following operations support the NOLOGGING mode:
DML:
Direct-path INSERT (serial or parallel)
Direct Loader (SQL*Loader)
DDL:
CREATE TABLE ... AS SELECT
CREATE TABLE ... LOB_storage_clause ... LOB_parameters ... NOCACHE | CACHE READS
ALTER TABLE ... LOB_storage_clause ... LOB_parameters ... NOCACHE | CACHE READS (for specify logging of newly created LOB columns)
ALTER TABLE ... modify_LOB_storage_clause ... modify_LOB_parameters ... NOCACHE | CACHE READS (to change logging of existing LOB columns)
ALTER TABLE ... MOVE
ALTER TABLE ... [all partition operations that involve data movement]
ALTER TABLE ... ADD PARTITION (hash partition only)
ALTER TABLE ... MERGE PARTITIONS
ALTER TABLE ... SPLIT PARTITION
ALTER TABLE ... MOVE PARTITION
ALTER TABLE ... MODIFY PARTITION ... ADD SUBPARTITION
ALTER TABLE ... MODIFY PARTITION ... COALESCE SUBPARTITION
ALTER TABLE ... MODIFY PARTITION ... REBUILD UNUSABLE INDEXES
CREATE INDEX
ALTER INDEX ... REBUILD
ALTER INDEX ... REBUILD PARTITION
ALTER INDEX ... SPLIT PARTITION

Similar Messages

  • Alter tablespace command problem (sql statement))

    Hello,
    I have a table space named t_space2.
    I wanna add a datafile for this tablespace so I wrote on sql the following:
    Alter tablespace t_space2
    add datafile 'D:\DATA\cust.dat'
    size 30 M;
    it gives me the following message:
    table space t_space2 doesn't exist!!!
    the tablespace exsits on dba_tablespaces.
    Thank u in advance
    null

    Hi,
    the reason may be that one:
    You created the tablespace with a command like that:
    CREATE TABLESPACE "goofy"
    DATAFILE 'E:\ORADB8I\ORADATA\WARPING\GOOFY_01.dbf' SIZE 5M REUSE
    DEFAULT STORAGE ( INITIAL 80K NEXT 80K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 1 )Using the quotes, You've indicated to the DB to use the name exaclty as written, so in lower cases.
    Because of that, every time You need to refere to the tablespace, but the same is for tables or column names, Youve to use the name "goofy" intead of goofy or GOOFY.
    This is used to permit to the user, if it is necessary to the application, to use a field name that may be:
    "Total Amount Field"
    I believe that this is the rela reason.
    Bye Max
    null

  • Alter tablespace add datafile taking too much time

    Hi All,
    DB Version :10.2.0.1
    OS Version: Windows Server 2003 32 Bit
    When i am trying to add datafile into tablespace it takes lot of time approx 8 hours.but earlier it take approx 40 to 60 mins
    When i check Alert log file i got the message:
    ORA-604 signalled during: alter tablespace crbt add datafile
    I check there is sufficent space in Disk as i need to add Datafile of 30G.
    Syntax i am using is
    ALTER TABLESPACE TEST
    ADD DATAFILE 'C:\TEST02.DBF' SIZE 30G
    Can anyone tell me exactly the reason for the same
    Thanks in advance

    Hi Aman,
    The space is added sometime but most of the time i am getting this error
    SQL> ALTER TABLESPACE IN_OCT2011
    2 ADD DATAFILE 'E:\CAT\IN_OCT04.DBF' SIZE 30G REUSE;
    ALTER TABLESPACE IN_OCT2011
    ERROR at line 1:
    ORA-19502: write error on file "E:\CAT\IN_OCT04.DBF", blockno 11008
    (blocksize=8192)
    ORA-27072: File I/O error
    OSD-04008: WriteFile() failure, unable to write to file
    O/S-Error: (OS 33) The process cannot access the file because another process
    has locked a portion of the file.
    Kindly help over the same
    Edited by: Vikas Kohli on Nov 5, 2011 8:38 PM

  • Execution of SQL statement 'alter tablespace PSAPSR3

    Dear mastah,
    I trying extend tablesapce at oracle, but not succesfully, and have problem,
    maybe can help this issue..
    error problem add tablespace:
    BR0280I BRSPACE time stamp: 2014-01-06 10.27.31
    BR0370I Directory /oracle/SID/sapreorg/semxnacf created
    BR0280I BRSPACE time stamp: 2014-01-06 10.27.32
    BR0319I Control file copy created: /oracle/SID/sapreorg/semxnacf/cntrlSID.old 99106816
    BR0280I BRSPACE time stamp: 2014-01-06 10.27.32
    BR1088I Extending tablespace PSAPSR3...
    BR0280I BRSPACE time stamp: 2014-01-06 10.27.51
    BR0301E SQL error -59 at location BrSqlExecute-1, SQL statement:
    '/* BRSPACE */ alter tablespace PSAPSR3 add datafile '/oracle/SID/sapdata16/sr3_218/sr3.data218' size 4000M autoextend off'
    ORA-00059: maximum number of DB_FILES exceeded
    BR1017E Execution of SQL statement 'alter tablespace PSAPSR3 add datafile '/oracle/SID/sapdata16/sr3_218/sr3.data218' size 4000M autoextend off' failed
    BR0669I Cannot continue due to previous warnings or errors - you can go back to repeat the last action
    BR0280I BRSPACE time stamp: 2014-01-06 10.27.51
    BR0671I Enter 'b[ack]' to go back, 's[top]' to abort:
    regards,
    amin

    BR1088I Extending tablespace PSAPSR3...
    BR0280I BRSPACE time stamp: 2014-01-06 10.27.51
    BR0301E SQL error -59 at location BrSqlExecute-1, SQL statement:
    '/* BRSPACE */ alter tablespace PSAPSR3 add datafile '/oracle/SID/sapdata16/sr3_218/sr3.data218' size 4000M autoextend off'
    ORA-00059: maximum number of DB_FILES exceeded
    $ oerr ora 59
    00059, 00000, "maximum number of DB_FILES exceeded"
    // *Cause:  The value of the DB_FILES initialization parameter was exceeded.
    // *Action: Increase the value of the DB_FILES parameter and warm start.
    $

  • Demerits of alter tablespace begin backup on 10.2.0.4

    Hi,
    What are the demerits of putting a tablespace in hot backup mode. I know that it generates additional data in redo logs. But, does DBWR and LGWR performance is also impacted? Does database writer throughput reduce leading to free buffer waits? Are these wait events common - free buffer waits and log file sync waits when tablespace is in hot backup mode? Please clarify.
    Thanks,
    Madhav

    Those wait events would be symptoms of the increased I/O and higher I/O Wait/Response times.
    There is obviously more Redo, so LGWR has more to write.
    DBWR performance is probably being constrained by the I/O.
    Note that it isn't just the ALTER TABLESPACE BEGIN BACKUP that is the cause. It is also the backup itself -- whether you are using cp or cpio or tar or any other method to copy datafiles to disk or to tape or to a remote server / tape library. The backup is reading from the same datafiles that DBWR is writing to and, if it is writing the backup to local disks, it is also introducing additional write I/O.

  • Alter tablespace sa online;

    Dear Everyone,
    SQL> alter tablespace sa online;
    alter tablespace sa online
    ERROR at line 1:
    ORA-01113: file 6 needs media recovery
    ORA-01110: data file 6: '/u01/app/oracle/product/11.2.0/db_1/dbs/tbs_data.dat'
    Can anyone tell me what is the problem here
    SQL> recover datafile  '/u01/app/oracle/product/11.2.0/db_1/dbs/tbs_data.dat';
    ORA-00279: change 1859444 generated at 06/17/2013 02:57:17 needed for thread 1
    ORA-00289: suggestion :
    /flash_recovery/flash_recovery_area/SA/archivelog/2013_07_01/o1_mf_1_35_%u_.arc
    ORA-00280: change 1859444 for thread 1 is in sequence #35
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    AUTO
    ORA-00308: cannot open archived log
    '/flash_recovery/flash_recovery_area/SA/archivelog/2013_07_01/o1_mf_1_35_%u_.arc
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log
    '/flash_recovery/flash_recovery_area/SA/archivelog/2013_07_01/o1_mf_1_35_%u_.arc'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    Can Anyone please help me on this.
    Thanks
    Gajanan

    Gajananh999 wrote:
    Dear Everyone,
    SQL> alter tablespace sa online;
    alter tablespace sa online
    ERROR at line 1:
    ORA-01113: file 6 needs media recovery
    ORA-01110: data file 6: '/u01/app/oracle/product/11.2.0/db_1/dbs/tbs_data.dat'
    Can anyone tell me what is the problem here
    SQL> recover datafile  '/u01/app/oracle/product/11.2.0/db_1/dbs/tbs_data.dat';
    ORA-00279: change 1859444 generated at 06/17/2013 02:57:17 needed for thread 1
    ORA-00289: suggestion :
    /flash_recovery/flash_recovery_area/SA/archivelog/2013_07_01/o1_mf_1_35_%u_.arc
    ORA-00280: change 1859444 for thread 1 is in sequence #35
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    AUTO
    ORA-00308: cannot open archived log
    '/flash_recovery/flash_recovery_area/SA/archivelog/2013_07_01/o1_mf_1_35_%u_.arc
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log
    '/flash_recovery/flash_recovery_area/SA/archivelog/2013_07_01/o1_mf_1_35_%u_.arc'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    Can Anyone please help me on this.
    Thanks
    Gajanan
    Why was tablespace SA offline in the first place?
    What did you do with /flash_recovery/flash_recovery_area/SA/archivelog/2013_07_01/o1_mf_1_35_%u_.arc that the recovery could not find it?
    What version (to 4 decimals) and edition (Enterprise, Standard, Standard One) is your database?

  • How to alter tablespace add in pdb from cdb root

    Hi Experts,
    Is there a way to run the "alter tablespace xx add tempfile ..." command in root cdb while the tablespace xx belongs to a pdb. Is it possible to do it without login or change session to pdb? Thanks.

    Krishna-Oracle wrote:
    You have to login into particular PDB using alter session set container command and then make changes.
    You are confusing logging to PDB with setting PDB as current container. These are two completely different actions. Create common user:
    SQL> connect /@sol12 as sysdba
    Connected.
    SQL> create user c##ommon identified by common container = all;
    User created.
    SQL> grant create session to c##ommon container = all;
    Grant succeeded.
    SQL> grant set container to c##ommon container = all;
    Grant succeeded.
    Create after login trigger for the common user in a PDB:
    SQL> connect /@pdb1sol12 as sysdba
    Connected.
    SQL> create or replace
      2    trigger c##ommon_logon_trigger
      3      after logon
      4      on c##ommon.schema
      5      begin
      6          raise_application_error(-20500,'You are not allowed logging to this PDB.');
      7  end;
      8  /
    Trigger created.
    SQL>
    Now I will login as c##ommon to CDB and with set container to PDB:
    SQL> connect c##ommon@sol12
    Enter password: ******
    Connected.
    SQL> alter session set container = pdb1sol12;
    Session altered.
    SQL>
    As you can see, AFTER LOGON trigger wasn't executed. And now I will try logging to PDB:
    SQL> connect c##ommon@pdb1sol12
    Enter password: ******
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20500: You are not allowed logging to this PDB.
    ORA-06512: at line 2
    Warning: You are no longer connected to ORACLE.
    SQL>
    Now you see SET CONTAINER != LOGIN.
    SY.

  • Informations about  'alter tablespace ... coalesce'

    Hi,
    I'm quite new relatively to the DBA functions. I have an Oracle 8i database on a RedHat Linux server.
    I've examined my tablespaces and I found that many of my tablespaces have the pctincrease=0. In this case the process SMON don't join the adjacent free extents so I have a lot of free extents but only few of them are coalesced.
    I thought to coalesce them with the command 'alter tablespace nametablespace coalesce', but I don't know very much this command. I'd like to know more informations about it, above all if I can launch it when my users are working on the database or if it's better to stop the listener and to do a backup before to launch it (among the tablespace that I need to coalesce I have also the Temp tablespace).
    In other words: is the alter tablespace coalesce an harmless command or I need to take some precutions ? And Where I can find more informations about this command ?
    Thanks
    Marco

    You can find more information about the command by reading the manual.
    Coalescing tablespaces is a relatively harmless command. You can run it while users are on the system. They might experience a momentary slowdown, but probably not. All the command does is delete and update entries in an Oracle internal table (FET$ if anyone cares). Coalesce will do nothing if there are no adjacent blocks of free space to coalesce.
    You do not want to coalesce the freespace in your temp tablespace. Oracle manages this internally, and it is more efficient to have a lot of fragments for temp. It saves a lot of recursive sql when a new extent is needed for a sort.
    In the other tablespaces, if the blocks of free space are relatively large, then coalescing will not really gain anything. If your fragments are small, and your segments are frequently allocating new extents (which in itself is a problem), then you may gain a little performance by manually coalescing the tablespace. However, Oracle will coalesce free space if required to get enough space to allocate a new extent.
    If you want to see if coalescing will do anything, you can use:
    SELECT tablespace_name,file_id,block_id,block_id + blocks next_free
    FROM dba_free_space
    ORDER BY 1,2,3Then check if next_free in the previous row is the same as block_id in the current row.
    TTFN
    John

  • Alter tablespace RW on standby database

    I work with Oracle8i for Solaris.
    I've created a stanby database which is opened in read only.
    Now, I need to use a temporary tablespace, so
    I've tried :
    "alter tablespace temp nologging read write;"
    But, oracle answer me an ORA-16000 error (database open for read-only access).
    So :
    1) Is it possible to use a temporary tablespace in standby mode ?
    2) How.
    Thanks,
    Philippe
    null

    Hello,
    Since the table sizes is about 100GB , it takes time to move and rebuild the indexes and the end user application doesnot work if any of the index is unusable or not present.I think it will generate a lot of Archived logs, so it will be very heavy to manage and apply to your Standby.
    If it's possible, it will be faster to put your Primary database in NOARCHIVELOG mode then, you make the Move and Rebuild.
    Afterwards, you put again the Primary in ARCHIVELOG mode and take a good BACKUP of it.
    Later, when nobody work on Standby, you recreate it.
    Hope this help.
    Best regards,
    Jean-Valentin

  • [b]Resizing/Altering Tablespaces Oracle9i[/b]

    1. I want to solve a performance problem by resizing the:
    temporary tablespace
    rollback tablespace
    undo tablespace
    using
    Alter tablespace, by doubling the storage parameters.
    Is this enough or should I resize the associated datafiles?
    2. Is it better performance wise: to resize the datafiles, i.e doubling
    capacity
    OR
    adding another datafile to the tablespace with the same capacity as
    the first one.

    Well U should add space in datafiles if datafiles are of smaller size and very soon they need to autoextend.
    Storage parameters must be decided before making tablespace.
    for ur second query i will suggest u to have different datafile on different disks

  • ALTER TABLESPACE "USERS" OFFLINE NORMAL; takes a checkpoint

    I have an Oracle 10g database. I am trying to go back to a state when I created a physical copy of datafiles in the USERS tablespace. I use the procedure described in http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10734/osrecov.htm#1007495 to bring the files from a backup directory to the datafiles directory.
    The commands I issue are:
    ALTER TABLESPACE "USERS" OFFLINE NORMAL;
    --copy physical datafiles from backup
    ALTER DATABASE RECOVER TABLESPACE "USERS";
    ALTER TABLESPACE "USERS" ONLINE;
    I was expecting to see data from my old backup files, but it turnes out that OFFLINE NORMAL takes a checkpoint and restores the latest content.
    I tried to use OFFLINE IMMEDIATE, but I cannot do it because my database is in NOARCHIVELOG mode.
    Is there another simple way to bring data back from those datafiles?

    your database is in the no archive log mode right... if the backups contain 1000 records and the current content in the tablespace 100 records...
    then the only thing that you can do is if u have a complete database backup that you have taken at the time containing 1000 records.
    i think you can use these backups as the database is in the noarchivelog mode. build an auxiliary instance restore all the data files control files and the startup to mount stage create the redo log file and then open the database.
    export the table containing the 1000 records and then reimport into the current database..
    i think that this procedure might work...

  • Hot backup : Rman vs. ALTER TABLESPACE...BEGIN BACKUP

    Dear Experts,
    I'm currently using the following statements
    - ALTER TABLESPACE (...) BEGIN BACKUP
    - host ocopy (...)
    - ALTER TABLESPACE (...)END BACKUP state
    I'm going for rman now but I've got 2 questions for those who did that in the past:
    1/ Will rman reduce the size of my hotbackup ?
    2/ Does the hot backup run faster using rman ?
    Thanks.
    Best Regards,
    Jerome

    1/ Will rman reduce the size of my hotbackup ? rman backup only those blocks which get accessed by oracle, means it doesn't copy the empty blocks as a part of backup as your OS copy command does. So yeah, the size of the backup will be smaller if there are huge datafiles but with comparably less data. Moreover if you are on 10g then you can use compressed backupset feature which will compress the backupsets.
    2/ Does the hot backup run faster using rman ?
    By using rman, there is no need to put every tablespace in backup mode, you can run the backup in parallel by allocating multiple channels, on 10g you can use block change tracking feature to speed up your incremental backups AND as explained in point 1 there is no need to copy the whole datafile. These all are the benefits of RMAN and I can't make a state statement that by all this the backup will run faster but will definitely go for it.
    Daljit Singh

  • Question about ALTER TABLESPACE add/drop datafile

    Good afternoon,
    As an exercise, I created a tablespace STORETABS and added a datafile to it using the command:
    SQL> alter tablespace storetabs add datafile 'e:/storetabs3.dbf' size 50M;This step succeeded. A new file was created in the root of e: as expected.
    Following that command, I issued:
    SQL> alter tablespace storetabs drop datafile 'e:/storetabs3.dbf';
    Tablespace altered.The command succeeded. However, the file *'e:/storetabs3.dbf'* was not removed. After re-reading the documentation found at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_3002.htm, I get the impression that removing the O/S file itself is something that always needs to be done manually.
    The question: Am I correct that there is no option to cause the "alter tablespace <tablespace> drop datafile <datafilename>" to delete the O/S file ? In other words, must the O/S file always be manually deleted as a separate step ?
    Thank you for your help,
    John.

    I believe in windows directory paths used backslash and not forward slash.
    You can argue why oracle does not give error, either while creating or while dropping ;)
    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 Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> select tablespace_name, file_name from dba_data_files ;
    TABLESPACE_NAME
    FILE_NAME
    USERS
    /u01/app/oracle/oradata/orcl/users01.dbf
    UNDOTBS1
    /u01/app/oracle/oradata/orcl/undotbs01.dbf
    SYSAUX
    /u01/app/oracle/oradata/orcl/sysaux01.dbf
    SYSTEM
    /u01/app/oracle/oradata/orcl/system01.dbf
    EXAMPLE
    /u01/app/oracle/oradata/orcl/example01.dbf
    SCOTT_TBS
    /home/oracle/scott_f1.dat
    6 rows selected.
    SQL> !ls -l scott_f1.dat   
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
    SQL> alter tablespace scott_tbs add datafile '/home/oracle/scott_f2.dat' size 10M ;
    Tablespace altered.
    SQL> !ls -l scott_*.dat
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
    -rw-r----- 1 oracle oinstall  10493952 Sep 11 21:18 scott_f2.dat
    SQL> alter tablespace scott_tbs drop datafile '/home/oracle/scott_f2.dat' ;
    Tablespace altered.
    SQL> !ls -l scott*.dat
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat

  • Enqueue while trying to alter tablespace

    I try to run the "alter tablespace .... read only " command ,
    through sqlplus (as sysdba) ,
    but never get back to prompt .
    instead when I run "select * From v$session_event where sid=XX"
    I get an event named enqueue with large number in "total_waits" column and the same number in "total_timeout" column .
    why do I have this lock ?
    who else can lock the same object ?
    I administer DWH project , with total size of 3.5 T , but the specified tablespace is only 325MB , no one runs a query againts this tablespace right now , and no one writes into tables that are built on that tablespace .
    how can I monitor it and find out what causes the lock ?
    I use oracle 9205 on UNIX AIX 5.3 64 bit .
    Thanks .

    please someone correct me if I'm wrong ,
    but I've just entered the metalink site , and saw that it is a reported bug affecting versions 9.2.0.5 and 10.1.0.3 .
    the bug is fixed in versions 9.2.0.7 and 10.2.0.1 , am I right ?
    they are talking about SMON that holds TT enqueue and preventing alter temporary tablespace , mine , is not temporary tablespace , it is permanent tablespace ,
    but I bumped into the same lock .

  • Altering tablespace offline

    I have put tablespace with rollback segments to
    the offline state:
    alter tablespace rollbck offline normal;
    When I tried to view its status:
    select tablespace_name,status from dba_tablespaces;
    ORA-00376 occured, that means file cannot be read at this time, with the file belonging to the offline tablespace.
    So, when the tablespace is offline I can not even
    check its state?

    Query the dba_data_files and check the datafiles(for the rollbck tablespace) if they are offline. If not make them offline and then try out your statement
    select tablespace_name,status from dba_tablespaces;

Maybe you are looking for

  • Synchronous RFC Receiver inside of a Loop in BPM

    Hi there, we have a RFC -> XI scenario where a BPM needs to receive messages from a RFC inside of a loop, to bundle these messages, just like the first example here: <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a

  • Need directions on how to open MUVO

    I have this really anoying headphones jack problem on my Muvo TX. the player's still under waranty but I li've far from the place where I bought it so there's no way for me to send it back. anyway, what i need from you guys is directions on how to op

  • Maximum disk size?

    That's the maximum disk size or volume size supported? Thanks for any insights.

  • Password Manager

    I recently removed Client Security because the password manager for internet logins was not working and CSS seemed to be the cause.  I have seen many discussions abount password manager but not any solution that was applicable.  Is there a way to use

  • Cannot download trial of after effects

    Hi, I cannot download on my mac booc pro the trial version of after effects cs6. I read about some issues with the mavericks upgrade, which I just did some days ago, and the proper functioning of after effects, but I cannot even download the trial ve