当前位置:网站首页>[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();
边栏推荐
- Unity uses maskablegraphic to draw a line with an arrow
- New benchmark! Intelligent social governance
- Development of wireless communication technology, cv5200 long-distance WiFi module, UAV WiFi image transmission application
- 变量、流程控制与游标(MySQL)
- Redis introduction complete tutorial: replication principle
- Left path cloud recursion + dynamic planning
- DOMContentLoaded和window.onload
- Introduction to ins/gps integrated navigation type
- 又一百万量子比特!以色列光量子初创公司完成1500万美元融资
- 安装 torch 0.4.1
猜你喜欢
制作(转换)ico图标
leetcode-02(链表题)
A complete tutorial for getting started with redis: AOF persistence
HMS Core 机器学习服务打造同传翻译新“声”态,AI让国际交流更顺畅
Babbitt | metauniverse daily must read: is IP authorization the way to break the circle of NFT? What are the difficulties? How should holder choose the cooperation platform
How-PIL-to-Tensor
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
input_ delay
input_delay
上个厕所的功夫,就把定时任务的三种调度策略说得明明白白
随机推荐
体会设计细节
杰理之关于 DAC 输出功率问题【篇】
Codeforces round 264 (Div. 2) C gargari and Bishop [violence]
杰理之RTC 时钟开发【篇】
Make (convert) ICO Icon
Cocos2d-x Box2D物理引擎编译设置
MOS transistor realizes the automatic switching circuit of main and auxiliary power supply, with "zero" voltage drop and static current of 20ua
杰理之在非蓝牙模式下,手机连接蓝牙不要跳回蓝牙模式处理方法【篇】
Summary of research status of inertial navigation calibration at home and abroad (abridged version)
Starting from 1.5, build a micro Service Framework -- log tracking traceid
Kubernetes source code analysis (II) -- resource
简单冒泡排序
Jerry's FM mode mono or stereo selection setting [chapter]
Es6中Promise的使用
美国空军研究实验室《探索深度学习系统的脆弱性和稳健性》2022年最新85页技术报告
Use of promise in ES6
Lingyun going to sea | yidiantianxia & Huawei cloud: promoting the globalization of Chinese e-commerce enterprise brands
杰理之播内置 flash 提示音控制播放暂停【篇】
uniapp的表单验证
【安全的办公和生产力应用程序】上海道宁为您提供ONLYOFFICE下载、试用、教程