Oracle Database import .sql file by command prompt

别说谁变了你拦得住时间么 提交于 2019-12-09 15:39:42

问题


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


回答1:


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



回答2:


Try to use sqlplus:

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

More information.




回答3:


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




回答4:


You can also export the SQLPATH environment variable (colon separated list of directories) for common scripts you don't want to bang out/tab complete the full path every time.



来源:https://stackoverflow.com/questions/17723152/oracle-database-import-sql-file-by-command-prompt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!