使用CTL从oracle导入到mysql
如何使用 CTL 文件(使用 Toad for oracle 生成)将数据从 oracle 数据库导入到 mysql 数据库? 预先感谢 安德里亚
how can i import data from an oracle database to a mysql database by using CTL file (generate with Toad for oracle)?
Thank in advance
Andrea
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CTL 文件似乎暗示您正在尝试使用 SQLLoader 加载数据。 不过,SQLLoader 是一个特定于 Oracle 的工具。 它只支持将数据加载到Oracle中,不具备将数据加载到MySQL中的功能。 所以我怀疑 Toad 生成的控制文件是否有用。
但是,如果您有一个控制文件,则意味着您有一个要加载的平面数据文件(即数据库中每个表的逗号分隔或制表符分隔的数据平面文件)。 是这样吗? 如果是这样,那么几乎每个数据库都有用于导入平面文件的实用程序。 我不是 MySQL 专家,但我认为 MySQL 有这样的实用程序。 当然,您也可以相对轻松地编写一个小型应用程序来使用您熟悉的任何语言来完成加载。
A CTL file would seem to imply that you were trying to use SQLLoader to load the data. SQLLoader, though, is an Oracle-specific tool. It only supports loading data into Oracle, it does not have functionality to load data into MySQL. So I doubt that the control file that Toad generated would be useful.
If you have a control file, though, that would imply that you had a flat file of data to load (i.e. a comma-separated or tab-separated flat file of data for each table in the database). Is that the case? If so, just about every database out there has utilities for importing flat files. I'm no MySQL expert, but I assume MySQL has such a utility. Of course, you could also relatively easily write a small application to do the load in whatever language you're familiar with.