How to import an Oracle DB .dmp file using DBeaver? - database

I'm currently trying to import an Oracle DB .dmp (dump) file into my Oracle DB using DBeaver but have trouble doing so.
The Oracle DB in question is running in a docker container. I successfully connected to this Oracle database with DBeaver, and can thus browse the database using DBeaver.
Currently however, the DB is empty. That's where the .dmp file comes in.
I want to import this .dmp file into my database, under a certain schema but I cannot seem to do this. The dump file looks something like this: 'export.dmp' and is around 16MB big.
I'd like to import the data from the .dmp file to be able to browse the data to get familiar with it, as similar data will be stored in our own database.
I looked online but was unable to get an answer that works for me.
I tried using DBeaver but I don't seem to have the option to import or restore a DB via a .dmp file. At best, DBeaver proposes to import data using a .CSV file. I also downloaded the Oracle tool SQLDeveloper, but I can't manage to connect to my database in the docker container.
Online there is also talk of an import / export tool that supposedly can create these .dmp files and import them, but I'm unsure how to get this tool and whether that is the way to do it.
If so, I still don't understand how I can get to browse the data in DBeaver.
How can I import and browse the data from the .dmp file in my Oracle DB using DBeaver?

How to find Oracle datapump dir
presumably set to /u01/app/oracle/admin/<mydatabase>/dpdump on your system
How to copy files from host to docker container
docker cp export.dmp container_id:/u01/app/oracle/admin/<mydatabase>/dpdump/export.dmp
How do I get into a Docker container's shell
docker exec -it <mycontainer> bash
How to import an Oracle database from dmp file
If it was exported using expdp, then start the import with impdp:
impdp <username>/<password> dumpfile=export.dmp full=y
It will output the log file in the same default DATA_PUMP_DIR directory in the container.

oracle has two utilities IMPORT and IMPDP to import dumps , with IMPORT you can't use database directories and you have to specify the location . The IMPDP on other hand require database directory .
having said that you can't import oracle export dumps using dbeaver , you have to use IMPORT or IMPDP utility from OS.

Related

Oracle: Dump file may be an Data Pump export dump file

I am trying to import data from Db dump
I have created a user 'user' and Granted following permissions:
CONNECT RESOURCE UNLIMITED TABLESPACE DBA ALL PRIVILEGES IMP_FULL_DATABASE
I am running the following command:
imp <user>/<password>#<server> touser=<user>
FILE=C:\App\<path>\admin\orcl\dpdump\EXPDAT.DMP full=y log=imp.log;
While running I am getting the following error message.
IMP-00401: dump file "C:\App\<path>\admin\orcl\dpdump\EXPDAT.DMP" may
be an Data Pump export dump file IMP-00000: Import terminated unsuccessfully
There are two import and export utilities.
One is client - server based, and is also deprecated. That would be IMPORT and EXPORT, shortened as IMP and EXP.
Data Pump is the 'new,' server based set of utilities - much more powerful and efficient at getting data in and out of your database.
You'll need to place your DMP file in a Database 'DIRECTORY' - these are known OS directories to the database, you can see them in the data dictionary via
SELECT * FROM ALL_DIRECTORIES
It's likely you already have a directory already defined just for data pump, look for something like 'DATA PUMP DIR'
Data Pump has a utility you can run from the OS, a PL/SQL API, and there is a Wizard in SQL Developer.
View > DBA menu.
Add a connection (not SYS), right-click on the Data Pump category, select Import Wizard...then walk the dialog.
We'll create and kick off the job for you, you can also watch the progress of the job and check for any errors.

Problem loading datapump to table with Oracle Data Integrator

how can i import to one data pump file to table in Oracle data integrator?
i have on local directory
i should read file(data Pump) from this directory
and import to table in oracle.
By Oracle Data Integrator How is it possible?
To import a dumpfile you must run the "impdp" command.
There are a few ways you can make ODI do that for you:
You can create a shell script file that calls the impdp with all necessary parameters and create an ODI package (using OdiOSCommand) that simply runs the shell script. For this to work your ODI agent must have access to the script and also to the database client (or the database home) so it can run impdp. (you can also use OdiOSCommand to run impdp directly)
The same idea from step 1 can be done using an ODI Procedure (if maybe the import is just part of a bigger integration flow)
ODI also has an LKM that uses Data Pump, but it is used to export a source table into a dumpfile and import it into a target database... If you have access to the source table metadata inside ODI Studio, you can create a simple mapping between source and target tables, choose to use the Data Pump LKM and simulate the execution. ODI will create all the necessary code to import the dumpfile

SQL Server - Command Line utility for exporting and importing of entire database

I am looking for a command line utility to export and import an entire SQL Server database. I am looking to automate the process of moving data from source database to destination database given the credentials.
This would be similar to exp and imp command for Oracle.
I have already looked at Bcp and SS import export wizard.
Would someone point to any such utility?
I haven't found one if it exists. I typically script up a power shell function like this one to serve the purpose.
export with power shell
You can then call the script from the command prompt and even add parameters to export by table, database etc.

Import DB2 files to SQL Server

Given the DAT file and the DDL file for each table in a DB2 database, can I import this data to SQL Server? I have no access to the original server or any copy of a DB2 server so connecting to a live instance isn't an option.
Can I do this without a live instance of DB2 or should I go back to the client and ask for CSV files? Is there a procedure or tool that makes this process smoother? I've tried to find a file-based connection string to use to connect to a set of DB2 files with no luck. I've also tried SwissSQLDB2ToSQLServer and SqlLinesData to see if they have a file-based option built in.
OK, given the comment above, you can't import DB2's container files (DAT, LRG, or anything else) directly. You need a CSV or equivalent. Yes, one way to get this is run the EXPORT utility on a live DB2 database. HTH!

import dump.sql file into postresql

I am new to PostgreSQL. I have a file name dump.sql. I want to import this into my POstgreSQL database. I created the database using CREATE database_name. Then I used psql database_name < /Downloads/web-task/dump.sql. After running this command it shows not output. I assume it did not import anything from dump.sql. How can I import this file into my PostgreSQL DB?
We have determined in chat that you were trying to import your dump.sql file from within the psql prompt, which obviously couldn't work... The data is now imported.

Resources