当前位置:网站首页>[Dameng database] after backup and recovery, two SQL statements should be executed
[Dameng database] after backup and recovery, two SQL statements should be executed
2022-07-07 03:17:00 【E-cology】
After restoring the database, there are sometimes stored procedures 、 Triggers, etc. are not running , It needs to be recompiled .
The second is to update the statistical information .
Compile database stored procedures , trigger , View objects . Please be there. ecology Execute under the user of .
declare
sql_v varchar(8000);
ex_sql varchar(4000);
begin
for i in
(
select 'alter procedure '||OBJECT_NAME as object_new from USER_PROCEDURES
union all
select 'alter trigger '||TRIGGER_NAME from USER_TRIGGERS
union all
select 'alter view '||VIEW_NAME from USER_VIEWS
)
loop
BEGIN
sql_v:=i.object_new||' compile;';
-- print(sql_v);
execute immediate sql_v;
EXCEPTION
WHEN OTHERS THEN
ex_sql:='insert into ex_table value('||i.object_new||',''00'',''00'');';
print ex_sql;
end;
end loop;
end;
----SQL2: Update statistics for the entire database
CALL SP_DB_STAT_INIT();
边栏推荐
- Change your posture to do operation and maintenance! GOPs 2022 Shenzhen station highlights first!
- Domcontentloaded and window onload
- Jericho is in non Bluetooth mode. Do not jump back to Bluetooth mode when connecting the mobile phone [chapter]
- Lavel PHP artisan automatically generates a complete set of model+migrate+controller commands
- Make (convert) ICO Icon
- 知识图谱构建全流程
- [cpk-ra6m4 development board environment construction based on RT thread studio]
- Opencv environment, and open a local PC camera.
- Netperf and network performance measurement
- 杰理之电话本获取【篇】
猜你喜欢

Le tube MOS réalise le circuit de commutation automatique de l'alimentation principale et de l'alimentation auxiliaire, et la chute de tension "zéro", courant statique 20ua

如何分析粉丝兴趣?

HMS Core 机器学习服务打造同传翻译新“声”态,AI让国际交流更顺畅

leetcode

Redis getting started complete tutorial: replication configuration

Nuggets quantification: obtain data through the history method, and use the same proportional compound weight factor as Sina Finance and snowball. Different from flush

杰理之开启经典蓝牙 HID 手机的显示图标为键盘设置【篇】

密码学系列之:在线证书状态协议OCSP详解

杰理之在非蓝牙模式下,手机连接蓝牙不要跳回蓝牙模式处理方法【篇】

A complete tutorial for getting started with redis: AOF persistence
随机推荐
The solution of unable to create servlet file after idea restart
Detailed explanation of 19 dimensional integrated navigation module sinsgps in psins (filtering part)
Jericho turns on the display icon of the classic Bluetooth hid mobile phone to set the keyboard [chapter]
Leetcode-02 (linked list question)
数学归纳与递归
Redis getting started complete tutorial: common exceptions on the client
Utilisation de la promesse dans es6
mos管實現主副電源自動切換電路,並且“零”壓降,靜態電流20uA
腾讯云原生数据库TDSQL-C入选信通院《云原生产品目录》
杰理之开启经典蓝牙 HID 手机的显示图标为键盘设置【篇】
Shangsilicon Valley JVM Chapter 1 class loading subsystem
美国空军研究实验室《探索深度学习系统的脆弱性和稳健性》2022年最新85页技术报告
从 1.5 开始搭建一个微服务框架——日志追踪 traceId
杰理之电话本获取【篇】
「小样本深度学习图像识别」最新2022综述
sshd[12282]: fatal: matching cipher is not supported: aes256- [email protected] [preauth]
A complete tutorial for getting started with redis: RDB persistence
掘金量化:通过history方法获取数据,和新浪财经,雪球同用等比复权因子。不同于同花顺
上个厕所的功夫,就把定时任务的三种调度策略说得明明白白
Redis introduction complete tutorial: client case analysis