I didnt get the two lines, can you please specify, thank you
Main Topics
Browse All TopicsQ1: first thing i am not sure what is the difference between the "*.sql" file and the "*.dmp" file
Q2: Second what is the difference between
Export Table data vs
Export Table Script vs
Export TABLE AS FLAT FILE
Q3. Third diff btwn
IMPORT SOURCE FILE vs
IMPORT TABLE DATA
Q4. I want to import TABLES + DATA in tables using TOAD from one ORACLE DB to another ORACLE DB. My TNS entries are there and I am able to connect to both databases. So How do I do this now?:0(
Thank you (If you can mention the Question num, that will be great:)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
1)
.sql is a sql script file which has sql commands in it.
.dmp is the dump file created from oracle export. The definition of toad export is different from oracle export. Toad just extracts the sql and puts it in a dump file. Where Oracle export uses an oracle utility called 'exp' that exports all the contents of the database in a propreitory format. Ofcourse if you open it, all may see is the sql commands, but it is formatted in a way that oracle 'imp' utility can read it and the insert the data in another database.
2)
Export table data -> creates INSERT (sql) statements that can be run against an existing table to insert the data.
Export table script -> reengineers the table and create a sql command, which you can run against another database and create the table structure.
export table as flat file -> creates a ascii extract of the data (doesnot contain sql commands).
3)
import source file -> this function imports source code for procedures, functions, packages, triggers and/or views from files into the database.
IMPORT TABLE DATA -> will run the sql (INSERT) statements against the table you are intending to import the data into
4)
The most reliable way to transfer tables from one database to other is using oracle utilities exp/imp. oracle utilities will take care of any dependencies like constraints, indexes, grants etc.,. You can certainly do this with TOAD, but it is a pain in the ass. oracle executables do this in a snap.
'exp user1/pass@db1 file=userexport.dmp log=userexport.log'
'imp user2/pass@db2 file=userexport.dmp log=userimport.log fromuser=user1 touser=user2'
Since you have tnsnames configured on your machine, you will be able to run these commands on your pc.
Also look at this post for additional ways of copying data from one db to another.
http://www.experts-exchang
one more question. Thank you for the details appreciate it very much, I have a script like this one:
CREATE TABLE PRD
(
PRODUCT_INFO VARCHAR2(40 BYTE) NOT NULL,
NUM INTEGER NOT NULL,
PRD_ID VARCHAR2(40 BYTE) NOT NULL
)
TABLESPACE DWI
PC 40
PCEE 10
INIT 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MIN 1
MAXS 214xxxxx
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL
NOMONITORING;
I get error no tablespace exist. So if I create a table space named DWI, then run the above script. Also the tablespace entry is with all the table create scripts, and it is always the same entry, so why is it included with every create table script. thank you
This is the complete syntax for creating tables. When you use TOAD to extract the table scripts, you get every attribute of that table extracted into the script.
The database where you extracted this table script from has a tablespace by the name DWI, and incidentally all the tables scripts you pulled are located in that tablespace. So if you create that tablespace in your new database, you will be able run these scripts and create tables.
A database usually contains many tablespaces. And not all the tables are located in one tablespace. Sometimes each user has their own tablespace. There can also be many tablespace assigned to one single user. For example, you got some huge tables and some small tables. You have to categorize them based on the size and create them in 2 different tablespaces so they dont waste space. So if you pull table scripts for one small table and one huge table, then the script will have different tablespaces defined in them. I think you get the picture.
Business Accounts
Answer for Membership
by: RainMan82Posted on 2006-09-22 at 08:39:15ID: 17578357
insert into db1link.table
select * from db2link.table