Oh.. Primary key index is missing!

Database: 10.2.0.4.0
Platform : Linux
SQL> SELECT CONSTRAINT_NAME,CONSTRAINT_TYPE,INDEX_NAME FROM DBA_CONSTRAINTS WHER
E TABLE_NAME='ISSUE_COMMENTS';
CONSTRAINT_NAME C STATUS VALIDATED
SYS_C0031516 C ENABLED VALIDATED
SYS_C0031517 C ENABLED VALIDATED
SYS_C0031519 P ENABLED VALIDATED
SQL> SELECT INDEX_NAME,TABLE_NAME FROM DBA_INDEXES WHERE TABLE_NAME='ISSUE_COMMENTS';
INDEX_NAME TABLE_NAME
INDEX_ISSUE_COMMENTS ISSUE_COMMENTS
SQL> select distinct index_name,column_name,table_name from dba_ind_columns wher
e table_name in ('ISSUE_COMMENTS');
INDEX_NAME COLUMN_NAME TABLE_NAME
INDEX_ISSUE_COMMENTS IDX ISSUE_COMMENTS
INDEX_ISSUE_COMMENTS ISSUE_ID ISSUE_COMMENTS
INDEX_ISSUE_COMMENTS PARENT_ID ISSUE_COMMENTS
Where is the index for the primary key 'SYS_C0031519'?
SQL>
After droping and recreating the primary key also,just primary constrainy is created but there is no corresponding index.
SQL> ALTER TABLE ISSUE_COMMENTS DROP CONSTRAINT SYS_C0031519;
Table altered.
SQL> ALTER TABLE ISSUE_COMMENTS ADD PRIMARY KEY (IDX)
2 USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
3 STORAGE(INITIAL 32768 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
4 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
5 TABLESPACE "TABLE_DATA" ENABLE;
Table altered.
SQL> SELECT CONSTRAINT_NAME,CONSTRAINT_TYPE,status,validated FROM DBA_CONSTRAINT
S WHERE TABLE_NAME='ISSUE_COMMENTS';
CONSTRAINT_NAME C STATUS VALIDATED
SYS_C0031516 C ENABLED VALIDATED
SYS_C0031517 C ENABLED VALIDATED
SYS_C0034310 P ENABLED VALIDATED
SQL> SELECT INDEX_NAME,TABLE_NAME FROM DBA_INDEXES WHERE TABLE_NAME='ISSUE_COMMENTS';
INDEX_NAME TABLE_NAME
INDEX_ISSUE_COMMENTS ISSUE_COMMENTS
SQL> select distinct index_name,column_name,table_name from dba_ind_columns wher
e table_name in ('ISSUE_COMMENTS');
INDEX_NAME COLUMN_NAME TABLE_NAME
INDEX_ISSUE_COMMENTS IDX ISSUE_COMMENTS
INDEX_ISSUE_COMMENTS ISSUE_ID ISSUE_COMMENTS
INDEX_ISSUE_COMMENTS PARENT_ID ISSUE_COMMENTS
Here also, the primary key constraint SYS_C0034310 is available but there is no index for that primary key.
Where the primary index has gone?

MohanaKrishnan wrote:
Database: 10.2.0.4.0
Platform : Linux
SQL> SELECT CONSTRAINT_NAME,CONSTRAINT_TYPE,INDEX_NAME FROM DBA_CONSTRAINTS WHER
E TABLE_NAME='ISSUE_COMMENTS';
CONSTRAINT_NAME C STATUS VALIDATED
SYS_C0031516 C ENABLED VALIDATED
SYS_C0031517 C ENABLED VALIDATED
SYS_C0031519 P ENABLED VALIDATED
Your first query is not consistent with the first set of results you have displayed.
Your later query for index columns is also not very helpful as it won't list the column names in the right order.
The probably answer to your question is that the index you have is non-unique and starts with the column you've used for the primary key, which means Oracle can use it to support the primary key constraint. Here's a quick cut-n-paste from a SQL*Plus session to demonstrate the point:
SQL> create table t1 (n1 number, v1 varchar2(10));
Table created.
SQL> create index t1_n1 on t1(n1);
Index created.
SQL> alter table t1 add primary key(n1);
Table altered.
SQL> select index_name from user_indexes where table_name = 'T1';
INDEX_NAME
T1_N1
1 row selected.
SQL> select constraint_name, constraint_type, index_name from user_constraints
  2  where table_name = 'T1';
CONSTRAINT_NAME      C INDEX_NAME
SYS_C0033465         P T1_N1
1 row selected.
SQL> spool offNote how I've added a primary key with no name, and Oracle has decided to use the t1_n1 index to support it.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"Science is more than a body of knowledge; it is a way of thinking" Carl Sagan
Edited by: Jonathan Lewis on Dec 31, 2008 2:16 PM
Apologies to Satish - I didn't see either prior post

Similar Messages

  • Primary key index not working in a select  statment

    Hi ,
    I'm doing a :
    select *
    from my_table
    where B = v1 and
    A = v2 ;
    where A and B are the primary key of the table, in that table the primary key index is there and the order of the primary key definition is A first and then B.
    While testing this statment in my database the Explain Plan shows that it is using the index ok but when
    runninng in client database it is not using it becasue of the order (i think), is this something configurable that I need to ask to my DBA ?
    The solution I found was to do the select with a hint wich fix the problem , but I'm curious about why is working in my dadabase and not in the client database
    thanks in advance .
    oracle version 11g

    This is the forum for SQL Developer (Not for general SQL/PLSQL questions). Your question would be better asked in the SQL and PL/SQL forum.
    Short answer: The execution plan used will depend on optimizer settings and table/index statistics. For example if the table has very few rows it may not bother using the index.

  • Concept about Primary Key index

    I have a partitioned table as follow:
    CREATE TABLE TEST
    (TEST_KEY NUMBER(10,0) NOT NULL
    ,FOREIGN_KEY NUMBER(10,0) NOT NULL
    ,PARAM_ID NUMBER(10,0)
    ,PARAM_VALUE VARCHAR2(256)
    PARTITION BY HASH (operation_key) PARTITIONS 15
    STORE IN (TEST_R1_TS, TEST_R2_TS, TEST_R3_TS, TEST_R4_TS, TEST_R5_TS)
    CACHE
    I also created a partitioned index for the TEST_KEY to be used as primary key index.
    CREATE INDEX TEST_PK_IDX ON PARAMETER_1(TEST_KEY) LOCAL
    STORE IN (TEST_i1_ts, TEST_i2_ts, TEST_i3_ts, TEST_i4_ts, TEST_i5_ts);
    When I try to run alter table to add primary key, I got index not exist error?
    SQL> alter table TEST add (constraint test_pk primary key (test_key) using index test_pk_idx);
    alter table parameter_1 add (constraint pa1_pk primary key (parameter_key) using index pa_pk_idx)
    ERROR at line 1:
    ORA-01418: specified index does not exist
    BUT, I could find my index in the USER_INDEXES table...
    SQL> select index_name from user_indexes where index_name like '%TEST_PK%';
    INDEX_NAME
    TEST_PK_IDX
    Why? Help is very appreciated.
    Thank you in advanced.

    check the names of the tables in the script you give ... they are different for the table and the index. When you add the constraint the table name and column name mysteriously change in the error message, so I think that you aren't showing us what actually happened.

  • How to see wether the index is a primary key index or not

    hi,
    can anybody let me know how to get wether the index is made on the primary key (i.e primary key index)
    can we do by querying the user_constriants table.
    plz let me know..

    Maran.Viswarayar wrote:
    Vijay,
    Was that different from Anurag's reply?Yes it was. Anurag didn't include the index_name in his query.
    It is possible for the index name to be different from the constraint_name, so if you listed just the primary key constraint names you might decide that a given index was not a "primary key" index because you couldn't find a constraint with the matching name.
    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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Creating an unique index instaed of using primary key index

    Hi ,
    I heard in a debate sometimes it's better to create a unique index on a column and using it instaed of using primary key index in oracle.I couldn't understand what the reason propely.
    Can anyone please help me in thsi topic if it is a valid one .
    Thanks in advance

    Hi,
    They are exactly NOT identical.
    1. Unique key can have NULL values where primary keys can't.
    2. Primary key is fundamentally those keys which do not change. I mean updating a primary key is not a good idea.
    SQL> drop table test;
    Table dropped.
    SQL> create table test ( a number(2));
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1* create unique index test_idx on test(a)
    SQL> /
    Index created.
    SQL> ed
    Wrote file afiedt.buf
      1* insert into test values(NULL)
    SQL> /
    1 row created.
    SQL> drop table test;
    Table dropped.
    SQL>
    SQL> create table test ( a number(2) primary key);
    Table created.
    SQL> insert into test values(NULL);
    insert into test values(NULL)
    ERROR at line 1:
    ORA-01400: cannot insert NULL into ("HR"."TEST"."A")
    SQL>Cheers,
    Edited by: Avinash Tripathi on Nov 24, 2009 11:17 AM

  • Problem with capturing Primary Key Index

    Hi
    I am capturing certain tables and in the mean process i observed that all the indexes are getting captured except the primary key index.
    Any Suggestions on this?
    Thanx,
    Suji

    Hi,
    I was unable to reproduce this behavior on OWM 10.1.0.8. It appears that you have a SR open for this issue, so I would suggest to continue with that process.
    Regards,
    Ben

  • Drop/recreate primary key index

    Any suggestions for dropping/recreating a primary key index? The index has to be dropped/recreated and not rebuilt due to ORA-600s.
    Do I simply disable/re-enable the primary key constraint? The database is 10g.
    Edited by: nickw2 on Apr 1, 2009 5:06 PM

    ORA-600 errors are a handful, I usually check metalink or ask ORacle support for help.
    Anyways, If you want to recreate the primary key index, have you tried dropping the primary key constraint and adding it back?
    ALTER TABLE tablename
    DROP CONSTRAINT pk_name;
    ALTER TABLE tablenames
    ADD CONSTRAINT pk_name PRIMARY KEY (column_name);

  • Creating Primary Key Index

    Hi,
    Iam trying to create a Primary Index on Large table and Iam using the Parallelism to make it fast. I have used the following script to create a Primary key Index.
    CREATE UNIQUE INDEX FLX_ARCH.FUND_SEC_RESULT_STAT_ARCH_PK
    ON FLX_ARCH.FUND_SEC_RESULT_STAT_ARCH
    (FUND_SEC_RESULT_MAP_INST,RATES_RULE_ID,BASE_LOCAL_FLAG,EFFECTIVE_DATE)
    TABLESPACE FLX_PERF_I
    parallel;
    Index created.
    Elapsed: 01:43:37.37
    Index got created in 1 hour 43 minutes. But when Iam adding constarint to those columns, it is taking almost 12hours with or without parallelism.
    ALTER TABLE FLX_ARCH.FUND_SEC_RESULT_STAT_ARCH
    ADD CONSTRAINT FUND_SEC_RESULT_STAT_ARCH_PK
    PRIMARY KEY
    (FUND_SEC_RESULT_MAP_INST,RATES_RULE_ID,BASE_LOCAL_FLAG,EFFECTIVE_DATE)
    parallel
    Would you please let me know what could be the problem and how can we add the Primary constraint fast.
    Your early response is much appreciated.
    Thanks and Regards
    Suresh. D

    Would you please let me know what could be the problem and You have presented no details that indicate any problem exists.
    how can we add the Primary constraint fast. Fast is relative.
    If I asked you to make my snail fast, could you do so?
    ALTER SESSION SET SQL_TRACE=TRUE;
    ALTER TABLE FLX_ARCH.FUND_SEC_RESULT_STAT_ARCH
    ADD CONSTRAINT FUND_SEC_RESULT_STAT_ARCH_PK
    PRIMARY KEY
    (FUND_SEC_RESULT_MAP_INST,RATES_RULE_ID,BASE_LOCAL_FLAG,EFFECTIVE_DATE)
    parallel
    ALTER SESSION SET SQL_TRACE=FALSE;
    now find the trace file within ./udump folder
    tkprof <trace_file.trc> trace_results.txt explain=<username>/<password>
    By inspecting the trace file you will be able to see where time is being spent.
    With this knowledge, you may or may not be able to determine the bottleneck & therefore improve it

  • How to Create primary key index with duplicate rows.

    Hi All,
    While rebuilding an index on a table , I am getting error that there are duplicate rows in a table.
    Searching out the reason led me to an interesting observation.
    Please follow.
    SELECT * FROM user_ind_columns WHERE table_name='SERVICE_STATUS';
    INDEX_NAME     TABLE_NAME     COLUMN_NAME     COLUMN_POSITION     COLUMN_LENGTH     CHAR_LENGTH     DESCEND
    SERVICE_STATUS_PK     SERVICE_STATUS     SUBSCR_NO_RESETS     2     22     0      ASC
    SERVICE_STATUS_PK     SERVICE_STATUS     STATUS_TYPE_ID     3     22     0     ASC
    SERVICE_STATUS_PK     SERVICE_STATUS     ACTIVE_DT     4     7     0     ASC
    SERVICE_STATUS_PK     SERVICE_STATUS     SUBSCR_NO     1     22     0     ASC
    SELECT index_name,index_type,table_name,table_type,uniqueness, status,partitioned FROM user_indexes WHERE index_name='SERVICE_STATUS_PK';
    INDEX_NAME     INDEX_TYPE      TABLE_NAME     TABLE_TYPE     UNIQUENESS     STATUS     PARTITIONED
    SERVICE_STATUS_PK     NORMAL     SERVICE_STATUS     TABLE     UNIQUE     VALID     NO
    SELECT constraint_name ,constraint_type,table_name,status,DEFERRABLE,DEFERRED,validated,index_name
    FROM user_constraints WHERE constraint_name='SERVICE_STATUS_PK';
    CONSTRAINT_NAME     CONSTRAINT_TYPE     TABLE_NAME      STATUS     DEFERRABLE     DEFERRED     VALIDATED     INDEX_NAME
    SERVICE_STATUS_PK     P     SERVICE_STATUS     ENABLED     NOT DEFERRABLE     IMMEDIATE VALIDATED     SERVICE_STATUS_PK
    1. Using index scan:
    SELECT COUNT (*)
    FROM (SELECT subscr_no, active_dt, status_type_id, subscr_no_resets
    FROM service_status
    GROUP BY subscr_no, active_dt, status_type_id, subscr_no_resets
    HAVING COUNT (*) > 1) ;
    no rows returned
    Explain plan:
    Operation     OBJECT Name     ROWS     Bytes     Cost     OBJECT Node     IN/OUT     PStart     PStop
    SELECT STATEMENT Optimizer MODE=CHOOSE          519 K          14756                     
    FILTER                                        
    SORT GROUP BY NOSORT          519 K     7 M     14756                     
    INDEX FULL SCAN     ARBOR.SERVICE_STATUS_PK     10 M     158 M     49184                     
    2. Using Full scan:
    SELECT COUNT (*)
    FROM (SELECT /*+ full(s) */ subscr_no, active_dt, status_type_id, subscr_no_resets
    FROM service_status s
    GROUP BY subscr_no, active_dt, status_type_id, subscr_no_resets
    HAVING COUNT (*) > 1) ;
    71054 rows returned.
    Explain Plan:
    Operation     Object Name     Rows     Bytes     Cost     Object Node     In/Out     PStart     PStop
    SELECT STATEMENT Optimizer Mode=CHOOSE          1           24123                     
    SORT AGGREGATE          1                               
    VIEW          519 K          24123                     
    FILTER                                        
    SORT GROUP BY          519 K     7 M     24123                     
    TABLE ACCESS FULL     ARBOR.SERVICE_STATUS     10 M     158 M     4234                     
    Index SERVICE_STATUS_PK is a unique and composite primary key VALID index. And the constraint is ENABLED and VALIDATED still having duplicate rows in table.
    How it is possible?
    Is it an Oracle soft Bug??
    Regards,
    Saket Bansal

    saket bansal wrote:
    Values are inserted as single rows inserts through an GUI interface.And you still claim to have over 71K duplicate records, without the GUI getting any kind of errors?
    That does not add up and can only be explained by a "bug".
    I tried inserting a duplicate record but failed.
    SQL> insert into service_status (select * from service_status where rownum <2);
    insert into service_status (select * from service_status where rownum <2)
    ERROR at line 1:
    ORA-00001: unique constraint (ARBOR.SERVICE_STATUS_PK) violatedAre you really sure there is no other way data in this table is populated/manipulated in bulk?

  • Rebuilding the Primary Key Index for an IOT

    Good afternoon everyone
    I am having some difficulty rebuilding an IOT. Specifically, I am trying to move the IOT from one tablespace to another. From DBA_SEGMENTS, it appears the primary Key for the IOT is what needs to be rebuilt. When I query DBA_TABLES, it shows the same name as the Index that I need to build. When I attempt to move the table to another tablespace, I get INVALID OPTION on the Alter table.
    ALTER TABLE <owner>.<table name> MOVE TABLESPACE <new tablespace name>;
    I have also tried
    ALTER INDEX <owner>.<index name> REBUILD TABLEAPCE <new tablespace name>;
    Can someone point me in the right direction as the SQL documentation is not as good as I thought for this.

    OK. Here are the three tables in question. I think the problem with these three tables is they have user-defined data types, essentially nullifying the use of ONLINE for the move option. I'm thinking I will have to export, create the table and then import.
    If anyone has any other options, i'm open do a conversation.
    OWNER TABLE_NAME IOT_NAME TABLESPACE_NAME
    NGDEV_SOAINFRA SYS_IOT_OVER_76044 AQ$_IP_QTAB_G NGDEV_SOAINFRA
    NGDEV_SOAINFRA SYS_IOT_OVER_76119 AQ$_EDN_EVENT_QUEUE_TABLE_G NGDEV_SOAINFRA
    NGDEV_SOAINFRA SYS_IOT_OVER_76148 AQ$_EDN_OAOO_DELIVERY_TABLE_G NGDEV_SOAINFRA
    3 rows selected.
    CMPW_DBA:orcl> alter table ngdev_soainfra.aq$_ip_qtab_g move tablespace soa_suite_data_01 overflow tablespace soa_suite_data_01;
    alter table ngdev_soainfra.aq$_ip_qtab_g move tablespace soa_suite_data_01 overflow tablespace soa_suite_data_01
    ERROR at line 1:
    ORA-24005: Inappropriate utilities used to perform DDL on AQ table NGDEV_SOAINFRA.AQ$_IP_QTAB_G
    Elapsed: 00:00:00.03
    CMPW_DBA:orcl> alter table ngdev_soainfra.aq$_ip_qtab_g move online tablespace soa_suite_data_01 overflow tablespace soa_suite_data_
    01;
    alter table ngdev_soainfra.aq$_ip_qtab_g move online tablespace soa_suite_data_01 overflow tablespace soa_suite_data_01
    ERROR at line 1:
    ORA-24005: Inappropriate utilities used to perform DDL on AQ table NGDEV_SOAINFRA.AQ$_IP_QTAB_G

  • The primary key index to be created in a different tablespace.

    Hi,
    I have a user PROD. It has been assigned a default tablespace PROD_TBS.
    There is a seperate table space for all the indexes in the schema , PROD_IDX.
    I wish to create a table TEST as follows,
    CREATE TABLE TEST
    (TEST_ID NUMBER(1),
    NAME VARCHAR2 (10) );
    There should be a primary key on column test_id but such that the corresponding unique index created by default because of the primary key should be created in tablespace PROD_IDX.
    How to do this ?

    Alternative solution:
    CREATE TABLE TEST
    (TEST_ID NUMBER(1),
    NAME VARCHAR2 (10),
    constraint test_pk primary key (test_id)
    using index tablespace prod_idx
    );Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Creating Primary key Index as Local Partitioned Index.

    CREATE TABLE T1(
    x NUMBER,
    y NUMBER
    )PARTITION BY LIST(x)
    PARTITION P1 VALUES (1),
    PARTITION P2 VALUES (2),
    PARTITION Pmax VALUES (default)
    ALTER TABLE T1 ADD CONSTRAINT T1_PK PRIMARY KEY(Y) LOCAL;
    Error starting at line 1 in command:
    ALTER TABLE T1 ADD CONSTRAINT T1_PK PRIMARY KEY(Y) LOCAL
    Error report:
    SQL Error: ORA-01735: invalid ALTER TABLE option
    01735. 00000 - "invalid ALTER TABLE option"
    *Cause:   
    *Action:
    Can you please help me how to achieve this in Oracle 10g R2?

    LOCAL keyword is invalid with ALTER TABLEDepends:
    SQL>  create table t1 (x number, y number)
    partition by list (x)
       (partition p1
           values (1),
        partition p2
           values (2),
        partition pmax
           values (default))
    Table created.
    SQL>  alter table t1 add constraint t1_pk primary key(x, y) using index local
    Table altered.

  • Problems creating a partitioned primary key index.

    I am creating a partitioned table and I noticed that when I use the constraint option of the create table the primary key is not partitioned. I then tried using the using index clause and specifying the create index local and that is giving errors. Here is my current syntax that is causing the errors:
    create table redef_temp (
         USER_ID          VARCHAR2(32),
         GROUP_ID     VARCHAR2(32),
         JOIN_DATE     DATE DEFAULT SYSDATE NOT NULL,
         constraint primary key
         using index (create index pk_redef_temp
    on redef_temp (USER_ID, GROUP_ID)
    LOCAL STORE IN (IDX)))
    tablespace data
    partition by hash (user_id)
         (PARTITION ic_x_user_group_part_p1 tablespace DATA,
         PARTITION ic_x_user_group_part_p2 tablespace DATA,
         PARTITION ic_x_user_group_part_p3 tablespace DATA,
         PARTITION ic_x_user_group_part_p4 tablespace DATA)
    PARALLEL ENABLE ROW MOVEMENT;
    Thanks

    The following works on 9.2.0.8 and 10.2.0.3:
    create table redef_temp (
         USER_ID VARCHAR2(32),
         GROUP_ID VARCHAR2(32),
         JOIN_DATE DATE DEFAULT SYSDATE NOT NULL,
         constraint pk_redef_temp primary key (user_id, group_id)
         using index (
              create index pk_redef_temp
              on redef_temp (USER_ID, GROUP_ID)
              LOCAL tablespace test_8k
    tablespace test_8k
    partition by hash (user_id) (
         PARTITION ic_x_user_group_part_p1 tablespace test_8k,
         PARTITION ic_x_user_group_part_p2 tablespace test_8k,
         PARTITION ic_x_user_group_part_p3 tablespace test_8k,
         PARTITION ic_x_user_group_part_p4 tablespace test_8k
    PARALLEL ENABLE ROW MOVEMENT
    /Your syntax for the constraint definition was wrong, and your use of 'store in' for the index tablespace was wrong. I've had to change all tablespace names to 'test_8k'.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Primary key vs Secondary key - why would a rpt hit one as to the other?

    Post Author: kevans
    CA Forum: Data Connectivity and SQL
    Here's an issue that surfaced when using CRW10, happens with XI as well, but not an issue with CRW8 - each one is hitting the same SQL Server db.
    I discovered something today and I'm not sure if this might be the road to a solution, however, I don't know enough about SQL Server and/or Crystal.  First, my reports seem fairly simple in nature, I don't think I'm pulling a million rows of data, maybe but doubt it.  So I run report ABC and I see blocking issues in SQL Server Enterprise Mgr.  If I run report XYZ that isn't too much different than ABC, I do not see blocking issues.  Hmm, what could be different?  In SQL-Mgr when I look at the SPID info generated by the report I can see the tables the report is referencing and below is what I discovered.
    The one difference I see is under the "Index" column - the report blocking shows "XPKcall_req" where call_req is the table I'm pulling from.  The report that IS NOT blocking shows call_req_x0.  I checked with our dba and he wasn't sure, other than to say XPK is the primary key index.  Okay, then why is one report hitting the primary key index (whatever that is) and the other isn't?  In Crystal I'm not sure how to tell it to stop doing this, I tried shaking my finger and yelling but like my kids this does little.
    Any ideas, with the report that is?

    Post Author: kevans
    CA Forum: Data Connectivity and SQL
    Here's an issue that surfaced when using CRW10, happens with XI as well, but not an issue with CRW8 - each one is hitting the same SQL Server db.
    I discovered something today and I'm not sure if this might be the road to a solution, however, I don't know enough about SQL Server and/or Crystal.  First, my reports seem fairly simple in nature, I don't think I'm pulling a million rows of data, maybe but doubt it.  So I run report ABC and I see blocking issues in SQL Server Enterprise Mgr.  If I run report XYZ that isn't too much different than ABC, I do not see blocking issues.  Hmm, what could be different?  In SQL-Mgr when I look at the SPID info generated by the report I can see the tables the report is referencing and below is what I discovered.
    The one difference I see is under the "Index" column - the report blocking shows "XPKcall_req" where call_req is the table I'm pulling from.  The report that IS NOT blocking shows call_req_x0.  I checked with our dba and he wasn't sure, other than to say XPK is the primary key index.  Okay, then why is one report hitting the primary key index (whatever that is) and the other isn't?  In Crystal I'm not sure how to tell it to stop doing this, I tried shaking my finger and yelling but like my kids this does little.
    Any ideas, with the report that is?

  • How to specify  tablespace for a primary key inde in create table statement

    How to specify the tablespace for a primary key index in a create table statement?
    Does the following statement is right?
    CREATE TABLE 'GPS'||TO_CHAR(SYSDATE+1,'YYYYMMDD')
                ("ID" NUMBER(10,0) NOT NULL ENABLE,
                "IP_ADDRESS" VARCHAR2(32 BYTE),
                "EQUIPMENT_ID" VARCHAR2(32 BYTE),
                "PACKET_DT" DATE,
                "PACKET" VARCHAR2(255 BYTE),
                "PACKET_FORMAT" VARCHAR2(32 BYTE),
                "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
                 CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") TABLESPACE "INDEX_DATA"
                 TABLESPACE "SBM_DATA";   Thank you
    Edited by: qkc on 09-Nov-2009 13:42

    As orafad indicated, you'll have to use the USING INDEX clause from the documentation, i.e.
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE TABLE GPS
      2              ("ID" NUMBER(10,0) NOT NULL ENABLE,
      3              "IP_ADDRESS" VARCHAR2(32 BYTE),
      4              "EQUIPMENT_ID" VARCHAR2(32 BYTE),
      5              "PACKET_DT" DATE,
      6              "PACKET" VARCHAR2(255 BYTE),
      7              "PACKET_FORMAT" VARCHAR2(32 BYTE),
      8              "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
      9               CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") USING INDEX TABLESP
    ACE "USERS"
    10               )
    11*              TABLESPACE "USERS"
    SQL> /
    Table created.Justin

Maybe you are looking for

  • Yoga 2 Pro Went DEAD After BIOS Update

    Had a horrible experience .. with good ending ... when upgrading Bios for my Yoga 2 Pro. So I'd like to share with others. I bought my Yoga 2 Pro last June (Man 3/22/14) and love it! But, it had problem restarting automatically after Windows Update.

  • Bridge CS2 - files over a network

    I have been using Bridge CS2 for a while now. It is mainly used for the preview and management of RAW files. Until recently, the files have been located on the local drive (C:) and there has been no issue. However, I have recently, for security reaso

  • Enable RRAS LAN Routing via Powershell

    On a fresh install of windows 2012 R2 if I run the following: Install-WindowsFeature -Name "Routing" Install-WindowsFeature -Name "RSAT-RemoteAccess-Powershell" Add-BgpRouter ... I receive the error: LAN Routing not configured. Please ensure RasRouti

  • Flash IDE not compiling movieclips with "export for actionscript"

    I'm having a really odd problem with Flash CS5 where I'm getting random compiling errors for movie clips that are exported for actionscript. These are simple graphics that will be created at runtime. Nothing special. When I first open the project it

  • Is it possible to download Firefox to a cd for installing on a computer with a broken we browser?

    I just need to download the firefox install program to a cd so I can put it on a computer with a non-functioning web browser.