Creating indexes and a default tablespace

Hi Experts,

Need your help to understand a basic tablespace clause when creating any object.
I have a table owned by the user and reside on tuberculosis tablspace, table A has two indices i1 and i2, index i1 A user-owned and created by error index i2 belonging to user B.
index i1 resides on the tb_index tablespace, i2 index created by mistake lies also on same tablespace tb_index.
I have a question above given the scenario

I2 index that was created by mistake lies in tablespace tb_index, despite mentioning any tablespace clause. How it can be created on the tb_index tablespace when the developer did not mention the tablespace.
tablespace tb_index is neither database tablspace default is default not storage for user B.

No idea about this help me a lot.

Thank you

Maybe something like that happening?

SQL> conn / as sysdba
Connected.
SQL> conn test/test
Connected.
SQL> select * from user_indexes;

no rows selected

SQL> select table_name, tablespace_name from user_tables;

TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
TAB1                           USERS

SQL> conn / as sysdba
Connected.
SQL> grant create any index to system;

Grant succeeded.

SQL> conn system/oracle
ERROR:
ORA-28002: the password will expire within 7 days

Connected.
SQL> conn test/test
Connected.

SQL> revoke index on tab1 from system;

Revoke succeeded.

SQL> conn system/oracle
ERROR:
ORA-28002: the password will expire within 7 days

Connected.
SQL> create index tidx on test.tab1(a);

Index created.

SQL> set pagesize 9999
SQL> select index_name, table_name, tablespace_name, owner from all_indexes where table_name='TAB1'
  2  ;

INDEX_NAME                     TABLE_NAME
------------------------------ ------------------------------
TABLESPACE_NAME                OWNER
------------------------------ ------------------------------
TIDX                           TAB1
SYSTEM                         SYSTEM

HTH
Aman...

Tags: Database

Similar Questions

  • How interrogate a user affected temp and tableapce default tablespace in oracle 11g?

    I have this SUNNY user on my DB. Now, I want to know how to query an affected user temp and tableapce default tablespace in oracle 11g?

    I tried Google, but no luck. can anyone help?

    Select the name of user, USER_USERS, temporary_tablespace from dba_users where username = "SUNNY";

    or

    Select the name of user, USER_USERS, temporary_tablespace from user_users where username = "SUNNY";

  • Creating indexes to a new tablespace

    Hi all

    PeopleSoft, oracle 10 g 2, sun solaris 10

    Clues in the application are created in a tablespace 'xxxxx '.
    Migration of the index to a larger block size tablespace 'yyyyy' done.
    Now if I create a new index of the PeopleSoft application that is getting created in "xxxxx" (being the default tablespace).

    I am very new in JDE. So how can we create an index of PeopleSoft and store at 'yyyyy '. ?

    Appreciate if measures are given.

    If you want a as a new default tablespace for all new indexes, go to Peopletools-> Utilities-> Administration-> model DDL by default
    Choose your platform, for example, Oracle.
    Go to the index of the type of return
    Change the line INDEXSPC to PSINDEX in aaaa

    Nicolas.

  • created by using the default tablespace "SYSAUX' table

    Hi all

    I am a newbie of semantic technology from oracle. I have a question that I do not understand why the "articles_rdf_data" table is not under the created tablespace "rdf_tblspace", but in the default tablespace "SYSAUX? I created a table space named articles_rdf_data and a network of semantic data using this tablespace. After I created the table "articles_rdf_data" and a semantic model 'items' which uses the created tablespace, and then I logged in the OEM to check it out, I found that this table uses the default tablespace "SYSAUX" rather than created tablespace which I thought that it should use. Thanks in advance.

    Kind regards
    Hong

    Salvation Hong,

    When you created your table in the application "articles_rdf_data" have you set the tablespace?
    for example
    SQL > create table xyz (i int) tablespace rdf_tblspace;

    If you don't explicitly set, you must change the default behavior of the user of the session
    tablespace. Assume that your user session is scott

    SQL > ALTER USER scott TABLESPACE DEFAULT rdf_tblspace;

    Thank you

    Zhe

  • problem of creating user with SYSTEM default tablespace

    Hi guru

    When I am creating the user with table space default 'SYSTEM' I get the following error message
     SQL> create user chetan
      2  indentified by c 
      3  default tablsespace SYSTEM
      4  temporary tablespace TEMP
      5  quota 20 m on SYSTEM
      6  password expire;
    indentified by c
    *
    ERROR at line 2:
    ORA-00922: missing or invalid option
    and when I change EXAMPLE its created as follows table space
     SQL> create user chetan
      2  identified by c
      3  default tablespace EXAMPLE
      4  temporary tablespace TEMP
      5  quota 15m on EXAMPLE
      6  password expire;
    
    User created.
    so my question is. Is it not possible to create a new user with systemtablesapce?


    Thanks in advance
    Chetan

    you have a typo on line 2:

     SQL> create user chetan
    2  indentified by c 
    

    identified ?

    so my question is. Is it not possible to create a new user with systemtablesapce?

    Yes, you can

    SQL> create user vivek identified by l default tablespace system
      2  ;
    
    User created.
    
  • create indexes and internal error

    Hi, I run

    CREATE INDEX idx_nu_account_id_ ON archost
    (
    acc_id ASC
    )
    tablespace ts_idx
    /
    so happen "ORA-00600: internal error code, arguments: [ksuloget2], [0xFDD1F948], 'this message; '

    Also I during the exec select * archost then if record is going to get all the return even error why?

    What version of Oracle?
    What platform (OS)?

    I found two problem reports to Oracle on this error. The two refer to an LMS > 1 and are Windows specific. If you are under Windows see Oracle support documents: 564784.1 and 5935415.

    You can open a SR if the adjustment to see if there was a patch created. Otherwise, you can try using a smaller CMS framework.

    HTH - Mark D Powell.

  • export from 8i to 11g does not create an object in the default tablespace

    Hello

    I exported and schema from oracle 8i and I try to import it in oracle 11 g in a different architecture (8i is sparc. 11 g is x 86)

    I created a user with default tablespace and tablespace of origin does not exist in this database, but I get the error message;

    IMP-00003: ORACLE error 959

    ORA-00959: tablespace "TS_ARCCLAIMS_DAT" does not exist

    If I create an indexfile and create all the objects by removing the REM of the indexfile I countless errors grouped so I bet that this is not an option.

    This is how the user is created in 11g:

    CREATE THE USER ARCCLAIMS

    IDENTIFIED BY < password >

    DEFAULT TABLESPACE ARCCLAIMS_DAT

    GN_TMP TEMPORARY TABLESPACE

    DEFAULT PROFILE

    RELEASE OF ACCOUNT;

    -2 roles for ARCCLAIMS

    GRANT CONNECT TO ARCCLAIMS;

    RESOURCE GRANT AT ARCCLAIMS;

    ALTER USER ARCCLAIMS ROLE DEFAULT ALL;

    -1 system privilege for ARCCLAIMS

    GRANT UNLIMITED TABLESPACE TO ARCCLAIMS;

    -1 contingent of Tablespace to ARCCLAIMS

    ALTER USER ARCCLAIMS QUOTA UNLIMITED ON ARCCLAIMS_DAT;

    What should I do to have the items to go to the user's default storage space?

    Thank you

    Mario G.

    You can try this:

    Export file DDL extract.

    imp file % = test.dmp = full test/test display y = log y =

    Use the log file to create the table first, and then ignore object creation errors.

    imp file % = test.dmp = full test/test is ignore = y

    EXPLANATION

    ===========

    Doc 1058330.6 - pl DO NOT send a content - it is a violation of your Support contract >

  • Creating INDEX on a BLOB column in a separate tablespace

    Hello


    Our database contains 2 storage spaces :

    -Tablespace DATA : is reserved to hold the data.

    -Tablespace INDX: is reserved to hold the index.


    For some reason, that we must create the indexes on columns of type blob and the pending order are:

    SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_content) INDEXTYPE IS CTXSYS. CONTEXT;  / / doc_content a blob type.

    SQL> index created

    Now, all indexes are created in the tablespace for DATA that is not good, they should be created in the tablespace INDX (now is empty)

    For this reason, and after a search, I specified the tablespace INDX , which will contain the index, and the used command is:

    SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_content) INDEXTYPE IS CTXSYS. CONTEXT TABLESPACE INDX;

    *

    ERROR on line 1:

    ORA-29850: invalid option for creating domain index

    NB: also, when I try to use the same command with varchar column, it works.

    SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_name) TABLESPACE INDX;  / / doc_content a type VARCHAR2.

    SQL> index created


    Do you have an idea on how to create indexes on a blob column in a different tablespace?

    This question has nothing to do with the Oracle objects, but is related to Oracle Text, then perhaps that some moderator moves text objects.

    To specify a storage space for a ctxsys.context Oracle Text index domain index tables, you must create a storage preference, specify storage spaces in attributes of this preference, then use this preference in settings of creating index.  Please see the example below which shows first create domain index tables in the default users tablespace, then the creation of the field tables to be indexed in the example tablespace.

    Scott@orcl_11gR2 >-test environment:

    Scott@orcl_11gR2 > doc_contents CREATE TABLE

    2 (doc_content BLOB)

    3.

    Table created.

    Scott@orcl_11gR2 > INSERT INTO doc_contents VALUES

    2 (UTL_RAW. CAST_TO_RAW ("test data"))

    3.

    1 line of creation.

    Scott@orcl_11gR2 >-create domain index tables in default users tablespace:

    Scott@orcl_11gR2 > my_index CREATE INDEX

    2 doc_contents (doc_content)

    3 INDEXTYPE IS CTXSYS. FRAMEWORK

    4.

    The index is created.

    Scott@orcl_11gR2 > SELECT index_name, nom_tablespace

    2 FROM user_indexes

    3. WHERE index-name LIKE '% MY_INDEX % '.

    4.

    INDEX_NAME TABLESPACE_NAME

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

    MY_INDEX

    DR.$ MY_INDEX$ X USERS

    2 selected lines.

    Scott@orcl_11gR2 > SELECT table_name, nom_tablespace

    2 FROM user_tables

    3 WHERE table_name LIKE '% MY_INDEX % '.

    4.

    TABLE_NAME, TABLESPACE_NAME

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

    DR. MY_INDEX$ I HAVE USERS

    USERS R DR$ MY_INDEX$

    DR.$ MY_INDEX$ N

    DR.$ MY_INDEX$ K

    4 selected lines.

    Scott@orcl_11gR2 >-creating the tables index field in example of tablespace:

    Scott@orcl_11gR2 > my_index DROP INDEX

    2.

    The index is deleted.

    Scott@orcl_11gR2 > start

    2 ctx_ddl.create_preference ("mystore', 'BASIC_STORAGE'");

    3 ctx_ddl.set_attribute ("mystore', 'I_TABLE_CLAUSE',")

    4 "tablespace storage example (original 1 K) ');

    5 ctx_ddl.set_attribute ("mystore', 'K_TABLE_CLAUSE',")

    6 "tablespace storage example (original 1 K) ');

    7 ctx_ddl.set_attribute ("mystore', 'R_TABLE_CLAUSE',")

    8 ' lob tablespace storage example (original 1 K)

    9 (data) store as (storage off in row cache)');

    10 ctx_ddl.set_attribute ("mystore', 'N_TABLE_CLAUSE',")

    11 "tablespace storage example (original 1 K) ');

    12 ctx_ddl.set_attribute ("mystore', 'I_INDEX_CLAUSE',")

    13 ' example of tablespace storage (initial 1 K) compress 2 ');

    14 ctx_ddl.set_attribute ("mystore', 'P_TABLE_CLAUSE',")

    15 "tablespace storage example (original 1 K) ');

    16 ctx_ddl.set_attribute ("mystore', 'S_TABLE_CLAUSE',")

    17 "tablespace storage example (original 1 K) ');

    18 end;

    19.

    PL/SQL procedure successfully completed.

    Scott@orcl_11gR2 > my_index CREATE INDEX

    2 doc_contents (doc_content)

    3 INDEXTYPE IS CTXSYS. FRAMEWORK

    4 PARAMETERS ('STORAGE mystore')

    5.

    The index is created.

    Scott@orcl_11gR2 > SELECT index_name, nom_tablespace

    2 FROM user_indexes

    3. WHERE index-name LIKE '% MY_INDEX % '.

    4.

    INDEX_NAME TABLESPACE_NAME

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

    MY_INDEX

    DR.$ MY_INDEX$ X FOR EXAMPLE

    2 selected lines.

    Scott@orcl_11gR2 > SELECT table_name, nom_tablespace

    2 FROM user_tables

    3 WHERE table_name LIKE '% MY_INDEX % '.

    4.

    TABLE_NAME, TABLESPACE_NAME

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

    DR. MY_INDEX$ I EXAMPLE

    DR.$ MY_INDEX$ R EXAMPLE

    DR.$ MY_INDEX$ N

    DR.$ MY_INDEX$ K

    4 selected lines.

    Post edited by: BarbaraBoehmer (corrected for error due to the already existing preference)

  • Create index partition in the partition table tablespace

    Hello

    I am running a work custom that

    * Creates a tablespace by day
    * Creates the daily table partition in the created tablespace
    * Removes the days tablepartition X
    * Removes the storage space for this partition of X + 1 day.

    The work above works perfectly, but it has problems with the management of the index for these partitioned tables. In the old database (10g - single node), all indexes and partitions exist in a BIG tablespace and when I imported the table creation script in the new database, I changed all the partitions table & index to go in their respective space.

    For example:

    Table_name... Nom_partition... Index_Part_name... Tablespace_name
    ============...================............====================...........=================
    TABL1... TABL1_2012_07_16... TABL1_IDX_2012_07_16... TBS_2012_07_16
    TABL1... TABL1_2012_07_15... TABL1_IDX_2012_07_15... TBS_2012_07_15


    But now, when the job is run, it creates the index in the tablespace TBS_DATA default.

    Table_name... Nom_partition... Index_Part_name... Tablespace_name
    ============...================.............====================...........=================
    TABL1... TABL1_2012_08_16... TABL1_IDX_2012_08_16... TBS_DATA
    TABL1... TABL1_2012_08_15... TABL1_IDX_2012_08_15... TBS_DATA


    I can issue alter index rebuild to move the index to its tablespace default, but how can I make sure that the index is created in the designated tablespace?

    NOTE: the partition/tablespace management work that I run only creates the partition of the table and not the index.


    The new env is a cluster of CARS of 2 nodes 11 GR 2 on Linux x86_64.


    Thanks in advance,
    aBBy.

    try something like this

    ALTER table tab_owner.tab_name add the partition v_new_part_nm
    values less (to_date('''|| v_new_part_dt_formatted ||'') ((', "DD-MON-YYYY)) tablespace ' | part_tbs
    update the index (ind1_name (partition ind_partition_name tablespace ind_part_tbs)
    ind2_name (partition tablespace ind_part_tbs ind_partition_name))
    ;

  • What happens to the existing after the partition of table index and created with local index

    Hi guys,.

    / / DESC part id name number, varchar2 (100), number of wage

    In an existing table PART I add 1 column DATASEQ MORE. I wonder the part of table based on dataseq.now, the table is created with this logic of partition

    create the part table partition (identification number, name varchar2 (100), number of salary, number DATASEQ) in list (dataseq) (values partition PART_INITIAL (1));

    Suggestionn necessary. given that the table is partitioned based on DATASEQ I wonder to add local indexes on dataseq. to dataseq, I have added a local index create index idx on share (dataseq) LOCAL; Now my question is, already, there are the existing index is the column ID and salary.

    (1) IDX for dataseq is created locally so that it will be partition on each partition on the main table. Please tell me what is happening to the index on the column ID and salary... it will create again in local?

    Please suggest

    S

    Hello

    first of all, in reality 'a partition table' means create a new table a migration of existing data it (although, theoretically, you can use dbms_redefinition to partition an existing table - however, it's just doing the same thing behind the scenes). This means that you also get to decide what to do with the index - index will be local, who will be global (you can also reassess some of existing indexes and decide that they are not really necessary).

    Second of all, the choice of the partitioning key seems weird. Partitioning is a data management technique more that anything else, in order to be eligible, you must find a good partitioning key. A column recently added, named "data_seq" is not a good candidate. Can you give us more details about this column and why it was chosen as a partitioning key?

    I suspect that the person who proposed this partitioning scheme made a huge mistake. A non-partitioned table is much better in all aspects (including the ease of management and performance) that divided one wrongly.

    Best regards

    Nikolai

  • alternative to delete and re-create indexes

    Hi all

    We use Oracle 11.2.0.2. We have a script where we fall before the full update of a table, the indexes and re-create indexes to improve performance.

    Rather than a drop and recreate indexes, I wanted to know if there's another approach better to achieve performance gains.

    I thought make unusable index and rebuild later. Would it not be better to drop and re-create the index.

    Thanks for your time.

    >
    I thought make unusable index and rebuild later. Would it not be better to drop and re-create the index.
    >
    This is exactly the right strategy to use. He does need to get the benefit of the performance, and there is no danger of inadvertently re-create the index with the wrong settings or in the wrong table space.

    See understanding when to use unusable index or Invisible in the DBA Guide
    http://docs.Oracle.com/CD/E11882_01/server.112/e25494/indexes002.htm#CIHJIDJG
    >
    Unusable index

    An unusable index is ignored by the optimizer, and is not maintained by DML. One of the reasons to make an unusable index are to improve the performance of loading in bulk. (Loads in bulk, go faster if the database is not required to manage the index when inserting rows.) Instead of letting fall the index and later re-creation, requiring you to remember the exact parameters of the CREATE INDEX statement, you can make the index unusable and then rebuild.

  • ORA - 29857:Domain index and objects secondary exists in Tablespace

    Database: 10.2.0.4
    OS: Windows

    While dropping the tablespace, I'm getting ORA-29857.
    I understand that I must remove indexes of area on the tablespace, and also to find secondary objects in this tablespace and drop them.


    Please provide me with step by step troubleshooting (query) for this error.



    Thank you
    Alok

    damorgan, one of our As Oracle answered this question even a couple of years. He is Director of Oracle ACE and Oracle self-taught over 12 years at the University level - http://www.morganslibrary.org/)

    ORA-29857: domain indexes and/or secondary objects exist in the tablespace

    As he hinted after the accurate results of the applications after using the name of your tablespace

    SELECT * FROM v$version;
    
    SELECT COUNT(*)
    FROM dba_segments
    WHERE tablespace_name = 'yourTableSpaceNameHere';
    
    DROP TABLESPACE yourTableSpaceNameHere INCLUDING CONTENTS AND DATAFILES;
    

    This query will show you the objects

    SELECT owner, segment_name, partition_name, segment_type, segment_subtype, relative_fno
    FROM dba_segments
    WHERE tablespace_name = ''yourTableSpaceNameHere'';
    

    Those are the objects that you will lose if you drop the tablespace.

  • to delete and re-create indexes

    Hello.

    You get the following error reported for work seek to purge the CC:
    ORA-08102

    According to the note of the Oracle, he must drop and re-create the index FND_CONCURRENT_REQUEST_N1.

    Can someone please advise the best way to to do? Is there a standard way to do this? (Should we stop managers cc? Database? EBS together?) What are the commands?

    Thank you all.

    Oracle 10.2.0.4
    Windows 2008
    EBS 11.5.10.2

    DA

    1. Get FND_CONCURRENT_REQUEST_N1 DDL
    THE VALUE OF 10000 LONG
    SELECT dbms_metadata.get_ddl ('INDEX', 'FND_CONCURRENT_REQUEST_N1') FROM dual;

    (2) delete the index.
    DROP INDEX FND_CONCURRENT_REQUEST_N1

    3. run the DDL
    CREATE INDEXES FND_CONCURRENT_REQUEST_N1...

    Nothing else is necessary.

  • creating index Impdp and parallel

    This can be a very basic question for most of you, but...

    Can someone explain that under with parallel impdp = n will lead to creating treats 1 index both with n PX (suppose I have n dump files)? Or it will create index n at the same time each process n PX? Issue DDL (1 parallel) parallel impdp = n option should not be indexed?

    How the result is different if I have only 1 file dump? Impdp will use n processes to read the dump file 1?

    I want to talk about 11 GR 2 EA.

    Indexes are created in series, but built using parallel slaves.

    Let's say you have foo index that was created like this

    create indexes on foo_tab foo (a) parallel 1;

    If you have run with parallel impdp = 5 Data Pump will do this:

    create indexes on foo_tab foo (a) parallel 5;
    ALTER index foo parallel 1

    Thus, the index will be created using parallel slaves until 5. When the build is finished, the parallel value is reset to the original value.

    Dean

  • How to create XMLIndex in the specific tablespace

    Hi all I am using 12 c

    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics,
    Oracle Database Vault and Real Application Testing options
    

    IM creating a XMLIndex that goes to the default tablespace

    15:34:40 SQL> CREATE INDEX TEST_IX ON dummy_table (xcontent)
    15:34:40   2  INDEXTYPE IS XDB.XMLINDEX
    15:34:40   3* PARAMETERS ('PATHS (INCLUDE (//DEFINITION/*) )')
    15:34:40  /
    Index created.
    15:34:40 SQL> 
    
    


    But when I try to specify a tablespace it error, what is the correct clause to specify a storage space for this type of index? I tried to follow doc Oracle but can't do work


    15:46:53 SQL>
      1  CREATE INDEX TEST_IX ON dummy_table (xcontent)
      2  INDEXTYPE IS XDB.XMLINDEX
      3  PARAMETERS ('PATHS (INCLUDE (//DEFINITION/*) )')
      4* TABLESPACE MEDIUM_INDEXES
    15:46:58 SQL> /
    TABLESPACE MEDIUM_INDEXES
    *
    ERROR at line 4:
    ORA-29850: invalid option for creation of domain indexes
    
    

    Thanks in advance

    SQL> CREATE INDEX XIDX_TEST_01
      2    ON TEST(XMLDOC)
      3    INDEXTYPE IS XDB.XMLINDEX
      4    LOCAL
      5    PARAMETERS
      6        ('PATHS (INCLUDE (/Employees/SSN /Employees/DateOfBirth)
      7                NAMESPACE MAPPING (xmlns="http://www.myserver.com/schema.v1.xsd")
      8              )
      9         PATH TABLE XDIX_TEST_PATHTABLE     (TABLESPACE USERS)
    10          PIKEY      INDEX XDIX_TEST_PIKEY   (TABLESPACE USERS)
    11          PATH ID    INDEX XDIX_TEST_PATH_ID (TABLESPACE USERS)
    12          ORDER KEY  INDEX XDIX_TEST_KEY     (TABLESPACE USERS)
    13          VALUE      INDEX XDIX_TEST_VALUE   (TABLESPACE USERS)
    14          ASYNC (SYNC ALWAYS) STALE (FALSE)'
    15         );

    Exercise in Range Partitioning, Structured and Unstructured XMLIndexes

    It is in the syntax / flow diagrams in the Oracle XMLDB, Developer's Guide index XML chapter... (not in the reference guide)


Maybe you are looking for