disable script:
DECLARE
BEGIN
FOR i IN
(SELECT table_name,
constraint_name --disable first the foreign key
FROM user_constraints
WHERE constraint_type ='R'
AND status = 'ENABLED'
)
LOOP
EXECUTE IMMEDIATE 'alter table "' ||i.table_name|| '" disable constraint ' ||i.constraint_name;
END LOOP i;
FOR i IN
(SELECT table_name,
constraint_name -- then disable all constraints
FROM user_constraints
WHERE status = 'ENABLED'
)
LOOP
EXECUTE IMMEDIATE 'alter table "' ||i.table_name|| '" disable constraint ' ||i.constraint_name;
END LOOP i;
END;
/
DECLARE
BEGIN
FOR i IN
(SELECT table_name FROM user_tables
)
LOOP
EXECUTE IMMEDIATE 'alter table "' ||i.table_name|| '" disable all triggers';
END LOOP i;
END;
/
enable script:
DECLARE
BEGIN
FOR i IN
(SELECT table_name,
constraint_name --enable first the primary key
FROM user_constraints
WHERE constraint_type ='P'
AND status = 'DISABLED'
)
LOOP
EXECUTE IMMEDIATE 'alter table "' ||i.table_name|| '" enable constraint ' ||i.constraint_name;
END LOOP i;
FOR i IN
(SELECT table_name,
constraint_name -- then enable all constraints
FROM user_constraints
WHERE status = 'DISABLED'
)
LOOP
EXECUTE IMMEDIATE 'alter table "' ||i.table_name|| '" enable constraint ' ||i.constraint_name;
END LOOP i;
END;
/
DECLARE
BEGIN
FOR i IN
(SELECT table_name FROM user_tables
)
LOOP
EXECUTE IMMEDIATE 'alter table "' ||i.table_name|| '" enable all triggers';
END LOOP i;
END;
/
分享到:
相关推荐
disable/enable adb codes
"Home" button disable and enable
市面在售摇摇杯程序;锂电;低功耗;过充过放过载保护;杯体移除保护;
同时disable/enable一组控件
使用crsctl disable/enable crs命令可以禁用/启用crs的自启动,但没有命令去查看当前自启动状态,虽然命令可以反复执行,但看不到实际状态总归还是让人不放心。 我在Linux测试环境下试了几个Oracle RAC版本: ...
启用约束: enable( validate) :启用约束,创建索引,对已有及新加入的数据执行约束. enable novalidate :启用约束,创建索引,仅对新加入的数据强制执行约束,而不管表中的现有数据.
//bit3:TEIE=0. SPI transmission end interrupt disable //bit2:RORIE=0. SPI receive overrun interrupt disable //bit1:TIE=0. SPI transmission interrupt disable //bit0:RIE=0 SPI ...
2,快速disable/enable代码Macro: WangQiGuo_MultiLineComment : Ctrl+2 3,快速#if #endif代码Macro: WangQiGuo_CommentSelStr : Ctrl+3 4,代码格式化Astyle插件 View->Astyle 5, 函数声名信息,在文件中输入fu...
Ajax加载动画 一个简单的ajax加载动画,用于jquery和Zepto... //enable and disable listening ajax events loading . ajax ( true ) ; //enable loading . ajax ( false ) ; //disable //manual show the loading v
通过这个批处理命令脚本可以轻松的实现enable ipv4和enable ipv6,同时还可以disable ipv4和disable ipv6,同时还可以比较它们enable前和enable后的ip状态
enable and disable "HOME" button in android 4.0.3 above the version 4.0.3,we should modify the frameworks detail is described in the Enable_Disable_Home.rar
This utility allows you to easily disable/enable ActiveX components on Internet Explorer browser. It disables the desired ActiveX component by setting the "kill bit" of the desired CLSID under the ...
后仿
reg文件zip包,used for disable ULPS。
// Disable dictionary words //$captcha->wordsFile = 'words/es.txt'; // Enable spanish words //$captcha->session_var = 'secretword'; // Change session variable $captcha->CreateImage();
If you do not use -N0 or -N1 to force disable/enable the NDR64 protocol, vlmcsd now uses the host build to decide if it uses NDR64 depending if a genuine KMS is using NDR64 on that build.
// Disable dictionary words//$captcha->wordsFile = 'words/es.txt'; // Enable spanish words//$captcha->session_var = 'secretword'; // Change session variable$captcha->CreateImage();
Windows 系统资源(Hardware,Driver)Scan,Enable,Disable 也可以在WinPE下运行
// Disable dictionary words //$captcha->wordsFile = 'words/es.txt'; // Enable spanish words //$captcha->session_var = 'secretword'; // Change session variable $captcha->CreateImage();
GTHive is a Android application designed to make life a ...* Support for ISS (ability to disable/enable) * Remember your login information (optional) * Ability to auto-enable and connect to wifi duri