Chintan Gor
Chintan Gor

Reputation: 1072

Oracle Database import .sql file by command prompt

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

Upvotes: 11

Views: 43405

Answers (4)

kpanic
kpanic

Reputation: 1

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.

Upvotes: 0

Fabien Haddadi
Fabien Haddadi

Reputation: 2080

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

Upvotes: 2

Robert
Robert

Reputation: 25763

Try to use sqlplus:

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

More information.

Upvotes: 8

Nick Krasnov
Nick Krasnov

Reputation: 27261

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

Upvotes: 19

Related Questions