Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run .sql file in Oracle SQL developer tool to import database?

I have exported database from Oracle SQL developer tool into .sql file. Now I want to run this file which is of size 500+ MB.

I read about running scripts here, but I didn't understand the way. Is there any command or query by which we can run this sql script by providing path?

like image 308
Madhusudan Avatar asked Jul 22 '15 10:07

Madhusudan


People also ask

How do I import SQL data into SQL Developer?

In order to access the Data Pump Import Wizard in SQL Developer, first, display the DBA window from the View menu. Add the connection to the ADW database to import into. Then under that connection, navigate down to Data Pump -> Import Jobs. Right-click and select the Run Data Import Wizard.


2 Answers

You could execute the .sql file as a script in the SQL Developer worksheet. Either use the Run Script icon, or simply press F5.

enter image description here

For example,

@path\script.sql; 

Remember, you need to put @ as shown above.

But, if you have exported the database using database export utility of SQL Developer, then you should use the Import utility. Follow the steps mentioned here Importing and Exporting using the Oracle SQL Developer 3.0

like image 93
Lalit Kumar B Avatar answered Oct 03 '22 06:10

Lalit Kumar B


You need to Open the SQL Developer first and then click on File option and browse to the location where your .sql is placed. Once you are at the location where file is placed double click on it, this will get the file open in SQL Developer. Now select all of the content of file (CTRL + A) and press F9 key. Just make sure there is a commit statement at the end of the .sql script so that the changes are persisted in the database

like image 45
Sandeep Avatar answered Oct 03 '22 06:10

Sandeep