Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 14 Jun 2006 @ 10:51:07 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   How to validate the invalid references created
 
From:   Vireta_Godinho

This is my original definition of table

     CREATE SET TABLE TRAINING.EMP ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL,
          CHECKSUM = DEFAULT
          (
           EMP_NO INTEGER NOT NULL,
           DEPT_NO SMALLINT NOT NULL,
           JOB_CODE SMALLINT NOT NULL,
           EMP_NAME CHAR(40) CHARACTER SET UNICODE NOT CASESPECIFIC,
           SAL_AMT DECIMAL(10,2),
     FOREIGN KEY ( DEPT_NO ) REFERENCES TRAINING.DEPT ( DEPT_NO ),
     FOREIGN KEY ( JOB_CODE ) REFERENCES TRAINING.JOB ( JOB_CODE ))
     UNIQUE PRIMARY INDEX ( EMP_NO );

We archive this table and later restore the table using the restore cmd.

After restoring when we try to insert into the table it generates a error as" Failure 2728 Aborted due to a non-valid reference index"

So I tried dropping the inconsistent references of the tables by the following command (ALTER TABLE Tablename DROP INCONSISTENT REFERENCES)

But what is happening is in the table definition the foreign keys are completely deleted,so no more foreign references exist now.

What should I do now to validate the invalid references??

Does it mean that when we archive a database (which contains tables with foreign keys) and later restoring the database, the tables which has foreign keys are no longer reusable.????


Regards,

Vireta Godinho



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023