在 Oracle 中导入 .sql 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13471150/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Import .sql file in Oracle?
提问by Naresh.P
I have .sql file. I need to import that to oracle 11g. .sql file contains ddl queries for all tables. How can i import .sql file to oracle 11g. I have sqldeveloper tool.
我有 .sql 文件。我需要将它导入到 oracle 11g。.sql 文件包含所有表的 ddl 查询。如何将 .sql 文件导入 oracle 11g。我有 sqldeveloper 工具。
Thanks in Advance.
提前致谢。
回答by J?cob
From SQL Developer or Toad
来自 SQL Developer 或 Toad
Open --> File --> /locationofyourfile/yourfile.sql.
Once you have the file opened in SQL Developer or Toad,
在 SQL Developer 或 Toad 中打开文件后,
execute by F5
执行者 F5
From SQLPlus
来自 SQLPlus
@/locationofyourfile/yourfile.sql
回答by Nandkishor Gokhe
@ Physical path of sql file. eg. If my file is on c: and file name is beckup.sql. Then command will be as follows(On console - sqlplus):
@sql 文件的物理路径。例如。如果我的文件在 c: 上并且文件名是 beckup.sql。然后命令如下(在控制台 - sqlplus):
@ c:\backup.sql
@ c:\backup.sql