I am going to unload the data from my table in Oracle DB to a file using oracle datapump. I am aware that I can import the file in to a different DB using datapump but would like to know if there is any other way to import or open the file?
i.e After the file is generated, I am going to send the file to my client who has no idea about Oracle DB etc. So is there any software or UI using which my client can open the file rather than using Oracle datapump to import (if no other go I will educate the client)? The reason I am going for external table etc because I have 50 million records that client wants to view.
Related
I want to export below things from SQL developer
1-Only schema (tables structure)
2-Only data in excel form
3-Schema with data
after exporting this i want to import the same to the another database
So what steps should i follow for export and import?
I can not use DATA PUMP as i don't have DBA privilege
As you use Oracle 11g, I'd suggest you to forget about SQL Developer and use the original EXP and IMP utilities. Doing so, you'd avoid DBA-related-problems as these utilities don't require access to the directory (an Oracle object which points to (usually database server's) filesystem directory, and - in order to be able to use it - you'd need to have read/write privileges on it).
So - if you don't already have these, install Oracle Client which contains EXP/IMP and use them.
I wish to restore Oracle database from .dmp file.
When I try to import this file it doesn't replace current data.
The suggestion on forum is to drop user/schema and then import .dmp.
But I don't want to do it because everything is working under System user.
So if I drop system user i'll lose access to database management.
Any ideas how to import .dmp file and replace current data ?
If you are using datapump, I think you will have to consider parameter TABLE_EXISTS_ACTION
It seems you can use TABLE_EXISTS_ACTION=REPLACE to suits your need but be careful if there are SYSTEM tables in your dump file, better target the tables where you want to replace data using the TABLES=... clause.
P.S. This way you can refresh the tables and their data exactly, but unfortunately not possible to refresh the other existing objects such as functions, procedures, packages ... etc. without dropping and recreating them through datapump import.
I have a dump from a database in a csv format ('|' character as the delimiter), and I want to import that into a remote Oracle database. I am using AWS and the csv is on an EC2 instance running amazon linux, and the remote Oracle database is an RDS instance. This is the first time I'm touching an Oracle database.
I expected this to be fairly simple, but trying to find info I kind of got lost. Some people say to use SQL*Loader, but I can't manage to even install that thing. Other's say that SQL*Loader is not supposed to even be installed on something that isn't the actual database server. So far I've only managed to install sqlplus and connect to the database, but no importing so far.
Basically I'm looking for an equivalent of \COPY in psql, but for Oracle. And how on earth would I use it in this context.
If you don't want to use SQL*Loader and only need to import CSV as a one time task, I would recommend using SQL Developer. If you want an automated process, SQL*Loader would probably be your best bet.
Here are some links (note that an Excel import and a CSV import are nearly identical):
How to move csv file into oracle database using sql developer? [closed]
How to Import from Excel to a New Oracle Table with SQL Developer
How to Import from Excel to Oracle with SQL Developer
How to import data using codes in SQLDEV?
I don't want to do it manually. I want to know if there's a way to import from a .csv file using codes.
The code executed in SQL DEVELOPER run on DMBS(your Oracle instalation, the server).
The IDE take your comands(click on schema browser, filters, etc) and transfrom them into commands to the server.
So, you have only Oracle code (SQL and PL/SQL(and Java, etc)) that runs on Server, you don't have code that runs in SQL Developer.
Importing a table can be done:
Using the wizard from IDE (click on table and then choose import)
Using the sqlloader on a Oracle client.
Using External Tables on Server side.
I don't have time to write a perl or anything like that nor do I have admin access to the back end, so how can I get data from a file on the intranet (http://) and parse it to create a table? Maybe somehow via PL/SQL? Keep in mind I don't have much admin access.
If you want it to be completely automated
You can use the UTL_HTTP package to retrieve the data from the HTTP server
You can either parse the CSV response yourself using INSTR and SUBSTR or you can use the UTL_FILE package to write the data to a file on the database server file system and then create an external table that parses the CSV file you just created.
You can then insert the parsed data into a table you've already created (I'm assuming that the CSV data is in the same format each time).
You can use the DBMS_SCHEDULER or DBMS_JOB package to schedule the job
The Oracle database account you're using will need to be granted access to all of these packages.
You may download the file into your host machine and then use SQL*Loader to populate a table.
Other ways there are some wizards that may be easier than SQL*Loader, if you are using IDEs like PLSQLDeveloper(Tools->Text Importer) or SQLDeveloper(right click on Tables-> Import Data).
Create an external table that references your CSV file. That means you can run select statements on the file from within Oracle.