即使计划失败,如何同步数据库? [英] How to synchronize database even if schedule fails?

查看:139
本文介绍了即使计划失败,如何同步数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在服务器上安排了一些任务(基本上在服务器上放了一些exe,并且它在特定时间运行以更新数据库),这会在一天的特定时间更新表.
我希望即使计划的任务由于某种原因一天失败,那么系统也应该能够恢复.基本上,数据库不应处于不一致状态.
那么在这种情况下我该怎么办呢?有什么帮助吗?

在此先感谢您.

I have scheduled some tasks on server(basically put some exe on server & it runs at certain time to update database) which updates the table at a particular time in a day.
I want that even if for some reason on a day scheduled tasks fails then the system should be able to recover. Basically database shouldn''t be in inconsistent state.
So what should I do in this case to handle the situation? Any help?

Thanks in advance.

推荐答案

在运行维护任务之前备份数据库.如果维护任务成功,则不执行任何操作.如果未成功,请从备份还原数据库,然后再次运行该过程.

顺便说一句,我不是DBA,但是SqlServer不能在内部执行此操作吗?
Backup the database before running the maintenance task. If the maintenance task succeeds, do nothing. If it doesn''t succeed, restore the database from the backup, and run the process again.

BTW, I''m not a DBA, but can''t SqlServer do this internally?


没有哥们,一切都应该是自动的,例如,如果我们将无法与之建立连接数据库服务器,那么在这种情况下,系统应自动恢复系统并再次进行处理....类似
No buddy, everything should be automatic for example if we will become unable to make a connection with database server then in that case system should automatically recover the system & reprocess again....something like that


这篇关于即使计划失败,如何同步数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆