英文:
Navicat backup restoring - [Err] Failed to create View
问题
我正在测试恢复数据库备份的过程,当涉及到视图时,大部分视图都已经恢复成功,但是对于一些视图,它给出了一个错误。
我去检查了这个视图,发现它的选择语句是从另一个视图中选择的。
我的问题是,是否有一种方法可以强制恢复这个视图,即使它有错误?
我通过复制视图的选择查询,并创建一个同名的新视图来解决了这个问题...它完美地工作了。但是如果我完全丢失了模式/服务器,只剩下备份文件怎么办呢?
Navicat视图恢复错误
英文:
I was testing the restoring of my database backup
and when it comes to the views, most of them are restored but for some views it gives me an Error
I went to check the view, the view has a select statement that selects from another view.
My question is, is there a way to force it to restore the view even though it has an error?
I solved it by copying the select query of the view, and creating a new view with the same name.. it works perfectly but what if I completely lost the **schema / server **and all i have is the backup file
Navicat view restore ERROR
答案1
得分: 0
我意识到问题出在函数上,视图正在使用尚未在模式中恢复的函数。
更明确地说,恢复的顺序是“表格 > 视图 > 函数 > 事件”。
所以我必须先恢复“表格 > 函数 > 事件”,然后再恢复视图,这样就可以正常工作了。
英文:
I realized the problem was in the functions, the views were using functions that hasn't been restored yet in the schema.
To be more clear, The restore goes "Tables > Views > Functions > Events"
So i had to restore first "Tables > Functions > Events" Then i would restore the views, it worked perfectly fine.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论