SQL Server上所有表中的DateTime列已移动几个小时
我创建了几张表格,所有这些都有Datatype DateTime的一列。最近,我认为经过日光节省调整后,由于某种原因,所有日期都在几个小时转移了几个小时,即2022-01-01-01 00:00:00'已更改为'2021-12-31 18:00 :00'。
我的猜测是,它与日光节省和与之相关的某些服务器设置有关,但我不知道如何将其恢复。
编辑: 如注释中所建议的,它可能与SQOOP export有关,即我用来将数据从HDFS传输到SQL Server的内容。因此,问题确实是我如何看待桌子中插入的内容。是否有一种方法可以将所有插入语句重定向到日志文件,然后再发送到SQL Server?
I've created a few tables all of which had a column of datatype datetime. Recently, I think after the daylight savings adjustment, for some reason all the dates have shifted by a few hours i.e. '2022-01-01 00:00:00' has changed to '2021-12-31 18:00:00'.
My guess is that it has something to do with the daylight savings and some server setting related to that but I can't figure out how to revert it back.
Edit:
As suggested in the comments, it might have something to do with the sqoop-export i.e. what I'm using to transfer data from hdfs to sql server. So, the question really is how could I look at what is being inserted into the table. Is there a way I can redirect all insert statements to a log file before being sent over to sql server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论