How to reorganization index in new tablespace

How to reorganization index in new tablespace? for size? for? number of extents? or both?

What's Oracle version?
Why you want to reorg your index?
You could rebuild your index
alter index <index_name> rebuild tablespace <tablespace_name>check Jonathan's note regarding index rebuild,
http://jonathanlewis.wordpress.com/2008/02/09/index-rebuild-10g/

Similar Messages

  • How to relocate table in new tablespace in Oracle 8i

    Hi all
    I would like to know how to relocate table from one tablespace to another tablespace in Oracle 8i. Currently, I create new table without data in new tablespace and then load data from old table in old tablespace. However, I think it is not efficient at all. Could anyone kindly advise any method to proceed it
    Thanks

    Nick has pointed out the best way to relocate a table. With the alter table move command you do not have to worry about FK or any other kind of constraints, table triggers, or grants. They all remain in place. You just need to rebuild the indexes as Nick pointed out.
    There were some restrictions on the types of tables that could be moved with alter table move when the command first was introduced. I think LOB columns were unsupported at first. The old exp/imp had to be used for those cases.
    HTH -- Mark D Powell --

  • How to move indexes to another tablespace through script

    Hi Dear,
    How i can move indexes to another tablespace through a script which just gets new tablespace name, owner name and move and rebuild indexes in one go.
    Thank u for your prompt Help.
    Regards

    Hi,
    alter session set sort_area_size = 15000000;
    spool index.sql
    select 'alter index '||owner||'.'||index_name||' rebuild tablespace TARGET_TBS;'
    from dba_indexes
    where tablespace_name = 'INIT_TBS'
    @index.sql
    This script move and rebuild index from one tablespace INIT_TBS to an other tablespace TARGET_TBS
    Hope this help you
    Nicolas.

  • Oracle 11g R1: How to create indexes automatically in tablespaces?

    Hello,
    Obviously, due to maintenance and performance reasons it is better to put indexes in own tablespaces, separated from the data.
    I would like to know now whether there is a way under Oracle 11g R1 to create every index automatically in a tablespace?..or the indexes can only be created manually?
    Unfortunately i wasn't able to find any hint in the documentation or by googlin' it.
    Thanks in advance.
    Regards,
    Lars

    Hi Lars
    I wouldn't be quite so sure having a separate tablespace just for indexes is better for either performance or maintenance reasons if I were you ...
    For your enjoyment, some reasons why this simply is not true:
    http://richardfoote.wordpress.com/2008/04/16/separate-indexes-from-tables-some-thoughts-part-i-everything-in-its-right-place/
    http://richardfoote.wordpress.com/2008/04/18/separate-indexes-from-tables-some-thoughts-part-ii-there-there/
    http://richardfoote.wordpress.com/2008/04/28/indexes-in-their-own-tablespace-availabilty-advantages-is-there-anybody-out-there/
    http://richardfoote.wordpress.com/2008/05/02/indexes-in-their-own-tablespace-recoverability-advantages-get-back/
    Cheers
    Richard Foote
    http://richardfoote.wordpress.com/

  • How do I index a new search database?

    I want to create a robot and run it against a URL and build an index( RDs), on my own defined search database. But only the default database get's indexed.
    How do I point my Robot to my new defined search database?
    Also I would like to be able to index a file system (a directory that contains only XML files). I have already created my filter specifying to allow any file with the extension .xml. but it doesn't seem to work? What do I need to do?
    Thanks.

    I think I understand what you are trying to do. I assume that you have created a new database from the admin console, and now you want to use the robot to index that database?
    If that's the case you should be able to specify the database to populate, when defining a site for the robot to crawl. The option to set the database to populate is right at the bottom of the screen of the site editor, after the filter definitions and the advanced option.
    Hope this helps.

  • How import data on one tablespace and indexes on another tablespace

    i have import dump from from database in oracle 10g as
    c:> imp userid=system/password full=y file=d:\ful.dmp log=d:\full.log
    Now i want import tables data on tablespace datatb and indexes on tablespace indextb. how i can do this job
    Thanks

    After importing the database you may move the indexes to other tablespace by rebuilding it.
    c:>sqlplus /nolog
    SQL> conn /as sysdba
    connected
    SQL> spool c:\indx_rbld.log
    SQL> select 'alter index '||owner||'.'||index_name||' rebuild online parallel tablespace <tablespace_name> nologging;' from dba_indexes where owner=<username>;
    SQL> spool off
    SQL> @c:\indx_rbld.log
    Hope following link will help you:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:901906930328
    Message was edited by:
    Santosh Kumar

  • Move large tables and indexes into own tablespace

    I currently manage a 100Gb 10.2.0.4 SE database on Windows.
    There is one data tablespace and one indexes.
    I have one table xxxHistory that is periodically cleared out, however, six months of data must be retained.
    The table is currently 17Gb and has 95 million rows, the corresponding nine or so indexes take another 47Gb.
    I am having a small problem with I/O waits on this table so, I want to move this table and the indexes to their own tablespaces, which I will create (xxxHistory_D and xxxHistory_I).
    I know the two methods, exp/imp (difficult due to foreign keys) and the prefered method of :
    alter table tbl move tablespace tblsp and
    alter index ind rebuild tablespace tblsp.
    I have no problems with the syntax etc, having used this method many times.
    My question is, does anyone have a better idea of how to approach this to minimise downtime?
    The system cannot be used if this table is not available.
    I am also going to migrate to 11.2x when available but can't find anything in the new features to help.
    Note, this is SE, so partitioning is not an option and once I have sorted this table out, I will unchain the rows of any other and reorganise the space.
    Disk space is not an issue.
    Thanks,

    BigPhil wrote:
    Note, this is SE, so partitioning is not an option and once I have sorted this table out, I will unchain the rows of any other and reorganise the space.
    Disk space is not an issue.
    Strategically this sounds as if you really do need partitioning; since you're on SE, you could consider the v7 "partition view" concept.
    Create one table per month, and index each table separately.
    Add a constraint to each table of the form: "movement date between to_date('...') and to_date('...')"
    Create a union all view of the tables.
    Getting rid of a single month means redefining the view.
    In theory any queries you do should be able to filter predicate pushdown and thus eliminate redundant partitions, and also handle pushing joins down into the union all view. But that's something you would have to test carefully.
    You could even create the tables as index organized tables - which may be the solution to your I/O wait problems - if your queries are about stock movement then all the movements for a given stock will be thinly scattered across the table, leading to one block I/O per row required. IOTs would give you an overhead on inserts, but eliminate waits on queries.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • BRSPACE create new tablespace for compressed table

    Dear expert,
    I'm plannng to create new tablespace  PSAPCOMP for compressed table by brspace.
    the current total size of the tables that i want to compression is 1T.
    Now i have  2 question about the brspace script
    1.How big size should the PSAPCOMP be , let's say 500G?
    2. i'm confused about the datafile_dir value i should put (please refer to the attachment for current datafile_dir design)
    Could you help to correct/improve the scritpts as following?
    scriptA : brspace -f tscreate -t PSAPCOMP -s 5120 -a yes -i 100 -m 15360 -f sapdata4 -l 2 --> assign to sapdata4
    repeat scriptB for 20 times
    scriptB : brspace -f tsextend -t PSAPCOMP -s 5120 -a yes -i 100 -m 15360 -f sapdata4 -l 2 -f1 4 -f2 4 -f3 4 -f4 4 -f5 4 --> extend 25G in one run
    Qestion: is it OK to assign the PSAPCOMP only to "sapdata4"? or i should specify "-f sapdata1 sapdata2 sapdata3 sapdata4" so the table data can distribute among different sapdata_dir?
    Thank you!

    hi Kate,
    some of the questions depend on the "customer" decision.
    is it OK to assign the PSAPCOMP only to "sapdata4"?
    how much space is available? what kind of storage do they have? is totally stripped or not? is there "free" space on the other filesystems?
    1.How big size should the PSAPCOMP be , let's say 500G?
    as I explained to you already, it is expected that applying all compressions you can save 1/2 of the space but you have to test this as it depends on the content of the tables and selectivity of the indexes. Use the oracle package to simulate the savings for the tables you are going to compress.
    do you want the scripts interactive (option -c) or not?
    The SAP Database Guide: Oracle has all possible options so you only have to check them
    brspace -f tscreate -t PSAPCOMP -s 5120 -a yes -i 100 -m 15360 -f sapdata4 -l 2 --> assign to sapdata4
    if you want to create a 500 GB, why you limit the maximum size to 15360?

  • How to move segments from one tablespace to another tablespace?

    I have created new tablespace now i want to move the old tablespace segments to new one but how?
    Please guide
    Thanks,
    Waheed.

    If it is Oracle 10g you might consider expdp and impdp and use remap_tablespace. After that you can purge the objects from the old tablespace.
    Throught PL/SQL scripting also it is possible.
    tables
    declare
    cursor cursor1 is select table_name from dba_tables where tablespace_name in ('USERDATA1');
    begin
    for cur1_rec in cursor1 loop
         execute immediate 'alter table '||cur1_rec.table_name||' move tablespace userdata2';
    end loop;
    end;
    indexes
    declare
    cursor cursor1 is select index_name from dba_indexes where tablespace_name in ('USERDATA1');
    begin
    for cur1_rec in cursor1 loop
    begin
         execute immediate 'alter index '||cur1_rec.index_name||' rebuild tablespace userdata2';
    exception
    when others then
    null;
    end;
    end loop;
    end;
    /

  • How do I create a new frame using Flash CS5 on a Mac so I can add more pictures to my website?

    I have what I hope is a fairly straight forward question that I hope you can answer if you write code with a Mac or are at least familiar with the process on a Mac?  The person I have been working with to create my photography website uses a PC.  Here is the problem.  I am trying to use my Mac in order to create frames so that I can add 5 more images to a portfolio that presently has 15 images.  The code is in an index.fla file.  If I want to create a new frame in the index.fla, let's say LOAD CODE 381 and want to use the same text that is already present in LOAD CODE 380 but with a few edits, I have no trouble going to the Action-Movie Clip and finding LOAD CODE 380 in the left hand column.  The problem is, on a Mac, how do I create frame LOAD CODE 381 and then how do I copy and paste the text from LOAD CODE 380 into LOAD CODE 381?  It looks like on a PC one can open LOAD CODE 380 in the Action-Movie Clip, highlight the text then right click on the red rectangular box in the timeline.  By doing so (on a PC) one sees a drop down menu that gives the option to "copy key frame".  What is the equivalent of the "copy key frame" on a Mac?  I can see where on the Mac you can go to Edit >copy.  Is this the equivalent of "copy key frame" on a PC?  If so, once I "copy" the text how do I create the new LOAD CODE 381 so that I can paste the text into the new frame?
    I WOULD BE EXTREMELY GRATEFUL TO ANYONE WITH THE ANSWER TO THIS QUESTION!  THANK YOU!!!!!

    Sorry not to be more clear.  It is a name assigned to one of the 
    frames by the person who originally designed the website and is shown 
    in the list of about 150 action frames that were created in this 
    particular fla document.  This "list" comes up in the left hand column 
    of the Action-Frame box. When I click on Load Code 380 which is half 
    way down the column of frames, the following text comes up on the 
    large screen to the right of the column of 130 frames.
    IMAGE.gotoAndPlay("start");
    loadVariables("data/series01/15title.txt", "_root.IMAGE.TITLE");
    loadVariables("data/series01/15price.txt", "_root.IMAGE.PRICE");
    loadMovie("data/series01/about.swf", "_root.IMAGE.ABOUT");
    IMAGE.mc_pic.attachMovie("pic","pic",1,)
    IMAGE.mc_picTHUMB.attachMovie("pic","pic",1,)
    This text is what I am trying to transfer to copy then paste into a 
    new frame after which time I want to slightly edit the text.  I am not 
    a programer so I apologize if I am not using all of the correct 
    terminology.
    Thank you again,  Jon

  • How to move table from one tablespace to other tablespace?

    how to move table from one tablespace to other tablespace?

    887274 wrote:
    how to move table from one tablespace to other tablespace?
    alter table <table_name> move  tablespace <new_tablespace_name>;
    Rebuild the indexes; alter index <index_name> rebuild <new_tablespace_name> online;Example;:
    SQL> create table ttt( ID NUMBER PRimary key);
    Table created.
    SQL> insert into ttt values (1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 VALID
    SQL> alter table ttt move tablespace users;
    Table altered.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 UNUSABLE
    SQL> alter index SYS_C0010863 rebuild tablespace users online;
    Index altered.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 VALID
    SQL>

  • How can i create a new item in the app "health"?

    how can i create a new item in the app "health"? I need a field for documentation of "Waist-to-height ratio", exactly for "circumference".
    It's a matter of common knowledge, that the Waist-to-height ratio (WHtR) has more significance then the Body-Mass-Index (BMI).

    If you mean you want to change a color of a calendar category or create a new one, you cannot do that, what is pre-loaded is what you get and cannot be edited.

  • How can I add a new column in compress partition table.

    I have a compress partition table when I add a new column in that table it give me an error "ORA-22856: CANNOT ADD COLUMNS TO OBJECT TABLES". I had cretaed a table in this clause. How can I add a new column in compress partition table.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    COMPRESS PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    Note :
    When I create table with this clause it will allow me to add a column.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    But for this I have to drop and recreate the table and I dont want this becaue my table is in online state i cannot take a risk. Please give me best solution.

    Hi Fahed,
    I guess, you are using Oracle 9i Database Release 9.2.0.2 and the Table which you need to alter is in OLTP environment where data is usually inserted using regular inserts. As a result, these tables generally do not get much benefit from using table compression. Table compression works best on read-only tables that are loaded once but read many times. Tables used in data warehousing applications, for example, are great candidates for table compression.
    Reference : http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_data.html
    Topic : When to Use Table Compression
    Bug
    Reference : http://dba.ipbhost.com/lofiversion/index.php/t147.html
    BUG:<2421054>
    Affects: RDBMS (9-A0)
    NB: FIXED
    Abstract: ENH: Allow ALTER TABLE to ADD/DROP columns for tables using COMPRESS feature
    Details:
    This is an enhancement to allow "ALTER TABLE" to ADD/DROP
    columns for tables using the COMPRESS feature.
    In 9i errors are reported for ADD/DROP but the text may
    be misleading:
    eg:
    ADD column fails with "ORA-22856: cannot add columns to object tables"
    DROP column fails with "ORA-12996: cannot drop system-generated virtual column"
    Note that a table which was previously marked as compress which has
    now been altered to NOCOMPRESS also signals such errors as the
    underlying table could still contain COMPRESS format datablocks.
    As of 10i ADD/SET UNUSED is allowed provided the ADD has no default value.
    Best Regards,
    Muhammad Waseem Haroon
    [email protected]

  • How do I create a new emkey for Enterprise Manager Database Control?

    Hi,
    I just installed 11gR2.
    I am evaluating it.
    How do I create a new emkey for Enterprise Manager Database Control?
    I tried various combinations of this command:
    emctl config emkey
    I did find a probable bug:
    $ emctl config emkey -emkey -emkeyfile emkey.ora -force -sysman_pwd he11ow0rld
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
    Undefined subroutine &EmKeyCmds::promptUserPasswd called at /u2/app/oracle/product/11.2.0/dbhome_1/bin/EmKeyCmds.pm line 160, <FILE> line 3.
    $
    Again,
    How do I create a new emkey for Enterprise Manager Database Control?
    I do have a copy of my old key but it is no longer good because I reinstalled the repository with these commands:
    emca -repos drop ...
    emca -repos create ...
    Oh, and where is emctl "documented".
    I poked around in some book-index links and with the search engine.
    I could not find anything.
    Thanks,
    -Janis

    user11892726 wrote:
    Oh, and where is emctl "documented".
    http://download.oracle.com/docs/cd/B16240_01/welcome.html

  • How do l create a new database in Oracle 10g Express

    How do l create a new database in Oracle 10g Express, other than the one that is created on installation?

    Hello,
    You cannot create a second XE database on the same server.
    But, Oracle database can support as many Schema as you want.
    "Oracle database" is like "SQL Server Instance" and "Oracle Schema" is like "SQL Server database". I means by this shortcut that for
    the end users accessing to different Schemas looks like accessing to different databases.
    You can have several applications on the same database. Each application has its own Schema and Datafile (Tablespace) structure.
    So on your XE database you can add a new Tablespace and create a new User/Schema as follows:
    sqlplus /nolog
    connect / as sysdba
    create tablespace {color:red}new_tablespace_name{color}
    extent management local autoallocate
    SEGMENT SPACE MANAGEMENT AUTO
    datafile '{color:red}complete_datafile_name{color}' size 100M autoextend on next 10M maxsize unlimited;
    create user {color:red}new_schema_name{color} identified by {color:red}password{color}
    default tablespace {color:red}new_tablespace_name{color}
    temporary tablespace TEMP
    quota unlimited on {color:red}new_tablespace_name{color}
    grant connect, resource to {color:red}new_schema_name{color};Then you can connect to this new User/Schema as you defined it and create your new structure and load datas.
    Hope it can help.
    Best regards,
    Jean-Valentin

Maybe you are looking for

  • Reinstall After Hard Drive Errors

    The system restore from the hard drive is a great idea except when your hard drive is dropping bad sectors left and right.  One of my clients bought a 3000 Desktop with Windows Vista Business 13 months ago.  I got the call that the system wouldn't bo

  • Right Click Document Conversion Not Working - Acro X Pro

    I recently installed Acrobat X Pro on my PC. Brief PC specs: Vista 32 Bit, 4 GB RAM, Intel Dual core Pentium; Office 2010 installed and Creative Suite 5.0; Acrobat X version is 10.0.3. I uninstalled my Acrobat 9 Pro before installation and had no pro

  • Primavera & BPM 11g

    Hi Experts, Can any one help me on this.. I have the working environment of BPM 11g now i want to 1) Install Primavera6 8.2 2) Integrate both P6 and BPM 11g These are the things i want to achieve so please any one help me out with the steps.I have fo

  • Missing Portlet Main Banner

    The current Content Area Portlet included with Portal 3.0.8 works fine except that it does not include the "Main Banner" nor the "Sub Banner". This means that portlet users do not have access to either the "Edit/View folder" function nor the current

  • Mapping IDOC ORDERS05

    Hello. I'm new on idoc mapping so I think that  this is not very difficult for you guys. I'm trying to map ORDERS05's E1EDKA1 and E1EDP01 to an output xml. The problem is that this structures can have more than 1 occurrences and the mapping seems to