Dear,
Pake sqlplus ya?
buat script *.sql - isi scriptnya ini
set heading off
set trimspool on
spool db_disable_cons.sql
select 'ALTER TABLE OPEN.' || table_name || ' DISABLE CONSTRAINT ' ||
constraint_name || ';'
from dba_constraints
where
(
owner='OPEN'
and constraint_type='R'
and table_name in ('Nama_Table'
))
or (
owner='SCHEMA_OWNER'
and r_constraint_name in
(select constraint_name from dba_constraints where owner='SCHEMA_OWNER' and
table_name in ('Nama_table')
and constraint_type='P'));
spool off
Jalanin pake sqlplus gunakan user sys atau system. Hasil script diatas
adalah db_disable_cons.sql
File db_disable_cons.sql itu berisi script untuk disable constraints,
jalanin lagi deh pake sqlplus. Untuk disablenya gunakan user owner
table saya.
Pada script diatas perlu setting owner + nama table-nya.
Semoga Sukses
Aria
On Thu, 27 Jan 2005 03:23:03 -0800 (PST), kora kora <[EMAIL PROTECTED]> wrote:
>
>
> tanya ni bos,
> gimana caranya men-disable semua constraints pada sebuah tabel sekaligus
> (tanpa pake TOAD lho) dg menggunakan perintah SQL*Plus.
> terima kasih atas bantuannya.
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Search presents - Jib Jab's 'Second Term'
>
> [Non-text portions of this message have been removed]
>
> --
> -----------I.N.D.O - O.R.A.C.L.E---------------
> Keluar: [EMAIL PROTECTED]
> Website: http://indo-oracle.blogspot.com
> -----------------------------------------------
>
> Bergabung dengan Indonesia Thin Client User Groups,
> Terminal Server, Citrix, New Moon Caneveral, di:
> http://indo-thin.vze.com
> Yahoo! Groups Links
>
>
>
>
>
--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.blogspot.com
-----------------------------------------------
Bergabung dengan Indonesia Thin Client User Groups,
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.vze.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/indo-oracle/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/