SQL Diff 工具显示 2 个不同数据库服务器上 2 个相同存储过程的差异的原因是什么

发布于 2024-10-04 08:05:40 字数 389 浏览 0 评论 0原文

使用许多不同的 SQL“差异/比较”工具,我得到了相同的存储过程和表的差异报告(除了某些关键字的情况之外的所有内容 - 请耐心等待(期望情况是相同的) )位于两个不同数据库服务器上的数据库之间。

我使用的“客户端”数据库管理工具和比较工具都已配置为尝试将关键字大写,也不会将关键字大写,以提供一致性。

我还运行了相同的脚本来在两个数据库服务器上创建存储过程。托管比较中涉及的数据库的 mySQL 数据库服务器都是相同版本;版本 5.1

我需要关注哪些 mySQL 服务器配置设置,以便我可以运行比较并且不会看到实际不存在的差异标记...

这里的目的是我获得准确的差异报告,然后可以自信地生成数据库脚本,包括/排除升级期间的更改,就像您使用 SQL diff 工具所期望的那样!

谢谢,

Utilising a number of different SQL "diff/comparison" tools I am getting differences reported for stored procedures and tables which are identical (in everything but the case of certain keywords - bear with me (the expectation is for the case to be the same)) between a database living on 2 different database servers.

The "client" db admin tools and the comparison tools I am usgin, have been both configured to try and capitalise keywords and also not capitalise keywords in order to provide consistency.

I have also ran the same script to create the sprocs on both db servers. The mySQL database servers hosting the databases involved in the comparison are both the same version;version 5.1

What mySQL server configuration settings do I need to concern myself with, so that I can run comparisons and NOT see differences flagged where they don't actually exist...

The intention here is that I get an accurate report of differences and can then confidently generate database scripts including/excluding changes during promotion, sort of what you'd expect from using a SQL diff tool!!

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

故事未完 2024-10-11 08:05:40

根据我的经验,当两个模式被声明为不同时,尽管我希望它们是准确的,但这是由于

  • MySQL 版本略有不同,因此表定义中的空格和大写(CREATE TABLEs) 不同服务器上有不同的
  • 默认字符集(在服务器、数据库或表级别)
  • 表上索引的不同顺序(由于我在其中一台服务器上删除并重新添加了它)

++

  • CREATE TABLE 中的 AUTO_INCRMENT

In my experience, when two schemas were declared different, although I expected them to be exact, was due to

  • slight difference in the MySQL version, so white space and capitalization in the table definitions (CREATE TABLEs) were different
  • different default charsets (at the server, db or table level) on the different servers
  • different ordering of indexes on a table (due to me dropping and re-adding it on one of the servers)

++

  • The AUTO_INCREMENT value in the CREATE TABLE
混吃等死 2024-10-11 08:05:40

如果您的两台服务器不是相同的操作系统,则换行符可能存在差异

http:// /en.wikipedia.org/wiki/Newline

If your two servers are not both the same OS, it is possible that there is a difference in newline characters

http://en.wikipedia.org/wiki/Newline

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文