Shrink the Table Undo space

Dear all,

My file of cancellation since more than 6 GB table space size. I'm using Oracle 11 g. How can I reduce the size of the undo tablespace? It would cause problems for the database?

Thank you

And which returns a selection
Select nom_tablespace, content from dba_tablespaces;

Undo tablespace must be re-created in order to reduce it:

-Create new undo tablespace with the smaller size.
SQL > create undo tablespace UNDO_1 datafile 'undo1.dbf' size 100 m;

-The value new tablespace as undo_tablespace
SQL > alter system set undo_tablespace = undo_1;

-Drop the old table space.
SQL > drop tablespace undotbs1 including table of contents

Tags: Database

Similar Questions

  • Shrink the table, rebuild the index?

    I need to reduce some very large tables after the removal of lines and I want to validate the script to run. I was thinking something like this:
    run_deleting_process;
    change the movement line of table my_tableI enable;
    ALTER table my_table retractable space WATERFALL;
    change the movement line of table my_tableI disable;
    I need to rebuild the index after that?, or if I rebuild the markings, can I delete clause CASCADE of the command? It is recommended to run utltrp.sql after shrink the table?, maybe some dependent object needs to be recompiled after the reduction of a table?
    The database version is 11.1.0.7 and documentation does not specify that the index rebuild is required, but I realized it is a desition normall when the narrowing of the tables.
    Thank you

    No there is no rebuild the index after shrinkage. And if you use "cascade", your index will be supported. You do very well.

    Visit this link as well.

    http://www.orafaq.com/Forum/t/137522/2/

  • Table Undo space is still 99% full

    Undo table space is always filled to 99%, what can I do to free? Why is it always full?

    I 96Gig production database, who have 8Gig of undo table spacewith cancel retention 3 Hrs. Undo table space seems to be full all the time.

    According to below thread, I executed the script displaying the result. I'm not sure, what the result of the script is trying to tell me and how it will issue.

    Undo Tablespace full.
    set linesize 120
    set pagesize  60
    alter session set nls_date_format = "dd-Mon-yyyy hh24:mi:ss";
    COL TXNCOUNT         FOR 99,999,999 HEAD 'Txn. Cnt.'
    COL MAXQUERYLEN      FOR 99,999,999 HEAD 'Max|Query|Sec'
    COL MAXCONCURRENCY   FOR 9,999      HEAD 'Max|Concr|Txn'
    COL bks_per_sec      FOR 99,999,999 HEAD 'Blks per|Second'
    COL kb_per_second    FOR 99,999,999 HEAD 'KB per|Second'
    COL undo_mb_required FOR 999,999    HEAD 'MB undo|Needed'
    COL ssolderrcnt      FOR 9,999      HEAD 'ORA-01555|Count'
    COL nospaceerrcnt    FOR 9,999      HEAD 'No Space|Count'
    break on report
    compute max of txncount         -
                   maxquerylen      -
                   maxconcurrency   -
                   bks_per_sec      -
                   kb_per_second    -
                   undo_mb_required on report
    compute  sum of -
                   ssolderrcnt      -
                   nospaceerrcnt    on report
    
    SELECT begin_time,
           txncount-lag(txncount) over (order by end_time) as txncount,
           maxquerylen,
           MAXCONCURRENCY,
           ROUND(UNDOBLKS/((END_TIME - BEGIN_TIME)*86400),4) as BKS_PER_SEC,
           ROUND((UNDOBLKS/((END_TIME - BEGIN_TIME)*86400)),4) * T.BLOCK_SIZE/1024 as KB_PER_SECOND,
           ROUND(((UNDOBLKS/((END_TIME - BEGIN_TIME)*86400)) * T.BLOCK_SIZE/1024) * TO_NUMBER(P2.value)/1024,4) as UNDO_MB_REQUIRED,
          ROUND(SSOLDERRCNT,4),
          round (nospaceerrcnt,4) 
     FROM v$undostat      s,
          dba_tablespaces t,
          v$parameter     p,
          v$parameter     p2
    WHERE t.tablespace_name = UPPER(p.value)
      AND p.name            = 'undo_tablespace'
      and P2.name           = 'undo_retention'
      and  TO_CHAR(begin_time,'DD-MM-YYYY') = '13-09-2011'
    ORDER BY begin_time;
    
    show parameter undo
    Results
    line 1: SQLPLUS Command Skipped: set linesize 120
    line 2: SQLPLUS Command Skipped: set pagesize 60
    session SET altered.
    line 4: SQLPLUS Command Skipped: COL TXNCOUNT         FOR 99,999,999 HEAD 'Txn. Cnt.': only "column .. new_value .." supported
    line 5: SQLPLUS Command Skipped: COL MAXQUERYLEN      FOR 99,999,999 HEAD 'Max|Query|Sec': only "column .. new_value .." supported
    line 6: SQLPLUS Command Skipped: COL MAXCONCURRENCY   FOR 9,999      HEAD 'Max|Concr|Txn': only "column .. new_value .." supported
    line 7: SQLPLUS Command Skipped: COL bks_per_sec      FOR 99,999,999 HEAD 'Blks per|Second': only "column .. new_value .." supported
    line 8: SQLPLUS Command Skipped: COL kb_per_second    FOR 99,999,999 HEAD 'KB per|Second': only "column .. new_value .." supported
    line 9: SQLPLUS Command Skipped: COL undo_mb_required FOR 999,999    HEAD 'MB undo|Needed': only "column .. new_value .." supported
    line 10: SQLPLUS Command Skipped: COL ssolderrcnt      FOR 9,999      HEAD 'ORA-01555|Count': only "column .. new_value .." supported
    line 11: SQLPLUS Command Skipped: COL nospaceerrcnt    FOR 9,999      HEAD 'No Space|Count': only "column .. new_value .." supported
    BEGIN_TIME                TXNCOUNT               MAXQUERYLEN            MAXCONCURRENCY         BKS_PER_SEC            KB_PER_SECOND          UNDO_MB_REQUIRED       ROUND(SSOLDERRCNT,4)   ROUND(NOSPACEERRCNT,4) 
    ------------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- 
    13-Sep-2011 00:00:04                             0                      3                      0.0667                 0.5336                 5.625                  0                      0                      
    13-Sep-2011 00:10:04      289                    0                      1                      0.02                   0.16                   1.6875                 0                      0                      
    13-Sep-2011 00:20:04      -330                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 00:30:04      157                    0                      1                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 00:40:04      -157                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 00:50:04      175                    0                      1                      0.0117                 0.0936                 0.9844                 0                      0                      
    13-Sep-2011 01:00:04      -123                   0                      3                      0.0567                 0.4536                 4.7813                 0                      0                      
    13-Sep-2011 01:10:04      233                    0                      1                      0.0117                 0.0936                 0.9844                 0                      0                      
    13-Sep-2011 01:20:04      -283                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 01:30:04      154                    0                      1                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 01:40:04      -154                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 01:50:04      171                    0                      1                      0.0117                 0.0936                 0.9844                 0                      0                      
    13-Sep-2011 02:00:04      -141                   0                      3                      0.0533                 0.4264                 4.5                    0                      0                      
    13-Sep-2011 02:10:04      254                    0                      1                      0.0167                 0.1336                 1.4063                 0                      0                      
    13-Sep-2011 02:20:04      -286                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 02:30:04      155                    0                      1                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 02:40:04      -154                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 02:50:04      216                    0                      3                      0.0883                 0.7064                 7.4531                 0                      0                      
    13-Sep-2011 03:00:04      -217                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 03:10:04      295                    0                      1                      0.02                   0.16                   1.6875                 0                      0                      
    13-Sep-2011 03:20:04      -295                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 03:30:04      153                    0                      1                      0.0117                 0.0936                 0.9844                 0                      0                      
    13-Sep-2011 03:40:04      -152                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 03:50:04      175                    0                      1                      0.0133                 0.1064                 1.125                  0                      0                      
    13-Sep-2011 04:00:04      -136                   0                      3                      0.0683                 0.5464                 5.7656                 0                      0                      
    13-Sep-2011 04:10:04      248                    0                      1                      0.0133                 0.1064                 1.125                  0                      0                      
    13-Sep-2011 04:20:04      -288                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 04:30:04      158                    0                      1                      0.0083                 0.0664                 0.7031                 0                      0                      
    13-Sep-2011 04:40:04      -157                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 04:50:04      173                    0                      1                      0.0167                 0.1336                 1.4063                 0                      0                      
    13-Sep-2011 05:00:04      -128                   0                      3                      0.0767                 0.6136                 6.4688                 0                      0                      
    13-Sep-2011 05:10:04      234                    0                      1                      0.0167                 0.1336                 1.4063                 0                      0                      
    13-Sep-2011 05:20:04      -281                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 05:30:04      150                    0                      1                      0.0083                 0.0664                 0.7031                 0                      0                      
    13-Sep-2011 05:40:04      -147                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 05:50:04      216                    0                      3                      0.0783                 0.6264                 6.6094                 0                      0                      
    13-Sep-2011 06:00:04      -217                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 06:10:04      279                    0                      1                      0.0183                 0.1464                 1.5469                 0                      0                      
    13-Sep-2011 06:20:04      -280                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 06:30:04      156                    0                      1                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 06:40:04      -154                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 06:50:04      173                    0                      1                      0.0133                 0.1064                 1.125                  0                      0                      
    13-Sep-2011 07:00:04      -140                   0                      3                      0.0683                 0.5464                 5.7656                 0                      0                      
    13-Sep-2011 07:10:04      243                    0                      1                      0.0133                 0.1064                 1.125                  0                      0                      
    13-Sep-2011 07:20:04      -278                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 07:30:04      161                    0                      3                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 07:40:04      -159                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 07:50:04      210                    0                      3                      0.08                   0.64                   6.75                   0                      0                      
    13-Sep-2011 08:00:04      -212                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 08:10:04      281                    0                      1                      0.0167                 0.1336                 1.4063                 0                      0                      
    13-Sep-2011 08:20:04      -282                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 08:30:04      162                    0                      1                      0.0167                 0.1336                 1.4063                 0                      0                      
    13-Sep-2011 08:40:04      -161                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 08:50:04      168                    0                      1                      0.0117                 0.0936                 0.9844                 0                      0                      
    13-Sep-2011 09:00:04      -118                   0                      3                      0.09                   0.72                   7.5938                 0                      0                      
    13-Sep-2011 09:10:04      233                    111                    1                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 09:20:04      -283                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 09:30:04      160                    0                      1                      0.01                   0.08                   0.8438                 0                      0                      
    13-Sep-2011 09:40:04      -158                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 09:50:04      199                    0                      2                      0.06                   0.48                   5.0625                 0                      0                      
    13-Sep-2011 10:00:04      -183                   0                      3                      0.0183                 0.1464                 1.5469                 0                      0                      
    13-Sep-2011 10:10:04      255                    0                      1                      0.0183                 0.1464                 1.5469                 0                      0                      
    13-Sep-2011 10:20:04      -271                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 10:30:04      158                    0                      1                      0.0133                 0.1064                 1.125                  0                      0                      
    13-Sep-2011 10:40:04      7                      0                      1                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 10:50:04      -128                   0                      3                      0.0667                 0.5336                 5.625                  0                      0                      
    13-Sep-2011 11:00:04      240                    0                      1                      0.0133                 0.1064                 1.125                  0                      0                      
    13-Sep-2011 11:10:04      -278                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 11:20:04      152                    0                      1                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 11:30:04      -150                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 11:40:04      156                    0                      1                      0.0167                 0.1336                 1.4063                 0                      0                      
    13-Sep-2011 11:50:04      -159                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 12:00:04      323                    0                      3                      0.08                   0.64                   6.75                   0                      0                      
    13-Sep-2011 12:10:04      -324                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 12:20:04      155                    0                      1                      0.0117                 0.0936                 0.9844                 0                      0                      
    13-Sep-2011 12:30:04      -155                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 12:40:04      161                    0                      1                      0.0117                 0.0936                 0.9844                 0                      0                      
    13-Sep-2011 12:50:04      -123                   0                      3                      0.0667                 0.5336                 5.625                  0                      0                      
    13-Sep-2011 13:00:04      248                    0                      1                      0.015                  0.12                   1.2656                 0                      0                      
    13-Sep-2011 13:10:04      -228                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 13:20:04      131                    0                      1                      0.0183                 0.1464                 1.5469                 0                      0                      
    13-Sep-2011 13:30:04      -24                    0                      1                      0.0133                 0.1064                 1.125                  0                      0                      
    13-Sep-2011 13:40:04      -163                   0                      1                      0.0017                 0.0136                 0.1406                 0                      0                      
    13-Sep-2011 13:50:04      165                    0                      1                      0.0133                 0.1064                 1.125                  0                      0                      
    13-Sep-2011 14:00:04      -117                   0                      3                      0.0833                 0.6664                 7.0312                 0                      0                      
    13-Sep-2011 14:10:04      228                    0                      1                      0.0167                 0.1336                 1.4063                 0                      0                      
    13-Sep-2011 14:20:04      -277                   0                      0                      0                      0                      0                      0                      0                      
    13-Sep-2011 14:30:04      168                    0                      1                      0.0117                 0.0936                 0.9844                 0                      0                      
    13-Sep-2011 14:40:04      -165                   495                    1                      0.0033                 0.0264                 0.2813                 0                      0                      
    13-Sep-2011 14:50:04      -5                     799                    0                      0                      0                      0                      0                      0                      
    
     90 rows selected 
    
    NAME                                                                             TYPE                             VALUE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    -------------------------------------------------------------------------------- -------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
    undo_management                                                                  string                           AUTO                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
    undo_retention                                                                   integer                          10800                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    undo_tablespace                                                                  string                           UNDO_TS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

    Details of the message of pl of the OS and database versions. In gr 10, 2 and later versions, the "full" UNDO tablespace is normal.

    UNDO tablespace full gr 10 2 [Document 413732.1]

    HTH
    Srini

  • Shrink a table and space recovery

    Windows 2008 Server - Oracle 11g 11.0.2

    I had a problem with a table with more than 30 million lines.
    I discovered that a routine created unnecessary lines inside this table.
    The owner of the application sets the routine and I deleted more than 23 million rows in the table.

    To reclaim the space in the table, I activated the option of moving line.
    And then I used the command space shrink.

    I checked in EM and I saw that the table using 10.3 Gbs, now it is using only 2.2 GB.

    In EM, this new free space, more than 8 GB, acknowledged in tablespace and datafile.
    Segment Advisor did not recognize the new free space yet, so the recommendation to reduce is stil there.
    And I want to resize the data file.

    I used EM to resize the data from 12 GB to 5 GB file.
    I see in MS that only 2.5 Gbs are used in this data file.
    But I got the error ORA-03297, file contains data used beyond the requested value of resizing.

    What can I do in order to resize the data file?

    Thanks in advance,
    Ed

    There is a map of tablespace option in MS where you can hover over the segments towards the end of the data file to find out what they are, then you can use one of the many methods to move them from the road.

    Administration--> tablespaces--> click on tablespace--> menu actions drop-down menu to display the contents of the Tablespace--> expand scope map

    May take a while to process.

    See http://www.oracle-base.com/articles/misc/ReclaimingUnusedSpace.php

  • ALTER TABLE SHRINK the SPACE COMPACT takes a long time

    Hello
    I run:
    ALTER TABLE TOM. TAB1 SHRINK SPACE COMPACT;
    ALTER TABLE TOM. TAB1 SHRINK SPACE WATERFALL;


    The "ALTER TABLE TOM. Tab1 SHRINK SPACE COMPACT"was completed in 2 hours, but"ALTER TABLE TOM. Tab1 SHRINK SPACE WATERFALL"is still underway after 8 hours, less than the size of the table TAB1 and index:

    NOM_SEGMENT... GB
    TAB1................................. 166
    IDX01................................ 83
    SYS_C00......................... 42
    IDX02............................. 142
    IDX03.............................. 66
    IDX04............................. 122


    Why 'SHRINK the SPACE COMPACT' takes a lot of time?
    Is it possible to check how much time should I take?

    Thanks in advance!

    Running

    ALTER INDEX TOM. TAB1_IDX03 SHRINK SPACE COMPACT;

    ALTER INDEX TOM. TAB1_IDX03 SHRINK SPACE;

    set is useless, as does 'SHRINK the SPACE' that means "SHRINK SPACE COMPACT" and much more (see the quote from the Doc Oracle Hemant).  2, 'SHRINK the SPACE' is the operation that will take more time.  So if 'SHRINK the SPACE' is what you wanted (reclaim space) and you can afford to wait, run 'SHRINK the SPACE' only.

    "SHRINK the COMPACT SPACE" is a part of the work that 'SHRINK the SPACE' is only.  Generally, use you it when time is at a premium: you run SHRINK SPACE COMPACT a weekday evening (because SHRINK the SPACE does not fit in one night and accrue hourly) and you run SHRINK SPACE on the weekend to finish following the recovery of your space.

    Regarding the fact that the entire segment or a partition after another, I have no experience - I both of their time and test methods.  Perhaps running several sessions at the same time on different partitions would save time (but be more heavy on the CPU and storage).

    Also note that SHRINK the AREA generates a lot of REDO (keep an eye on the free space of your ARCHIVELOG destination).  With your data volume, I would expect dozens (or even hundreds) of gigabytes of roll forward must be generated.

  • In disk management, I checked the drive to shrink the process after that he had finished he told me that there is space for shrinkage of 9 GB!

    Hi all

    I only have one disc space (C) with 1 TB space, the free volume of that disk is about 330 GB, I want to reduce it to create the new volume. In disk management, I checked the drive to shrink the process after that he had finished he told me that there is space for shrinkage of 9 GB!
    Can someone help!

    Original title: Shrink Volume

    The common cause for limited space retractable is the Table of master files (MFT). It is essentially a system file good behaviour that even Windows own Defrag tool will not move.

    PerfectDisk will clean this file and there is a free trial available.

  • impact of production if I reduce space on the table...

    Hello experts.

    I am running Oracle 11.2 and seen in OEM I have a table that is candidate to shrink the space.
    According to OEM, I can gain 5 G by the decrease in the table.
    The table is 16G, so if I reduce the table, then it should reduce about 11 g, right?
    This table is the primary table used by our application, impact on production is very important.

    Good, then I wonder what is the impact of production on the table while I shrink space on the table.
    I'll test now in my test environment.
    First of all, I found that I had a function based index to be deleted until I can reduce the table.
    So I ran dbms_metadata for syntax to recreate the FBI, then dropped the FBI.

    Then I ran change movement line of table owner.tablename enable;
    Then I ran alter table shrink space cascade owner.tablename;

    While I'm under the table command shrink, I opened another session and I asked the table and even made some updates on the table.
    I was very surprised that the table is not locked and is always accessible for update and select statements.
    In fact, I don't see any noticeable impact of the retractable table command.
    Obviously, I'm not in the production environment with hundreds of simultaneous users, but my question is what kind of impact should I expect see if I have it in production with people hitting this table? (No, this isn't an IOT.)

    Any ideas?

    Published by: 974632 on February 19, 2013 05:54

    NOTE: The command table shrink took: passed: 00:43:17.19
    Re-create the function based index took: passed: 00:00:28.80

    No, the shrinkage is invalid index.

    This means that when you use the CASCADE option, index will be narrowed as much too. When you use shrink, you use the clause 'movement of table XXXX line activate edit' which can cause invalid objects such as triggers or procedures related to the XXXX table.

    Also, if you issue the following statement "alter table  enable/disable row movement;"
    it will invalidate any stored procedure that references that table. But, once you reference that
    invalid stored procedure, Oracle recompiles it

    from: http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:35203106066718

  • split the table 1 d of string with spaces in solitary segments

    Hello ppl,

    I wanted to post it because it took me a while to do this thing. I have table with spaces and I do the 2D array. For example:

    ? NM 100.0 ok->

    ? NM

    100.0

    Ok

    Take a peek inside. Maybe someone will find it useful.


  • Get the extra space in the table

    I use af:table for whom

    1. I use the styleclass AFStretchWidth and I put the width to 100%

    2. I'm defining the width of the columns in % (sum of the width of all columns is 100%)

    3. about the table with af:panelCollection and using AFStretchWidth styleclass.

    4. about the table and af: panelCollection with af:panelGrouplayout, the line is vertical and the styleClass is AFStretchWidth.

    And I use the same table 4 cases but I get the extra space that in rare cases. Am I missing something?

    Set columnStretching = "last" or one of the columns will disable the percentage of column widths, this means that if you set the columnStretching = "last" column width table and set = "15%" when running, the column width will be '15px '. If you want to set the column width by the percentage of the columnStretching of the table must on "multiple" as you did.

    So, if you want to set columnStretching = 'last' table, you must set the column width of pixels (width = "120").

    Your page looks ok, you set columnStretching = "multiple" and you set the columns width in percentage but try to remove the width of the table = '100% ' and test again.

  • creation of the table space

    Hello

    I installed Oracle 11.2.0.1.0

    I need to create a table of spaces for a small project.

    I am connected first as sys as sysdba and running the command to create a table below space.

    CREATE TABLESPACE SS_DATA

    DATA FILE

    ' D:\clinapps_data\SS_DATA. DBF' SIZE 150M REUSE AUTOEXTEND ON

    /

    Error I get is:

    CREATE TABLESPACE SS_DATA

    *

    ERROR on line 1:

    ORA-01119: error in creating database file ' D:\clinapps_data\

    ORA-27040: create file error, cannot create the file

    04002 - OSD: could not open the file

    S/O-error: (OS 3) the system cannot find the path specified.

    do I need to put anything before creating this table space?

    Please suggest me.

    Thanks in advance

    Your will know the path is valid? y at - it the folder named clinapps_data? Otherwise, first create the folder

    D:\clinapps_data

    Concerning

  • Total space occupied by the table of tablespace

    Hello

    I'm looking for information find the total space occupied by a table stored in a tablespace. We can consider a scenario in which the table has data present in it, constraints, indexes, LOB columns and free space left on the total, that it has been allocated. I tried two queries, but don't think they give me what I'm looking for.

    Select bytes from WHERE user_segments where nom_segment = "EMPLOYEES";

    SELECT
    lower (owner) as the owner
    lower (table_name) AS table_name
    nom_tablespace
    num_rows
    , blocks * 8/1024 AS size_mb
    pct_free
    compression
    logging
    From all_tables
    Owner WHERE AS UPPER ('HR')
    AND table_name = 'EMPLOYEE '.
    ORDER BY 1, 2;

    Basically, I need to get this information before executing some DML is on the table, after which, I'll check once again how much space is free after the operation. So kind to provide information to customers on space used and released for a table in a tablespace.

    Now how do I go around to find the total space occupied by the table combining the factors mentioned above.


    Thanks in advance.

    Your queries refer to the segment info.

    Here's how

    create or replace procedure segments_for_table(p_table in varchar2, rc in out sys_refcursor) is
    begin
    open rc for
    select l.table_name,s.segment_type,s.segment_name, s.bytes/(1024) kb
    from user_segments s, user_lobs l
    where l.table_name=p_table
    and s.segment_name=l.segment_name
    union
    select i.table_name,s.segment_type,s.segment_name, s.bytes/(1024) kb
    from user_segments s, user_indexes i
    where i.table_name=p_table
    and s.segment_name=i.index_name
    union
    select t.table_name,s.segment_type,s.segment_name, s.bytes/(1024) kb
    from user_segments s, user_tables t
    where t.table_name=p_table
    and s.segment_name=t.table_name;
    end;
    /
    

    -------------
    Sybrand Bakker
    Senior Oracle DBA

  • How to view the spaces in the table of the ADF

    I created the View Oracle object with the following query
    CREATE OR REPLACE FORCE VIEW Emp_View
    (
       Employee_ID,
       Employee_LEVEL,
       Employee_Name
    )
    AS(
      SELECT Employee_ID,
                   LEVEL,
                   LPAD (' ', 3 * LEVEL - 1) || FIRST_NAME   FIRST_NAME
                  FROM Employees
        CONNECT BY Employees.Employee_Id = PRIOR Employees.Manager_Id
    )
    the view is displayed like this

    http://ImageShack.us/photo/my-images/825/hrview.jpg

    I created object of reading view only based on Emp_view and I created this display object ADF table.
    When I ran the page that contains the table I found that
    (01) ADF remove spaces before the first name.
    (02) when I'm looking for Nick for example it returns no rows as it has so I need 2 spaces before it in the view object

    display table in the page as the view in the database object.
    When I search for Nancy for example return any field containing Nancy ignoring spaces before the name
    I need to do this without changing the view in the database object.

    I use Jdeveloper version 11.1.1.6

    User,

    Try to add the property inlineStyle with the value "white-space: pre; ' to the outputText.

    Sample:

    
    

    Jean Lou

  • Purge the table FND_LOBS (attachmentolders of 2 years) to the cleaning table space

    Hello

    I have a requirement to serve the table FND_LOBS (spare part which is over 2 years old) in the cleaning table space.

    Please advise me which is the best way to serve FND_LOBS.

    I already went through the Notes below, but no luck...

    --
    871721.1 - how to purge FND_LOBS?
    555463.1 - how generic Purge or purchase spare part of the Table FND_LOBS
    298698.1 - avoiding an abnormal growth of the FND_LOBS table in 11i Applications
    303709.1 - recovering unused space in the tablespace APPLSYSD
    555463.1 - how generic Purge or purchase spare part of the Table FND_LOBS
    --

    Thank you
    Genoo

    Published by: Geno on April 1, 2013 05:32

    Geno says:
    None notes solve my requirement, I don't see an option to purge only the data that is older than 2 years.

    Thank you
    Genoo

    Purge FND_LOBS table can simultaneous running of 'Purge obsolete generic Queue Manager Data' program - simultaneous treatment - how to add the simultaneous program "Purge obsolete generic Queue Manager Data" to the Sysadmin User. [216541.1 ID]

    You can find more information about the settings for this program at the same time (questions on purge stale data of generic file manager [1165208.1 ID]).

    Thank you
    Hussein

  • delete extra spaces in the column of the table

    How can Hi I remove extra spaces in the column of the table for example if the table column is store as "ÄAAAAA" how to remove this extra space

    This is the column I have what it takes to remove extra spaces
    select SUBTYPES  from tablesubtype;
    am in
    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE Production 11.2.0.3.0
    AMT for Solaris: 11.2.0.3.0 - Production Version
    NLSRTL Version 11.2.0.3.0 - Production

    Published by: adf0994 on 03/12/2012 11:30

    Published by: adf0994 on 03/12/2012 11:42
    UPDATE tablesubtype
       SET SUBTYPES  = TRIM (SUBTYPES);
    

    RTRIM do it alone will not be enough coz it takes away only right spaces and NOT left those.
    I guess in your case do a PLATE will be more advantageous to be safe and avoid left spaces in the future.

    For the intermediate spaces... try this.

    UPDATE tablesubtype
       SET SUBTYPES  = REGEXP_REPLACE (SUBTYPES, ' ', '');
    

    Hope this helps,
    Vanessa B.

    Published by: Vanessa B December 3, 2012 14:33
    -added regexp

  • Determine the space used for each row in the table

    I am trying to determine how much disk space each row in the table will take place (data and indexes). I use sys_guids for my (PK_ID) primary key and foreign key columns (FK_xx), so who are on varchar2 (32).

    What is the best way to determine this?


    CREATE TABLE STU_ENROLLMENT
    (PK_ID VARCHAR2 (32), sys_guid() by default)
    CONSTRAINT pk_stu_enrollment
    KEY ELEMENTARY SCHOOL
    With the HELP of INDEX TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0),.
    FK_STU_SCHOOL VARCHAR2 (32)
    FK_SCHOOL_CALENDAR VARCHAR2 (32)
    FK_PCC_CODE VARCHAR2 (32),
    FK_GRADE_LEVEL VARCHAR2 (32),
    FK_VOTECH VARCHAR2 (32),
    FK_SPECIAL_ED VARCHAR2 (32),
    FK_TUITION_CODE VARCHAR2 (32),
    FK_HOME_INSTRUCTION VARCHAR2 (32),
    FK_DISTRICT VARCHAR2 (32),
    FK_PROGRAM_CODE VARCHAR2 (32),
    FK_SERVING_SCHL VARCHAR2 (32),
    FK_RESPONSIBLE_SCHL VARCHAR2 (32),
    FK_ADA_CODE VARCHAR2 (32),
    FK_ENROLL_TYPE VARCHAR2 (32),
    FK_PCC_REASON VARCHAR2 (32),
    STANDARD_DAY NUMBER (3).
    PCC_NOTES VARCHAR2 (1000).
    USER_FLD1 VARCHAR2 (100),
    USER_FLD2 VARCHAR2 (100),
    USER_FLD3 VARCHAR2 (100),
    USER_FLD4 VARCHAR2 (100),
    USER_FLD5 VARCHAR2 (100),
    PCC_TRANSACTION_ID VARCHAR2 (32),
    TRANSACTION_NUMBER DEFAULT NUMBER '1',
    TRANSACTION_TYPE VARCHAR2 (1) DEFAULT 'A,'
    DATE OF LAST_UPDATE_DATE,
    LAST_UPDATE_USER VARCHAR2 (100))
    TABLESPACE sis_express_base
    STORAGE (5120 INITIAL
    NEXT 5120
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I ON STU_ENROLLMENT (FK_STU_SCHOOL, FK_SCHOOL_CALENDAR, FK_PCC_CODE) SINGLE
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I2 ON STU_ENROLLMENT (FK_SCHOOL_CALENDAR)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I3 ON STU_ENROLLMENT (FK_PCC_CODE)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I4 ON STU_ENROLLMENT (FK_GRADE_LEVEL)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I5 ON STU_ENROLLMENT (FK_VOTECH)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I6 ON STU_ENROLLMENT (FK_SPECIAL_ED)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I7 ON STU_ENROLLMENT (FK_TUITION_CODE)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I8 ON STU_ENROLLMENT (FK_HOME_INSTRUCTION)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I9 ON STU_ENROLLMENT (FK_DISTRICT)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I10 ON STU_ENROLLMENT (FK_PROGRAM_CODE)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I11 ON STU_ENROLLMENT (FK_SERVING_SCHL)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I12 ON STU_ENROLLMENT (FK_RESPONSIBLE_SCHL)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I13 ON STU_ENROLLMENT (FK_ADA_CODE)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I14 ON STU_ENROLLMENT (FK_ENROLL_TYPE)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I15 ON STU_ENROLLMENT (FK_PCC_REASON)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I16 ON STU_ENROLLMENT (PCC_TRANSACTION_ID)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    CREATE INDEX STU_ENROLLMENT_I17 ON STU_ENROLLMENT (FK_STU_SCHOOL, PCC_TRANSACTION_ID, PK_ID)
    TABLESPACE sis_express_index
    STORAGE (4096 INITIAL
    NEXT 4096
    PCTINCREASE 0);

    Hello

    The maximum size of the row in the table

    Select table_name, ROUND (sum (data_length) / 1024,2) SIZE_IN_KB
    of user_tab_cols
    where table_name = 'STU_ENROLLMENT '.
    TABLE_NAME GROUP;

    +

    Select index_name table_name, ROUND (sum (CHAR_LENGTH) / 1024,2) SIZE_IN_KB
    of USER_IND_COLUMNS
    where table_name = 'STU_ENROLLMENT '.
    GROUP BY index_name table_name;

    See the size of the table - method with the average row size

    Concerning
    Hitgon

    Published by: hitgon on May 2, 2012 18:19

    Published by: hitgon on May 2, 2012 18:39

  • Maybe you are looking for