Mailing List
Home
Forum Home
Oracle List - by freelists.org
Oracle on SUSE Linux - Runing Oracle on SUSE Linux
Oracle database error code ...
www.freelists.org
Subjects
ORA 12540: TNS:internal limit restriction exceeded
ORA 12838 please : Is possible to append two times to the same table befo
ORA 12838 please : Is possible to append two times to the same table before
ora 04031
ora 12500 on windows
ORA 32004: obsolete and/or deprecated parameter(s) specified
ORA 01925: maximum of 30 enabled roles exceeded
ORA 01925: maximum of 30 enabled roles exceeded
ora 12500 on windows
ORA 01650, one idea
ORA 01650
ORA 4030
ORA 12838 please : Is possible to append two times to thesametable before do
ORA 12838 please : Is possible to append two times to thesame table before d
ORA 01536
ORA 03113 end of file on communication channel
ORA 32004: obsolete and/or deprecated parameter(s) specified
ORA 00600:
ORA 00020: maximum number of processes (%s) exceeded
ORA 01925: maximum of 30 enabled roles exceeded
ORA 3113 while creating a cluster database 9201 RAC on Linux with OCFS
ora 12500 on windows
ora 12500 on windows
ora 12500 on windows
ORA 01650, one idea
ora 12500 on windows
ora 12500 on windows
ora 12500 on windows
ORA 2000 Error Using DBMS STATS GATHER SCHEMA STATS
ORA 01650, one idea
ORA 01650, one idea
ORA 01650, one idea
ORA 01650
ORA 01650
ORA 01031
ORA 4030
ORA 4030
ORA 06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind
ORA 01722 invalid number
 
about "Oracle recommends that unique indexes be created explicitly "

about "Oracle recommends that unique indexes be created explicitly "

2006-06-30       - By Niall Litchfield

 Back
Reply:     1     2  

Intended to cc the list

-- ---- -- Forwarded message -- ---- --
From: Niall Litchfield <niall.litchfield@(protected)>
Date: Jun 30, 2006 1:00 PM
Subject: Re: about "Oracle recommends that unique indexes be created explicitly"
To: wqhhp@(protected)


There are , at least, two situations to which the guide is referring
demonstrated below. The first is the case where a suitable index
already exists and the second is the case when the constraint is
created as initially deferred.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

NIALL @ nl102 >create table tab1(id number, description varchar2(10));

Table created.

NIALL @ nl102 >create table tab2(id number , description varchar2(10));

Table created.

NIALL @ nl102 >create index i1 on tab1(id);

Index created.

NIALL @ nl102 >alter table tab1 add constraint pk_tab1(id);
alter table tab1 add constraint pk_tab1(id)
                                     *
ERROR at line 1:
ORA-00904 (See http://ORA-00904.ora-code.com): : invalid identifier


NIALL @ nl102 >alter table tab1 add constraint pk_tab1 primary key(id);

Table altered.

NIALL @ nl102 >alter table tab2 add constraint pk_tab2 primary key(id)
initially deferred;

Table altered.

NIALL @ nl102 >select index_name,uniqueness from user_indexes
2  where table_name in ('TAB1','TAB2');

INDEX_NAME                     UNIQUENES
-- ---- ---- ---- ---- ---- -- -- ------
PK_TAB2                        NONUNIQUE
I1                             NONUNIQUE

2 rows selected.

NIALL @ nl102 >

regards

--
Niall Litchfield
Oracle DBA
http://www.orawin.info


--
Niall Litchfield
Oracle DBA
http://www.orawin.info
--
http://www.freelists.org/webpage/oracle-l