List tablespace.

Hello

Please one of you help me witih this requirement.

I want to list the tables, tablespace used, index, index tablespace used & number of lines

Concerning
Ravikumar.A

If you want the complete list of information in a single query, it's here

Select T.Table_Name,t.num_rows,T.Tablespace_Name,T1.Column_Name,T2.Index_Name, T3.Tablespace_Name
From User_Tables T, User_Tab_Cols T1, User_Ind_Columns T2, User_Indexes T3
Where  t.table_name=T1.Table_Name
And T1.Column_Name=T2.Column_Name
and T2.Index_Name=T3.Index_Name;

It would generate detailed report in bulk with table, columns and indexes. I suggest you use different queries to generate required information.

Tags: Database

Similar Questions

  • Question about list tablespace temp of the oracle 12 c container

    Select con_id, name of the containers of v$.  -> 4 lines returned.

    1CBD$ ROOT
    2PDB$ SEEDS
    3PDBRED
    4

    PDBBLUE

    Select con_id, name from v$ tempfile;  -> 4 lines returned.

    1/U01/app/Oracle/oradata/cdb1/temp01.dbf
    2/U01/app/Oracle/oradata/cdb1/pdbseed/pdbseed_temp01.dbf
    3/U01/app/Oracle/oradata/cdb1/pdbred/temp01.dbf
    4

    /U01/app/Oracle/oradata/cdb1/pdbblue/pdbseed_temp01.dbf

    Select cdb_tablespaces TABLESPACE_NAME, CON_ID where nom_tablespace like '% TEMP;   -> 4 lines returned.

    4TEMP
    3TEMP
    2TEMP
    1

    TEMP

    Select * from v$ temp_space_header; <-why to return a row ?

    1

    TEMP

    12 c bug?

    Hello

    and here you have the answer. The dictionary table ts$ contains only the 'local' tablespaces (in your case, those of the CBD).

    FYI - the join condition of the view GV$ TEMP_SPACE_HEADER is based on the following clause:

    from ts$ ts, x$ktfthc hc where ts.contents$ = 1 and ts.bitmapped <> 0 and ts.online$ = 1 and ts.ts# = hc.ktfthctsn and hc.ktfthccval = 0
    

    The view V$ TABLESPACE is based on the control file, not the Oracle dictionary table (as mentioned in the official documentation here: http://docs.oracle.com/cd/E16655_01/server.121/e17615/refrn30277.htm#i1420852 - "V$ TABLESPACE contains an tablespace from the file of control."), but the control file (fixed table x$ kccts) lack the necessary block size information for the calculation. You can write your own query based on x$ kccts and x$ ktfthc, if you use a specific block size (in all environments and each time), but Oracle itself should be more generic, of course.

    Concerning

    Stefan

  • Buffer busy waits and chained the lines

    Hello

    I have a database with many events expected occupied buffer.

    This is caused by the application running on it and several storage spaces located in MSSM.

    Many tables have chained rows.

    My question is, can chained lines create another impact on buffer expects busy?

    Thank you.

    Mr.D. says:

    So I want to copy it into the test env with migrated rows.

    Trasportable tablespace is not available, I'm in 9.2.

    Are you sure you can't use transportable tablespaces in 9.2 - I'm pretty sure you can.  I have not tested (and there may be some restrictions that apply in your particular case, but here are the last few lines 'help exp = yes' output on a 9.2 configuration):

    TTS_FULL_CHECK control the total or partial dependency for TTS
    List TABLESPACES of tablespaces export
    TRANSPORT_TABLESPACE export transportable tablespace metadata (N)
    Name of template TEMPLATE that calls export iAS mode

    Export completed successfully without warnings.

    Transport of the tablespace (s) will probably be easier than setting up a copy backup and recovery of the minimum set of tablespace.

    Concerning

    Jonathan Lewis

    Now on Twitter: @jloracle

  • physical volume occupied by modules

    Hello
    is there any query to give the total physical volume (disk space) occupied by a module (AP GL, PO,...)?

    Thanks a lot before.

    Hello

    There are a lot of scripts available in Metalink or Google, search and you will get may hits.

    Note: 1019999.6 - Script: list Tablespace, data files and free space
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=1019999.6

    Note: 131704.1 - Index of library of database Scripts
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=131704.1

    Kind regards
    Hussein

  • Data files to the tablespace sysaux listed several times v $ datafile

    When I run the query - select name, number of status from v$ datafile;

    the data files for system tablespaces are included several times.

    For example, for sysaux, output a below entries. Why is this?

    It is the same with the space of system tables and users.

    The configuration is Oracle 12 c

    I've used this in earlier versions of oracle, but this is something new that I am observing with 12 c.

    + ASM_DG/gdb/DataFile/SYSAUX.269.838407323, 3

    + ASM_DG/gdb/DD7C48AA5A4404A2E04325AAE80A403C/DataFile/SYSAUX.273.838407639, 7

    + ASM_DG/gdb/F159D742BCE602C0E0438B59D10A581B/DataFile/SYSAUX.258.838409993, 10

    When I use the query-

    SELECT FILE_NAME, BLOCKS, NOM_TABLESPACE

    FROM DBA_DATA_FILES;

    Then only the single entry appears

    + ASM_DG/gdb/DataFile/SYSAUX.269.838407323, 108800, SYSAUX

    Any help will be great.

    Hello

    It's the new architecture shared in action.

    You get a sysaux/system for each plug-in database data file, but the views dba only show data for the current container.

    This is probably the biggest architectural change I've seen in oracle (and I worked with her since 7.2...)

    I recommend you to read the oracle documentation (and then read them again when it totally confuses you until you get it).

    See you soon,.

    Rich

  • PeopleSoft, oracle DB. All objects in one tablespace to other movement

    Hi all

    I have a 11.2.0.3 on OEL 6.3 Peoplesoft database.

    Requirement - there was a requirement to change the tablespace UNIFORM SIZE 128 K to autoallocate extended allocation size.

    Actions-

    (a) create a tablespace of MASTER

    (b) shell script contains-

    I'm in $TBS_LIST # here TBS_LIST contains a list of tablespaces.

    do

    Summary # moving table.sql

    Set serveroutput on

    DECLARE

    TF CURSOR IS

    Select nom_segment, segment_type, owner of dba_segments where nom_tablespace = 'XXX ';

    stmt VARCHAR2 (2048);

    BEGIN

    FOR rlcRec IN tf LOOP

    If (rlcRec.segment_type = 'TABLE') THEN

    stmt: = 'ALTER TABLE' | rlcRec.owner |'. ' | rlcRec.segment_name | "move tablespace MASTER."

    dbms_output.put_line (stmt);

    -Stmt EXECUTE IMMEDIATE.

    ELSIF (rlcRec.segment_type = 'INDEX') THEN

    stmt: = 'ALTER INDEX' | rlcRec.owner |'. ' | rlcRec.segment_name | "rebuild tablespace MASTER."

    ON THE OTHER

    DBMS_OUTPUT. PUT_LINE ("UNKNOWN OBJECT");

    END IF;

    EXECUTE IMMEDIATE stmt;

    END LOOP;

    EXCEPTION

    WHILE OTHERS THEN

    DBMS_OUTPUT. Put_line ("an error occurred");

    END;

    /

    Summary # moving lobs.sql

    Set serveroutput on

    DECLARE

    TF CURSOR IS

    Select the table table_name, column_name, owner of dba_lobs where nom_segment in (select nom_segment from dba_segments where nom_tablespace = "XXX");

    stmt VARCHAR2 (2048);

    BEGIN

    FOR rlcRec IN tf LOOP

    -If (rlcRec.segment_type = 'TABLE') THEN

    stmt: = 'ALTER TABLE' | rlcRec.owner |'. ' | rlcRec.table_name: ' go LOB('|| rlcRec.column_name||') STORE AS (tablespace MASTER)';

    dbms_output.put_line (stmt);

    EXECUTE IMMEDIATE stmt;

    -stmt: = ";

    -END IF;

    END LOOP;

    EXCEPTION

    WHILE OTHERS THEN

    DBMS_OUTPUT. Put_line ("an error occurred");

    END;

    /

    (c) file the original tablespace

    (d) create the original tablspace with autoallocate option

    (e) return the MASTER tablespace tablespace original objects by using similar scripts above.

    Everything works fine and the objects are themselves moved back correctly, we are able to see objects, tables, the lobindex and the lobsegments in storage space, but when we question "select object_type, count (*) in the dba_objects where owner = group 'SYSADM' by order of object_type by object_type;" The number of object decreases after each TABLESPACE.

    Could you please shed some light on this?  Very busy tasks so he couldn't think why its happening.

    Thank you

    Bhushan has.

    user13368428 wrote:

    ...

    Here, the number of object is not changed.

    Now, a tablespace has no object.

    Drop A tablespace so that it can be recreated with autoallocate option< --="" at="" this="" point="" the="" object="" count="" is="">

    ...

    Please, show us queries that you use for each and every one of these steps.

    In addition, you are on 11.2, this means an object may or may not have a segment based on the DEFERRED_SEGMENT_CREATION init parameter (TRUE |) FALSE, TRUE by default), or how the object was created. Your script may fail to see objects with no segments (the scenario is based on dba_segments), but your account is based on dba_objects...

    Basically, after A move to MASTER, the number (on dba_objects) does not change because the empty segment objects are still there (dba_objects). Once the tablespace is deleted, objects from empty person to load (without segments) are also deleted, result: the count on dba_objects is declining.

    Nicolas.

  • Precisely how to find freespace in tablespace Temp

    DB version: 11.2.0.4

    Platform: Oracle Linux 6.4

    It seems that finding the space left in the temporary tablespace is not simple.

    Question1.

    These are the descriptions of column to see DBA_TEMP_FREE_SPACE

    ALLOCATED_SPACE: Total allocated space, in bytes, including the currently allocated space

    and used and the space that is currently allocated and available for reuse

    Free_space: Total free space available in bytes, including the space which is currently assigned and available for

    reuse and the space that is currently not allocated

    http://docs.Oracle.com/CD/E11882_01/server.112/e40402/statviews_5062.htm#REFRN23627

    I'm not native English, but aren't the words in red above for the column ALLOCATED_SPACE a wrong repetition?

    Question2. In 10g, when you see zero space left in the Temp tablespace, allows us to add more space to the tablespace TEMP immediately to prevent ORA-1652: unable to extend temp segment . 11 g, is there an architectural change by what TEMP segments are recycled internally (like UNDO segments) so that we don't have to worry much when we see the 0 space in tablespace temp?

    Question3. For the same database, the results of two queries are listed below. The news of freespace vary between QueryA and QueryB.

    Which is the correct output; QueryA or QueryB?

    -QueryA using dba_temp_free_space

    Select nom_tablespace,

    totalGB tablespace_size/1024/1024/1024,

    AllocSpaceGB ALLOCATED_SPACE/1024/1024/1024,

    free_space/1024/1024/1024 FreeSpaceGB

    of dba_temp_free_space;

    NOM_TABLESPACE TOTALGB ALLOCSPACEGB FREESPACEGB

    ------------------------------ ---------- ------------ -----------

    TEMP 125.99707 125.748047 69.9150391

    -QueryB using v$ sort_segment

    SELECT A.tablespace_name, D.gb_total, tablespace

    SUM (A.used_blocks * D.block_size)/1024/1024/1024 gb_used,)

    D.gb_total - SUM (A.used_blocks * D.block_size)/1024/1024/1024 gb_free)

    V $ sort_segment A.

    (

    SELECT B.name, C.block_size, SUM (C.bytes)/1024/1024/1024 gb_total

    V $ tablespace B, v$ tempfile C

    WHERE B.ts # = C.ts #.

    B.name GROUP, C.block_size

    ) D

    WHERE

    D.name = A.tablespace_name

    GROUP A.tablespace_name, D.gb_total;

    TABLESPACE GB_TOTAL GB_USED GB_FREE

    ------------------------------- ---------- ---------- ----------

    TEMP 125.99707 22.6992188 103.297852

    So, this could mean that oracle will be reuse TEMP segments internally and Temp space needs to be increased if

    you see errors ORA-1652 in the alerts log. Right?


    I rarely answer even in this case.  It is usually a transient problem with enriched work.  Only when it becomes quite persistent to impact business operations should I address it.  When I receive an event, the first thing we do is to go to the guy in charge of the related enterprise application and ask if his phone rings.  If this isn't the case, I don't worry about this. And even if it causes a business problem, the solution may be to increase the size of the TS but to identify a particularly evil-wise query.  The last time that I had to deal with this error was due to a broad and complex query generating a large intermediate result set.  The solution should not continue to increase the TEMP TS (which turned out be "whack-a-mole") but to create a materialized view to reduce the amount of data that had to be picked up and joined running.

  • Tablespace level export, import of schema level - is it possible?

    Hello

    If I have an export level DataPump tablespace (played to = < the tablespaces list > STORAGE space), it is possible to import only tables and dependent objects to a specific schema residing in exported tablespaces? DB version is 11.2.0.3.0. According to the documentation, it should be possible: http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#i1011943 : a schema import is specified using the SCHEMAS. Source can be a full, table, tablespace, or schema mode export dump file set or another database.  

    Perform a quick test seems, however, that it is not so:

    (1) source DB - I have two tablespaces (TS1, TS2) and two schemas (USER1, USER2):

    SQL > select nom_segment, nom_tablespace, segment_type, owner

    from dba_segments

    where owner in ("USER1", "User2");

    2 3

    OWNER NOM_SEGMENT SEGMENT_TYPE TABLESPACE_NAME

    ------ --------------- ------------------ ----------------

    USER1 UQ_1 INDEX TS1

    USER1 T2 TABLE TS1

    USER1 T1 TABLE TS1

    USER2 T4 TABLE TS2

    USER2 T3 TABLE TS2

    (2) I am not a tablespace level to export:

    Expdp system directory $ = dp_dir = ts1 tablespaces, ts2 dumpfile = test.dmp

    Export: Release 11.2.0.3.0 - Production on Fri Jul 11 14:02:54 2014

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Password:

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    Start "SYSTEM". "" SYS_EXPORT_TABLESPACE_01 ": System / * Directory = dp_dir tablespaces = ts1, ts2 dumpfile = test.dmp

    Current estimation using BLOCKS method...

    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

    Total estimation using BLOCKS method: 256 KB

    Object type TABLE_EXPORT/TABLE/TABLE processing

    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX

    Object type TABLE_EXPORT/TABLE/CONSTRAINT/treatment

    Object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS of treatment

    . . exported "USER1". "" T1 "5,007 KB 1 lines

    . . exported "USER1". "" T2 "5,007 KB 1 lines

    . . exported "user2". "" T3 "5,007 KB 1 lines

    . . exported "user2". "" T4 "5,007 KB 1 lines

    Main table 'SYSTEM '. "' SYS_EXPORT_TABLESPACE_01 ' properly load/unloaded

    ******************************************************************************

    "(3) I'm trying to import only the objects belonging to User1 and I get the 'ORA-39039: schema '(' USER1')' expression contains no valid schema" error: "

    Impdp system directory $ = dp_dir patterns = USER1 dumpfile = test.dmp

    Import: Release 11.2.0.3.0 - Production on Fri Jul 11 14:05:15 2014

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Password:

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    ORA-31655: no data or metadata of objects selected for employment

    ORA-39039: pattern Expression "(' USER1')" contains no valid schema.

    (4) However, the dump file contains clearly the owner of the tables:

    Impdp system directory = dp_dir dumpfile = test.dmp sqlfile = imp_dump.txt

    excerpt from imp_dump.txt:

    -path of the new object type: TABLE_EXPORT/TABLE/TABLE

    CREATE TABLE "USER1". "" T1 ".

    ("DUMMY" VARCHAR2 (1 BYTE)

    )

    So is it possible to somehow filter the objects belonging to a certain pattern?

    Thanks in advance for any suggestions.

    Swear

    Hi swear,.

    This led a small survey of me I thought I was worthy of a blog in the end...

    Oracle DBA Blog 2.0: A datapump bug or a feature and an obscure workaround

    Initially, I thought that you made a mistake, but that doesn't seem to be the way it behaves. I've included a few possible solutions - see if one of them responds to what you want to do...

    See you soon,.

    Rich

  • Question of missing Tablespace

    Hi all

    I was wondering if anyone had any suggestions.  I have what seems to be a missing tablespace however the data files that are associated with the storage space are still on my server.  When I ask the Oracle database to show all my storage space, my tablespace is not listed.  However when I look at the data files they are still being changed or at least seem to be changed because they have a current date and time.

    I tried to mount the database and run the following "ALTER DATABASE DATAFILE ' / oracle_data/hdbt1.ora ' ONLINE" and then open the database and querying tablespaces again to see if it showed up and he did not.  I don't get any errors or anything missing data files.  Any suggestions?

    cfa0f171-30D1-43b0-91f8-a060021e79ad wrote:

    In the past the above query would tell me whether my tablespace was full.

    No, it wouldn't since you do not have an outer join between DBA_DATA_FILES and DBA_FREE_SPACE.  Without the outer join unmatched records will NOT be displayed, so if a tablespace becomes FULL, it has been missing since this 'report '.  Look at the output of your query when a tablespace can exist without free space:

    SQL> select d.tablespace_name,
      2  d.total/1048576 "Total (MB)",
      3  round(f.free/1048576,2) "Free",
      4  round(f.free/d.total*100,2) "% Free"
      5  from
      6  (select tablespace_name,
      7  round(sum(bytes)) free
      8  from dba_free_space
      9  group by tablespace_name) f,
     10  (select tablespace_name, sum(bytes) total
     11  from dba_data_files
     12  group by tablespace_name) d
     13  WHERE d.tablespace_name =
     14  f.tablespace_name
     15  order by 1;
    
    TABLESPACE_NAME                Total (MB)       Free     % Free
    ------------------------------ ---------- ---------- ----------
    INDX                                   50         49         98
    SYSAUX                                810        203      25.06
    SYSTEM                                740       8.56       1.16
    UNDOTBS1                             5695    5434.75      95.43
    USERS                            14231.25   13884.56      97.56
    USERS2                                199        198       99.5
    
    6 rows selected.
    

    Now look which gives you an outer join:

    SQL> select d.tablespace_name,
      2  d.total/1048576 "Total (MB)",
      3  round(nvl(f.free, 0)/1048576,2) "Free",
      4  round(nvl(f.free, 0)/d.total*100,2) "% Free"
      5  from
      6  (select tablespace_name,
      7  round(sum(bytes),0) free
      8  from dba_free_space
      9  group by tablespace_name) f right outer join
     10  (select tablespace_name, sum(bytes) total
     11  from dba_data_files
     12  group by tablespace_name) d on d.tablespace_name = f.tablespace_name
     13  order by 1;
    
    TABLESPACE_NAME                Total (MB)       Free     % Free
    ------------------------------ ---------- ---------- ----------
    INDX                                   50         49         98
    SYSAUX                                810        203      25.06
    SYSTEM                                740       8.56       1.16
    UNDOTBS1                             5695    5434.75      95.43
    USERS                            14231.25   13884.56      97.56
    USERS2                                199        198       99.5
    YUPA                                    1          0          0
    
    7 rows selected.
    
    SQL>
    

    This is the query that you want to show you tablespace free space even when there is none.

    David Fitzjarrell

  • list backup command does not


    SQL > select file_name, bytes/1024/1024 of dba_data_files where nom_tablespace = 'USERS ';


    FILE_NAME BYTES/1024/1024

    ------------------------------------------ ------------------------

    /U01/app/Oracle/oradata/ORCL/users01.dbf 1945

    RMAN > backup as copy users tablespace;


    From backup 5 June 14

    using channel ORA_DISK_1

    channel ORA_DISK_1: from data file copy

    input datafile fno = name=/u01/app/oracle/oradata/orcl/users01.dbf 00004

    output filename=/u01/app/oracle/flash_recovery_area/ORCL/datafile/o1_mf_users_9s0bn3l1_.dbf tag = recid = 68 = 849448963 stamp TAG20140605T135955

    channel ORA_DISK_1: datafile copy complete, duration: 00:02:55

    Backup finished on June 5, 14

    RMAN > backup from the list of the users tablespace;

    using the control file of the target instead of recovery catalog database


    RMAN > backup from the list of the users tablespace;


    RMAN > backup from the list of the users tablespace;

    -no way out - why?


    RMAN > exit

    Complete recovery manager.

    [oracle@oel5 ~] $ cd/u01/app/oracle/flash_recovery_area/ORCL/datafile.

    [oracle@oel5 datafile] $ ls-l

    Total 1993640

    -rw - r - 1 oracle oinstall 2039488512 5 June 14:02 o1_mf_users_9s0bn3l1_.dbf

    [oracle@oel5 datafile] $ HS - o1_mf_users_9s0bn3l1_.dbf

    2.0 o1_mf_users_9s0bn3l1_.dbf G


    You make a backup "copy" so it will not be displayed in the backup list.

    If you do a "backup tablespace users" this backup will appear when you make a list of backup.

    Or do you "copy the list;" to show your tablespace copy backup or "list copy of the tablespace users;

  • Query to check tablespace and free size

    Hi all

    I Googled, but obtained joins to query to check tablespace and free size that lists all tablesapces but

    I want to check the free size, total and used size MB of a particular tablespace as "ZEUS". Only this tablesapce must be registered with the necessary details.

    Any help?

    Kind regards

    Ritu

    Try this one:

    -ts_size.sql

    all pages 49999 flax 120

    Col nom_tablespace to tru a32

    Col 'Total GB' for 999,999.9

    Col 'Used Go' for 999,999.9

    "GB" free pass to 99999,9

    'Pct Free' pass to 999,9

    Col 'Pct used' to 999,9

    sum of model of 'Go Total' on the report

    sum of model of 'Go' on the report

    sum of model 'GB Free' on the report

    break the report

    Select A.Tablespace_Name, B.Total/1024/1024/1024 'Total GB. "

    (B.Total-a.Total_Free)/1024/1024/1024 'Used Go',

    Free A.Total_Free/1024/1024/1024 "GB."

    (A.Total_Free/B.Total) * 100 "free Pct,"

    ((B.Total-A.Total_Free)/B.Total) * 100 "used Pct")

    From (Select Tablespace_Name, Sum (Bytes) Total_Free

    Of Sys.Dba_Free_Space

    Group by Tablespace_Name) has

    , (Select Tablespace_Name, Sum (Bytes) Total

    Of Sys.Dba_Data_Files

    Group by Tablespace_Name B)

    Where A.Tablespace_Name LIKE '% of ZEUS '.

    And A.Tablespace_Name = B.Tablespace_Name

    Order by 1

    /

    PS: You can easily customize to "MB".

  • List-partition wall

    Hello

    I need to split a partition list in my table in two recording.

    I want to divide the partition "PRT_TEST_02_03" as follows:

    Value of 2 should go in PRT_TEST_02

    and

    Value 3 should go in PRT_TEST_03

    But I always get an error message... I don't know why!

    DROP TABLE TEST_TO_SPLIT

    /

    CREATE TABLE TEST_TO_SPLIT

    (id NUMBER

    , grp NUMBER (3)

    , text VARCHAR2 (100)

    )

    TABLESPACE ALL_DATA

    LIST BY SCORE (grp)

    (PARTITION PRT_TEST_01 VALUES (1),

    PARTITION PRT_TEST_02_03 VALUES (2, 3),

    PRT_TEST_04_07 PARTITION VALUES (4, 5, 6, 7)

    )

    /

    INSERT IN TEST_TO_SPLIT (id, grp, text) VALUES (1, 1, 'a');

    INSERT IN TEST_TO_SPLIT (id, grp, text) VALUES (2, 1, 'b');

    INSERT INTO TEST_TO_SPLIT (id, grp, text) VALUES (3, 2, 'c');

    INSERT IN TEST_TO_SPLIT (id, grp, text) VALUES (4, 3, ');

    INSERT IN TEST_TO_SPLIT (id, grp, text) VALUES (5, 3, 'e');

    INSERT IN TEST_TO_SPLIT (id, grp, text) VALUES (6, 4, 'f');

    INSERT IN TEST_TO_SPLIT (id, grp, text) VALUES (7, 5, 'g');

    INSERT INTO TEST_TO_SPLIT (id, grp, text) VALUES (8, 6, 'h');

    INSERT IN TEST_TO_SPLIT (id, grp, text) VALUES (9, 7, 'i');

    COMMIT;

    ALTER TABLE TEST_TO_SPLIT SPLIT PARTITION PRT_TEST_02_03 VALUES (2, 3) INTO (PARTITION, PARTITION PRT_TEST_03 PRT_TEST_02)

    /

    Connected to:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    ALTER TABLE TEST_TO_SPLIT SPLIT PARTITION PRT_TEST_02_03 VALUES (2, 3) INTO (PARTITION, PARTITION PRT_TEST_03 PRT_TEST_02)

    *

    ERROR on line 1:

    ORA-14314: resulting list partitions must contain at least 1 value

    SQL >

    Could you please tell me what I'm doing wrong?

    Thanks in advance!

    Hello Adme12

    Yes... Let's not your syntax.

    Try this:

    ALTER TABLE TEST_TO_SPLIT SPLIT PARTITION PRT_TEST_02_03 VALUES (2) INTO (PARTITION, PARTITION PRT_TEST_03 PRT_TEST_02)

    ;

    Select grp, COUNT (*) from PARTITION (PRT_TEST_02) GROUP BY grp test_to_split

    UNION ALL

    Select grp, COUNT (*) from PARTITION (PRT_TEST_03) GROUP BY grp test_to_split

    ;

    In this case, the value 2 will be maped on the partition of PRT_TEST_02 and the remaining values in the original PRT_TEST_02_03 - in this case, the 3 - partition will be mapped to PRT_TEST_03!

    I hope this helps you!

  • APPS_TS_TX_DATA Tablespace appearing does not in OAM

    Hi @Hussein snoussi

    I'm having a strange problem in my system DEV. When I go to OAM-> dashboard-> site map-> monitor-> database-> storage, the APPS_TS_TX_DATA tablespace does not appear on the list of tablespaces. I went to sqlplus and run the following query:

    SQL > select TABLESPACE_NAME

    2 of dba_tablespaces

    3 order of nom_tablespace;

    The APPS_TS_TX_DATA tablespace exists on a list of tablespaces that appear. So I do not know why the APPS_TS_TX_DATA tablespace does not appear on the OAM.

    Please help me.

    Kind regards

    Clamarion.

    Hi guys I have solved the problem! That's what I did:

    I just added a data file for the APPS_TS_TX_DATA tablespace and now the tablespace makes its appearance in OAM.

    It's really weird.

  • How to move partitions/sub-sub-partitions in a different tablespace?

    Hi Uisng oracle 1.20.3 and have a partitioned table using partitioning of the interval range-hash - code below.

    Works great just one problem.

    We want to move that geneerated system partitions to different storage spaces later and also rename epartitions th.

    Assign the partition to a different tablespace get the following message when you try

    ALTER table move partition tablespace bi_dw_data SYS_P2283 por_rt

    Get message ora-14257 - cannot move one partition other than the range, list, system or a hash partition.

    How we avoid this.

    Us that we must go first all subparts?

    Tried this

    modify subpartition of moving table SYS_SUBP2269 tablespace bi_dw_data;

    but get the statement not valid message message ora-01735
    -- Create table
    create table POR_RT
    (
      plant_issue_id    NUMBER not null,
      pf_run_num        NUMBER,
      partitioning_date DATE
    )
    partition by range (PARTITIONING_DATE)
    subpartition by hash (PLANT_ISSUE_ID)
    (
      partition PART_200912 values less than (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2261 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2262 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2263 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2264 tablespace BI_SUPPORT_DATA
      ),
      partition PART_201001 values less than (TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2265 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2266 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2267 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2268 tablespace BI_SUPPORT_DATA
      ),
      partition SYS_P2273 values less than (TO_DATE(' 2010-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2269 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2270 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2271 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2272 tablespace BI_SUPPORT_DATA
      ),
      partition SYS_P2283 values less than (TO_DATE(' 2010-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2279 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2280 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2281 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2282 tablespace BI_SUPPORT_DATA
      ),
      partition SYS_P2278 values less than (TO_DATE(' 2010-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2274 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2275 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2276 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2277 tablespace BI_SUPPORT_DATA
      )
    );
    Published by: user5716448 on March 22, 2013 04:49

    You cannot move the parition composite directly, you must move subpartition this usings

    ALTER table move subpartition tablespace ;

    changing the partition using tablespace

    ALTER TABLE.

    CHANGE the DEFAULT ATTRIBUTES FOR the PARTITION TABLESPACE ;

  • How to skip unwanted tablespaces restoration and recovery

    DB version: 11.2.0.1.0
    Version of the OS: AIX 6.1

    I have a full backup (level 0, level 1, archives, controlfile, spfile) for a database. Now, I have to restore and recover the database on another server. I know that some storage spaces that are not necessary. This means, the tablespace are just for the backup of tables etc. and storage spaces are not recovered & restored then also it very well. My main idea is to save time by not restore & recovery of unwanted files. Here is the output of outline report.
    RMAN> report schema;
    
    Report of database schema for database with db_unique_name CORE
    
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace           RB segs Datafile Name
    ---- -------- -------------------- ------- ------------------------
    1    2048     SYSTEM               YES     /u04/oradata/CORE/system01.dbf
    2    1024     SYSAUX               NO      /u04/oradata/CORE/sysaux01.dbf
    3    1024     UNDOTBS              YES     /u04/oradata/CORE/undots01.dbf
    4    1046     USERS                NO      /u04/oradata/CORE/users01.dbf
    5    1024     TEST_TAB             NO      /u04/oradata/CORE/test_tab01.dbf
    
    List of Temporary Files
    =======================
    File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
    ---- -------- -------------------- ----------- --------------------
    1    1024     TEMP                 1024        /u04/oradata/CORE/temp01.dbf
    I used "RMAN > sql ' alter database datafile offline to drop 4"; "take one data file for users of tablespaces in offline mode. Here are the complete logs.
    Recovery Manager: Release 11.2.0.1.0 - Production on Fri Feb 1 13:27:34 2013
    
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database (not started)
    connected to recovery catalog database
    
    RMAN> startup nomount
    
    Oracle instance started
    
    Total System Global Area    4275781632 bytes
    
    Fixed Size                     2213632 bytes
    Variable Size                822085888 bytes
    Database Buffers            3439329280 bytes
    Redo Buffers                  12152832 bytes
    
    RMAN> restore controlfile from autobackup;
    
    Starting restore at 01-FEB-13
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=65 device type=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: SID=127 device type=DISK
    
    channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130201
    channel ORA_DISK_1: AUTOBACKUP found: /oraclebackup/CORE/CTL_c-912678878-20130201-02
    channel ORA_DISK_2: looking for AUTOBACKUP on day: 20130201
    channel ORA_DISK_2: skipped, AUTOBACKUP already found
    channel ORA_DISK_1: restoring control file from AUTOBACKUP /oraclebackup/CORE/CTL_c-912678878-20130201-02
    channel ORA_DISK_1: control file restore from AUTOBACKUP complete
    output file name=/u01/oradata/CORE/control01.ctl
    output file name=/u02/oradata/CORE/control02.ctl
    output file name=/u03/oradata/CORE/control03.ctl
    Finished restore at 01-FEB-13
    
    RMAN> alter database mount;
    
    database mounted
    released channel: ORA_DISK_1
    released channel: ORA_DISK_2
    
    RMAN> sql 'alter database datafile 4 offline for drop';
    
    sql statement: alter database datafile 4 offline for drop
    
    RMAN> restore database;
    
    Starting restore at 01-FEB-13
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=96 device type=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: SID=127 device type=DISK
    
    channel ORA_DISK_1: starting datafile backup set restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    channel ORA_DISK_1: restoring datafile 00002 to /u04/oradata/CORE/sysaux01.dbf
    channel ORA_DISK_1: restoring datafile 00004 to /u04/oradata/CORE/users01.dbf
    channel ORA_DISK_1: restoring datafile 00005 to /u04/oradata/CORE/test_tab01.dbf
    channel ORA_DISK_1: reading from backup piece /oraclebackup/CORE/DF_L0_CORE_01022013_2no0slbn_87_1
    channel ORA_DISK_2: starting datafile backup set restore
    channel ORA_DISK_2: specifying datafile(s) to restore from backup set
    channel ORA_DISK_2: restoring datafile 00001 to /u04/oradata/CORE/system01.dbf
    channel ORA_DISK_2: restoring datafile 00003 to /u04/oradata/CORE/undots01.dbf
    channel ORA_DISK_2: reading from backup piece /oraclebackup/CORE/DF_L0_CORE_01022013_2oo0slbn_88_1
    channel ORA_DISK_2: piece handle=/oraclebackup/CORE/DF_L0_CORE_01022013_2oo0slbn_88_1 tag=LEVEL0
    channel ORA_DISK_2: restored backup piece 1
    channel ORA_DISK_2: restore complete, elapsed time: 00:04:06
    channel ORA_DISK_1: piece handle=/oraclebackup/CORE/DF_L0_CORE_01022013_2no0slbn_87_1 tag=LEVEL0
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 00:04:16
    Finished restore at 01-FEB-13
    
    RMAN> recover database;
    
    Starting recover at 01-FEB-13
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    
    starting media recovery
    
    archived log for thread 1 with sequence 1 is already on disk as file /u05/oradata/CORE/CORE_11806244987.ARC
    archived log for thread 1 with sequence 2 is already on disk as file /u05/oradata/CORE/CORE_21806244987.ARC
    archived log file name=/u05/oradata/CORE/CORE_11806244987.ARC thread=1 sequence=1
    archived log file name=/u05/oradata/CORE/CORE_21806244987.ARC thread=1 sequence=2
    unable to find archived log
    archived log thread=1 sequence=3
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 02/01/2013 13:37:07
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 3 and starting SCN of 365298
    
    RMAN> alter database open resetlogs;
    
    database opened
    new incarnation of database registered in recovery catalog
    starting full resync of recovery catalog
    full resync complete
    But in the newspapers, I don't see that datafile 4 is always restored which means that I spend more time on the restoration of files that I need. Is it possible to do that?

    Hello;

    You can make a leap like this:

    RMAN > RECOVER DATABASE SKIP users TABLESPACE; (for multiples use the comma between)

    Temp history, RESTORE DATABASE SKIP TABLESPACE;

    You will need to provide the Tablespace names in single quotes.

    Your RESTORE command must also include SKIP TABLESPACE tablespacename or SKIP FOREVER TABLESPACE tablespacename to exclude the specific tablespace.

    http://www.di.unipi.it/~GHELLI/didattica/bdldoc/B19306_01/backup.102/b14192/recov004.htm (6.4.3.2 Performing Media Recovery of restored database, Tablespace or Datafile)

    Best regards

    mseberg

Maybe you are looking for