How to Run .SQL File in Oracle SQL Developer Tool to Import Database

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

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

Sample Image

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

How to run a SQL script in the SQL Developer?

Connect in SQL Developer.

Open a SQL Worksheet - we usually open one for you upon successful connection.

Put your code in.

Hit F5 or use the Execute as Script button.

Sample Image

We'll rip through your statements.

Sample Image

I talk about this more here.

How to import Oracle SQL Developer export dates using SQLPlus

Your SQL Developer and SQL*Plus sessions are set up differently; probably different locales, but the relevant part here is the NLS_NUMERIC_CHARACTERS setting in each environment, which is usually inherited form the territory.

Your to_date() format model uses X for the 'local radix character'. In SQL Developer that is a comma; in SQL*Plus it appears to be a period.

If you don't want to touch the statements, you can change your SQL*Plus session to match:

alter session set NLS_NUMERIC_CHARACTERS = ',.'

db<>fiddle showing the problem and fix.

Import Oracle .dmp file using SQL Developer

what was this another database? was it oracle database?
if yes
the dmp file can be file exported by

  1. DataPump expdp util and you need import it by using impdp util
  2. the file can be exported by exp util and you can import it by imp util
  3. how to use this DataPump utils via SQL Developer UI see here


Related Topics



Leave a reply



Submit