Import tablespace and index seperately

dear gurus,
i created two tablespace testtbs, and testtbs_idx. so when i try to import the dump file. so complete file is going to tablespace.
can you suggest advised as starting or beginner level what best practice should i do. so that both goes seperately.
there is user test/test@orcl. the file is also test.dump
i am not using parameter file rather it is single file command line issue. i am using rhel 5.3 with 10.2.0.4 10gr2.
confirm another thing, at the time of creation user i give user test to tablespace test permission already. but tablespce index i have not given any permission.
look at below and confirm if i miss or wrong anything...advise accordingly
CREATE USER test IDENTIFIED BY test DEFAULT TABLESPACE PREMIA QUOTA UNLIMITED ON test TEMPORARY TABLESPACE TEMP;
GRANT CONNECT,RESOURCE,IMP_FULL_DATABASE,EXP_FULL_DATABASE TO test;
REVOKE UNLIMITED TABLESPACE FROM test;
ALTER USER test QUOTA UNLIMITED ON test_IDX;
imp test/test@orcl file='D:/bkup_dump/test.dmp' log='D:/bkup_dump/test.log' ignore=y FULL=Y;
regards
salim

hello,
CREATE USER test IDENTIFIED BY test DEFAULT TABLESPACE PREMIA
QUOTA UNLIMITED ON test TEMPORARY TABLESPACE TEMP;is it like that you are creating user test, default tablespace premia and quota on test???? you should allow quota to user on its default tablespace only so try
CREATE USER test IDENTIFIED BY test DEFAULT TABLESPACE test
QUOTA UNLIMITED ON test TEMPORARY TABLESPACE TEMP;before executing this
ALTER USER test QUOTA UNLIMITED ON test_IDX;
have you executed this???
ALTER USER TEST DEFAULT TABLESPACE TEST;
?????? you should do that.
and import complete dump in users default tablespace and then rebuild all indexes to index tablespace, that will be easiest way....experts please correct me...
alter index <index_name> rebuild online tablespace <new_tablespace>;
import command is looking fine
imp test/test@orcl file='D:/bkup_dump/test.dmp' log='D:/bkup_dump/test.log' ignore=y FULL=Y;you might like to include fromuser and touser clause if the user exported is different...and why using full?? are you importing full database???
HTH
thanks and regards
VD

Similar Messages

  • Importing data tables into data tablespace and indexes into tablespaces

    Hi
    I want to import data into new schema and i want to store tables into data tablespaces and index into index tablespace ...can anyone tell me how it will possible...

    I want to import data into new schema and i want to store tables into data tablespaces and index into index tablespace ...can anyone tell me how it will possible...
    imp userid=/user/passwd show=y indexfile=import.sql indexes=n full=y
    imp userid=/user/passwd show=y indexfile=import2.sql full=y
    Edit the import.sql and import2.sql to modify the tables' tablespace and indexes tablespace.
    execute import.sql the script in the database. this will create the tables in their respective tablespace.
    imp userid=/user/passwd full=y ignore=y indexes=n constraints=y - to import just the data since the tables have already been created.
    imp userid=/user/passwd full=y ignore=y rows=n  - to import just the indexes since the tables and data have already been imported.

  • 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

  • Relation between temp tablespace and index creation

    Hi,
    I have my Oracle database (11gR1) on windows 2008 server R1 64 bit..
    This is my development database. i have one table which has more than 2 billion rows , the problem i m facing here is while creating the index on this table i m getting temp segment error , while my temp tablespace size is 32 gb.
    Here my doubt is :
    1.What will happen in temp tablespace when index is created ? Relation between temp and index creation ?
    2. how to create the index on a huge table?
    3. What is the meaning og logging and no logging in INDEX creation .
    4. how can we over come for these kind of problem and manage the temp TS..
    Thanks & Regards,
    Vikash Chauradia

    add another tempfile?
    1.What will happen in temp tablespace when index is created ? Relation between temp and index creation ?
    index creation needs sort. how much depends on the size of the index.
    2. how to create the index on a huge table?
    create an interim (temporary? :)) huge temporary space for the very purpose.
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/indexes003.htm#i1006643
    3. What is the meaning og logging and no logging in INDEX creation .
    nologging means you the creation isnt in the logs so if you need to recover you cant get back to it. when using nologging in a prod env you might do it for performance during a period of heavy dml such as a large index creation and then backup afterwards. common enough.
    4. how can we over come for these kind of problem and manage the temp TS..
    current tempspace size =X
    is X big enough? if yes, cup of tea, if no, make X bigger.
    It doesnt matter what X is.

  • Import dumpfile with seperate tablespaces for table and index

    Hi,
    We have a schema for which the its tables are stored in seperate tablespace and indexes are stored in different tablespace. Now we have take full schema export. Now we want to import it on another schema. Now I want to know if the we have difference in the tablespace name we use REMAP_TABLESPACE clause of the impdp command but what about the seperate tablespace for table and indexes. How would Oracle handle this.
    Regards,
    Abbasi

    Hi,
    I hope you created the same tablespace structure on the target side if not so remap_tablespace option you have to use for specifying different tablespaces.Oracle will take care of putting data and index.Any how if a index is moved from one tablespace to other you have to rebuild them,once you rebuild them than only stattistics are gathered otherwise you
    might face some performance issue.
    Better option is to keep same tablespace structures in source and target environment.
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com
    Edited by: Rafi (Oracle DBA) on May 9, 2011 7:07 AM

  • Determining in which tablespace the indexes are imported to

    Hello all,
    Often, the tables are in one tablespace and the indexes of these tables are on another tablespace.
    If we have a DMP file done on a schema-level. Is there a way to import this DMP by specifying in the IMP that the tables of the exported schema are to be placed in one Tablespace and the indexes of these table are to be put on another tablespace?
    Thnx for the replies.
    Good day,
    Sam

    Basically, when you do import, oracle try to look for the same tablespace as source to import tables. If not found, then it quits with errors.
    If the ignore=y parameter is specified with import command and when there is no tablespace as source tbs in the target, oracle will try to import in the default tablespace of the user/schema.
    However, there is no command that gives the flexibility to import table in one tablespace and index in another tablespace.
    Why dont you create the same tablesspaces in Target database as in source database?
    You can always move index to another tablespae after import.
    Jaffar

  • Oracle export/import and indexing

    Hello All,
    I am a newbie in oracle filed and trying to understand export/import funtionality and indexing related to it. May be it's silly but I don't get any other way to understand it.
    Below are the topics I tried to understand-
    1) I export one Db and trying to import that in another database server. I used sysdba username to import. A new table space will get created or how the data will store in database what would be the effect in indexing with this export and import.
    2) If i import one more db on the same database server using sysdba username then also how indexing will behave?
    Please help me to understand
    Thanks
    Sayan
    Edited by: Sayan_Roy on Sep 26, 2011 11:41 PM

    Indexes are tied to tables. The default behaviour, in the absence of you specifying any directives, is that Oracle runs
    CREATE TABLE
    INSERT INTO table
    CREATE INDEX
    So, the Indexes are created after each of the corresponding tables.
    Do NOT ever attempt to export/import objects owned by SYSDBA. You should be creating a separate schema to hold all your objects (Tables, Indexes, Views, Procedures, Functions etc). That separate schema can be exported and imported into another database. If you have multiple such schemas, a Full Export Import will copy all the schemas.
    If a schema preexists in the target database, the import will error when attempting to CREATE TABLE --- unless you specify directives to handle this.
    Please read the documentation on Export and Import for the version that you are testing.
    Hemant K Chitale

  • Import data and ındexes diffrent tablespace

    Assume that
    I have tablespaces "user_data" and "index_data".
    If I export the entıre schema
    and
    import it into another database, all the data and index are stored in one tablespace.But they are in diffrent tablespaces in the source.
    What should I do to ımport ındexes to diffrent tablespace?
    Oracle 10g

    In Import, there's an parameter "indexfile".
    imp file=abc.dmp show=y indexfile=abc.sql fully=y
    will generate a sql file with metadata definition.i.e. Table creation scripts/index creation scripts.
    modify the script and change the tablespace names for the indexes and execute them.

  • Reorganization of tablespaces, tables and indexes.

    Hello Experts,
    What is the concept of tablespaces, statistics , tables and indexes in SAP/Oracle ? Where are they used and what are they meant for ?
    Wt is the concept and procedure of performing Reorganization of tablespaces, tables and indexes ? why do we need it for ?
    Requested to revertb at earliest as its urgent . points guaranteed .
    Regards,
    Somya

    Hello Somya,
    Probably difficult to explain entire information in this thread. But you definately get good information in the following link
    http://help.sap.com/saphelp_47x200/helpdata/en/0d/d2fafd4a0c11d182b80000e829fbfe/frameset.htm
    Please drill down through menus, and you will be able to get good information.
    Also you can check the following SAP notes
    666061     FAQ: Database objects, segments and extents
    912620     FAQ: Oracle indexes
    588668     FAQ: Database statistics
    592393     FAQ: Oracle
    541538     FAQ: Reorganizations
    Regards,
    Madhukar

  • Compression for oracle database and index compression during import of data

    Hi All,
    I have a query , in order to import into oracle database and also have compression and index compression , do we have some kind of load args for r3load and also do we have to change the tpl file ?

    Hello guy,
    I did this kind of compression within migration project before.
    I performed index compress first and then export -> import with table compress.
    One thing you should take care, delete nocompress flag from TARGET.SQL (created by program SMIGR_CREATE_DDL, program SMIGR_CREATE_DDL created pure non-compression objects for these considered non-standard tables). For table columns > 255, we should not delete this flag.
    Regarding to the index compress in source system, please check the following notes:
    Note 1464156 - Support for index compression in BRSPACE 7.20
    Note 1109743 - Use of Index Key Compression for Oracle Databases
    Note 682926 - Composite SAP note: Problems with "create/rebuild index"
    Best Regards,
    Ning Tong

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Generate the tablespace clause for tables and indexes

    How can I make Designer generate the tablespace clause for the create table and create index statements?
    I assigned tables and indexes to Tablespaces objects in designer but they don't seem to have any effect on the generator.
    I am using the latest version of Oracle Designer.
    Thanks
    Message was edited by:
    bikerc

    Guess I am not real clear what you want.
    In the DB admin tab you will need to create the tablespace with the data file.
    Then you need to assign the table space to the table.
    You will need to generate from the DB Admin tab.
    Hope this helps.
    Michael

  • Separate tablespaces for indexes and LOBs

    I have modeled my db tables with jDeveloper. Now I would like to store my tables in default tables, my indexes in a separate tablespace, and LOBs in a 3rd tablespace.
    How can I best add the tablespace definitions to the table creation sql? I can't find such functionality in jDeveloper.
    If jDev does not support this, does Oracle have some other tools which could do this?
    Or can I set some ALTER SESSION parameter before creating the tables which would make my indexes and LOBs go to the correct tablespaces by default?

    I see jDeveloper 11g has a possibility for specifying tablespaces for the tables and LOBs.
    I cant figure out how to set tablespaces for indexes though. I can tell there is definately no way to set tablespace settings for primary key / foreign key indexes.
    So jDev 11g does not seem to solve my problem either.

  • After move tables and index another tablespace, indexes got unusable?

    Hi,
    I moved table and indexes another tablespace. After move many indexes got unusable state. I couldn't understand thiis?
    How can I make them again usable?
    regards and thanks?

    hi,
    check this query below
    create table test (id number(10));
    create table succeeded.
    insert into test values (10);
    1 rows inserted
    commit;
    create index test_indx on test(id);
    select index_name, status from user_indexes
    where table_name = 'TEST';
    INDEX_NAME STATUS
    TEST_INDX VALID
    alter table test move tablespace users;
    select index_name, status from dba_indexes
    where table_name = 'TEST';
    INDEX_NAME STATUS
    TEST_INDX UNUSABLE
    rebuliding index
    alter index test_indx rebuild
    alter index test_indx succeeded.
    then check
    select index_name, status from user_indexes
    where table_name = 'TEST';
    INDEX_NAME STATUS
    TEST_INDX VALID

  • DB02 view is empty on Table and Index analyses  DB2 9.7 after system copy

    Dear All,
                 I did the Quality refresh by System copy export/import method. ECC6 on HP-UX DB29.7.
    After Import Runstats status n Db02 for Table and Index analysis was empty and all value showing '-1'. Eventhough
    a) all standard backgrnd job scheduled in sm36
    b) Automatic runstats are enabled in db2 parameters
    c) Reorgchk all scheduled periodically from db13 and already ran twice.
    4) 'reorgchk update statistics on table all' was also ran on db2 level.
    but Run stats staus in db02 was not getting updated. Its empty.
    Please suggest.
    Regards
    Vinay

    Hi Deepak,
    Yes, that is possible (but only offline backup). But for the new features like reclaimable tablespace (to lower the high watermark)
    it's better to export/import with systemcopy.
    Also with systemcopy you can use index compression.
    After backup and restore you can have also reclaimable tablespace, but you have to create new tablespaces
    and then work with db6conv and online table move to move one tablespace online to the new one.
    Best regards,
    Joachim

Maybe you are looking for