Oracle Database import .sql file by command prompt

2019-04-05 10:51发布

I want to import .sql file in Oracle by command prompt so please tell me that command to import .sql file in oracle in MYSQL I am using it like this

mysql -u root -p -h localhost softpoint < D:\Nisarg\NEult\softpoint.sql 

but In Oracle I don't know how to use this utility so please help me

Thanks

3条回答
forever°为你锁心
2楼-- · 2019-04-05 11:07

Try to use sqlplus:

  sqlplus user/password@connect @/Nisarg/NEult/softpoint.sql

More information.

查看更多
一夜七次
3楼-- · 2019-04-05 11:18

In Oracle, to run a script (.sql) you use SQLPLUS command line utility.

c:\> sqlplus user_name/user_password@connect_string @path\your_sql.sql
查看更多
欢心
4楼-- · 2019-04-05 11:27

It's worth knowing you can have a space between @ and the input file, which enables the use of the tab key auto completion.

查看更多
登录 后发表回答