导出oracle数据库(创建数据的.sql文件) [英] exporting oracle database (creating a .sql file of data )

查看:99
本文介绍了导出oracle数据库(创建数据的.sql文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一台PC上有一个Oracle数据库.我必须将其迁移到其他PC上.两者都使用单独的oracle安装.现在如何从一台PC导出它,然后将其导入另一台PC?

I have an Oracle database on one PC. I have to migrate it to my other PC. Both use separate oracle installations. Now how can I export it from my one PC and then import it into other PC?

导出然后导入它的命令是什么?

What are the commands for exporting and then importing it?

我希望结构以及数据先导出然后再导入.我正在使用Oracle数据库.

I want structure as well as data to be exported and then imported. I am using Oracle db.

推荐答案

您可以从源数据库中导出数据,并将其导入到新数据库中.

You can export the data from your source database and import it into your new one.

此处

它可以归结为以下内容,以导出完整的数据库:

It boils down to something like the following for exporting a full database:

%> exp USERID=<username>/<password> FULL=Y FILE=dbExport.dmp
%> imp USERID=<username>/<password> FILE=dbExport.dmp FULL=Y

两个命令都有很多选项,可以根据您的需求进行调整.例如,可以将import命令限制为仅通过TABLES参数导入某些表,或者可以使用TOUSER和FROMUSER参数在用户之间移动数据库对象.还有关于导出还是导入约束,索引等的选项.您可以通过执行以下任一命令来找到这两个命令的所有有效参数:

There are a multitude of options for both commands to tailor it to your needs. For example, you can restrict the import command to only import certain tables via the TABLES parameter or you can move database object between users with TOUSER, FROMUSER parameters. There are also options on whether to export or import constraints, indexes, etc. You can find all the valid parameters for both commands by executing either:

%> exp help=Y
%> imp help=Y

这篇关于导出oracle数据库(创建数据的.sql文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆