在另一个系统上重新创建数据库架构

时间:2022-05-13 12:58:15

I have access to a remote Oracle database with a schema consisting of may tables but no data. I'd like to recreate this schema on my local database system for testing purpose. How would I go about this? Are there any utilities that can help with this?

我可以访问远程Oracle数据库,其中的模式由may表组成,但没有数据。我想在我的本地数据库系统上重新创建此模式以进行测试。我怎么会这样呢?有没有可以帮助解决这个问题的实用工具?

Also, if the 2 Oracle database versions are different would that be a cause of any concern?

此外,如果2个Oracle数据库版本不同,那会引起任何担忧吗?

3 个解决方案

#1


2  

Use exp to export it, and imp to import it.

使用exp导出它,并使用imp导入它。

#2


1  

As Paul stated, use exp/imp to perform the operation.

正如Paul所说,使用exp / imp来执行操作。

As for your question concerning different DB versions, yes, this is a possible concern. I assume you're copying the schema from an older version to a newer one? Make sure you use the exp utility for the older database, as imp is backward compatible. You might run into problems trying to go from a newer version to an older one, as you'd have to use the exp utility from the older version on the newer DB, and that might be problematic.

至于你关于不同数据库版本的问题,是的,这可能是一个问题。我假设您正在将架构从旧版本复制到较新版本?确保对旧数据库使用exp实用程序,因为imp是向后兼容的。尝试从较新版本转换到较旧版本时可能会遇到问题,因为您必须在较新版本的DB上使用旧版本的exp实用程序,这可能会有问题。

#3


0  

As stated, exp/imp will work and these should already be on your machine. I just wanted to add that if you use any third party tools (for example, I use TOAD) your tool might contain some common operations such as "Compare Schemas" or "Create Sync Script" etc.

如上所述,exp / imp将起作用,这些应该已经在您的机器上。我只是想补充说,如果你使用任何第三方工具(例如,我使用TOAD),你的工具可能包含一些常见的操作,如“比较模式”或“创建同步脚本”等。

#1


2  

Use exp to export it, and imp to import it.

使用exp导出它,并使用imp导入它。

#2


1  

As Paul stated, use exp/imp to perform the operation.

正如Paul所说,使用exp / imp来执行操作。

As for your question concerning different DB versions, yes, this is a possible concern. I assume you're copying the schema from an older version to a newer one? Make sure you use the exp utility for the older database, as imp is backward compatible. You might run into problems trying to go from a newer version to an older one, as you'd have to use the exp utility from the older version on the newer DB, and that might be problematic.

至于你关于不同数据库版本的问题,是的,这可能是一个问题。我假设您正在将架构从旧版本复制到较新版本?确保对旧数据库使用exp实用程序,因为imp是向后兼容的。尝试从较新版本转换到较旧版本时可能会遇到问题,因为您必须在较新版本的DB上使用旧版本的exp实用程序,这可能会有问题。

#3


0  

As stated, exp/imp will work and these should already be on your machine. I just wanted to add that if you use any third party tools (for example, I use TOAD) your tool might contain some common operations such as "Compare Schemas" or "Create Sync Script" etc.

如上所述,exp / imp将起作用,这些应该已经在您的机器上。我只是想补充说,如果你使用任何第三方工具(例如,我使用TOAD),你的工具可能包含一些常见的操作,如“比较模式”或“创建同步脚本”等。