vw_db_archive_fail.sql 311 B

12345678910
  1. create view vw_db_archive_fail as
  2. -- 汇总前一天执行失败的归档任务
  3. select * from db_archive_info
  4. where concat(server_source, db_source, table_source) not in
  5. (
  6. select concat(server_source, db_source, table_source) from db_archive_log
  7. where datetime_created >= curdate()
  8. and archive_status = 'Y'
  9. )
  10. order by id