Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要访问远程应用程序的数据库。并每天跟踪数据的修改。此外,所有表都没有时间戳字段,我也不允许使用触发器。如何才能做到这一点?
通常表有一个主键,就像一个索引。定期运行脚本(每天),例如
show tables
运行类似的算法
file = "yyyy-mm-dd-" // todays file for table in ListOfTables { echo TABLE table >> file query('SELECT * FROM table ORDER BY PRIMARY KEY') >> file }
在今天的文件和昨天的文件之间做一个diff(linux)以获得更改列表。
diff