如何查看 T-SQL 服务器上表的早期版本?
我刚刚做了一件非常愚蠢的事情。在 SSMS 服务器上的生产环境和开发环境中,我更改了一张表中的错误列。我确切地知道哪些行已更改,但不知道它们的原始值是什么。我没有使用交易。有什么方法可以查看表的历史记录或查看它的备份吗?例如,如果我能找到昨天的样子,我的日子就可以挽救了。
I've just done something very silly. In both the productive and development environments on our SSMS server, I've changed the wrong column in one table. I know exactly what rows have been changed, but not what their original values were. I did not use a transaction. Is there any way to view the history of the table or see a backup of it? For example, if I could find what it looked like yesterday, my day would be saved.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个答案是从备份中恢复数据(恢复到单独的数据库或单独的服务器中)。如果您有事务日志备份,还可以使用时间点还原。
您还可以尝试 https://www.apexsql.com/sql-tools-log。 aspx,看看是否可以在事务日志中找到更改。但如果您使用 SIMPLE 恢复模型,它将不起作用。
The first answer is to restore the data from a backup (into a separate database or a separate server). If you have transaction log backups, you can also use a point-in-time restore.
You can also try https://www.apexsql.com/sql-tools-log.aspx, to see if you can find the changes in the transaction log. But it won't work if you are using the SIMPLE recovery model.