当前位置:网站首页>[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!
- 【安全的办公和生产力应用程序】上海道宁为您提供ONLYOFFICE下载、试用、教程
- [socket] ① overview of socket technology
- Lingyun going to sea | yidiantianxia & Huawei cloud: promoting the globalization of Chinese e-commerce enterprise brands
- How to analyze fans' interests?
- 杰理之关于 DAC 输出功率问题【篇】
- 尚硅谷JVM-第一章 类加载子系统
- netperf 而网络性能测量
- unrecognized selector sent to instance 0x10b34e810
- Jerry's ble exiting Bluetooth mode card machine [chapter]
猜你喜欢

input_ delay

How to verify accesstoken in oauth2 protocol

2022.6.28

A complete tutorial for getting started with redis: RDB persistence

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

Make (convert) ICO Icon

Lavel PHP artisan automatically generates a complete set of model+migrate+controller commands

mos管實現主副電源自動切換電路,並且“零”壓降,靜態電流20uA

装饰设计企业网站管理系统源码(含手机版源码)

Install redis from zero
随机推荐
Cglib agent in agent mode
tensorboard的使用
Detailed explanation of 19 dimensional integrated navigation module sinsgps in psins (filtering part)
应用程序启动速度的优化
Domcontentloaded and window onload
2022 spring recruitment begins, and a collection of 10000 word interview questions will help you
How to find file accessed / created just feed minutes ago
input_ delay
[cpk-ra6m4 development board environment construction based on RT thread studio]
装饰设计企业网站管理系统源码(含手机版源码)
[secretly kill little partner pytorch20 days] - [Day1] - [example of structured data modeling process]
杰理之FM 模式单声道或立体声选择设置【篇】
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
Data analysis from the perspective of control theory
Opencv environment, and open a local PC camera.
【基于 RT-Thread Studio的CPK-RA6M4 开发板环境搭建】
Jerry's FM mode mono or stereo selection setting [chapter]
Room rate system - login optimization
IDEA重启后无法创建Servlet文件的解决方案
尚硅谷JVM-第一章 类加载子系统