Creating Index
Posted in 2003
Topics: High Availability & Replication
Hi all. I have a problem when creating index. After build a index I can't build other on same table after 3 o 4 minutes. I receive an error "the table is locked". Environment: Solaris 2.6 IDS With J/Foundation 9.21.UC3 HDR running. Any idea about that? PS Sorry for my english. -- Isidre PONS ROCA BASE - Gesti' d'Ingressos Locals (Diputaci' de Tarragona) Sistemes d'Informaci' Av President Lluis Companys 12-C 43005 - Tarragona SPAIN Tel # +34 977 253 404 Fax # +34 977 227 302 http://www.base.es ipons@dtgna.altanet.org -- sending to informix-list
Isidre PONS ROCA wrote:
> Hi all.
>
> I have a problem when creating index. After build a index I can't build
> other on same table after 3 o 4 minutes. I receive an error "the table is
> locked".
>
> Environment:
> Solaris 2.6
> IDS With J/Foundation 9.21.UC3
> HDR running.
>
> Any idea about that?
>
> PS Sorry for my english.
HDR is running, so your index is being rebuilt on the secondary.
Until it is completed, your primary table is locked.
begin work;
lock table tabname in exclusive mode;
set lock mode to wait;
create index idx1 on tabname (col1);
create index idx1 on tabname (col2);
create index idx1 on tabname (col3);commit work;
Alternatively, refer the the manual