How to export the table data (this table having 18 million
records) to .csv file. Please tell me is there any faster
way to export the data.
Answers were Sorted based on User's Feedback
Answer / piyush shobhane
Here, You can use TOAD utility.
Heat the query...
After result is populated in tables below make save as
Option: EXCEL FILE
Format: CSV file
It will automatically starts saving files upto the last
record. Get Toad and u will done...
Piyush
| Is This Answer Correct ? | 13 Yes | 1 No |
Answer / maumita bandyopadhyay
We can use External table to extract data from data base
to .csv file. External table of TYPE ORACLE_DATAPUMP will
do.
Syntax is:
CREATE TABLE <ext_table_name>
ORGANISED EXTERNALLY
(
TYPE ORACLE_DATAPUMP
DEFAULT DIRECTORY <directory_name>
LOCATION <filename.dat>
)
AS SELECT * FROM <internal_table_name>
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / kiran penujuri
We have one very good oracle utility called EXPORT
Exporting of ORACLE database objects is controlled by
parameters.
To get familiar with EXPORT parameters type:
exp help=y
You will get a short description and the default settings
will be shown.
The EXPORT utility may be used in three ways:
Interactive dialogue
Simply type exp. You will be prompted for your ORACLE
userid, password. All other prompts answer by pressing the
return key. This is the easiest way to export all data you
stored in the ORALE database. You may assign other values
than the defaults to the parameters but in most cases it is
unnecessary.
Controlled through bypassed parameters
You may bypass parameters when you export data from the
database. Type:
exp <userid/password>
<parameter>=<value>,<parameter>=<value>,...
Example of exporting scott's tables EMP and DEPT to file
empdept.expdat and storing all messages to file empdept.log:
exp scott/tiger file=empdept.expdat tables=(EMP,DEPT)
log=empdept.log
Parameterfile controlled
Instead of typing the parameters on the commandline you may
use a parameter file where the parameters are stored. The
syntax for this method is: exp <userid/password>
parfile=<filename>
Do not ignore warnings and messages! Look at your logfile
and repeat EXPORT until you get messages like:
About to export specified tables ...
. exporting table EMP 14
rows exported
. exporting table DEPT 4
rows exported
Export terminated successfully without warnings.
\
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / kiran vangeti
Hi Aryasen,
Thanks for your answer. But when exporting the data from
SQL Developer for 18 million records it is taking too long
time to complete. is there any other way to complete this
task with out SQL Developer and PL/SQL developer.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / aryasen vaikom
If you are using SQLDEVELOPER there is one option to export
data into csv file.
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / aryasen vaikom
Hi Kiran,
pls go through the below link.
http://www.simple-talk.com/sql/database-administration/creating-csv-files-using-bcp-and-stored-procedures/
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / vellai
Hi,
In oracle,We have SQL loader utility tool. You can use that
utility with out creating index and referencial constraint.
thereafter you can see 18 million records are loaded within
a hour into database.
Thank you
Vellai
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / kiran kumar vangeti
Hi Vellai,
From SQL loader, we are going to insert the data in to
database. But my concern is i need to export the data from
database to .csv file.
| Is This Answer Correct ? | 0 Yes | 3 No |
what is the difference between delete and truncate statement in sql? : Sql dba
I want to display the employees who have joined in last two months. (It should be executed randomly means If I execute the query in March it should display Jan and Feb joined employees. Same query if i execute in Feb, 2007 it should display dec, 2006 and jan 2007 joined employees.
What is a table?
Can we edit a view in sql?
What are %type and %rowtype for?
How to add a column ‘salary’ to a table employee_details?
which will default fire first statement level trigger or row level trigger
2 Answers Cap Gemini, Data Vision,
How do we tune the code?
How many sql are there?
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba
Which command is used to call a stored procedure?
What is primary key secondary key alternate key candidate key?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)