exp / imp some table in Oracle

How can I export / Import some table in Oracle on command prompt

C:\Documents and Settings\david>exp ods0_mart_postpaid/ods0_mart_postpaid@cognos file=dim_region.dmp tables=dim_region log=dim_region.log

Export: Release 10.2.0.1.0 – Production on Mon Jul 5 17:12:42 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production With the Partitioning, OLAP and Data Mining options Export done in WE8MSWIN1252 character set and UTF8 NCHAR

character set server uses AL32UTF8 character set (possible charset conversion)

About to export specified tables via Conventional Path …
. . exporting table DIM_REGION 2 rows exported
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.

C:\Documents and Settings\david>sqlplus ods0_mart_postpaid

SQL*Plus: Release 10.2.0.1.0 – Production on Mon Jul 5 17:19:18 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options

SQL> drop table dim_region;

Table dropped.

SQL> select * from dim_region;
select * from dim_region
*
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production With the Partitioning, OLAP and Data Mining options

C:\Documents and Settings\david>imp ods0_mart_postpaid/ods0_mart_postpaid@cognos fromuser=ods0_mart_postpaid touser=ods0_mart_postpaid file=dim_region.dmp log=dim_region.imp.log

Import: Release 10.2.0.1.0 – Production on Mon Jul 5 17:25:30 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Produc
tion With the Partitioning, OLAP and Data Mining options

Export file created by EXPORT:V10.02.01 via conventional path import done in WE8MSWIN1252 character set and UTF8 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
. importing ODS0_MART_POSTPAID’s objects into ODS0_MART_POSTPAID
. . importing table “DIM_REGION” 2 rows imported
Import terminated successfully without warnings.

C:\Documents and Settings\david>sqlplus ods0_mart_postpaid

SQL*Plus: Release 10.2.0.1.0 – Production on Mon Jul 5 17:27:24 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production With the Partitioning, OLAP and Data Mining options

SQL> select * from dim_region;

DATE_CREA DATE_MODI EV_TYPE REGION
——— ——— ———- ——
CITY_NAME
————————————————–
PROVINCE
————————————————–
SUB_REGION
——————————————————————————–
29-SEP-09 99999
N/A
N/A
N/A

DATE_CREA DATE_MODI EV_TYPE REGION
——— ——— ———- ——
CITY_NAME
————————————————–
PROVINCE
————————————————–
SUB_REGION
——————————————————————————–
0001
Jakarta
Jabodetabek
JABODETABEK

SQL>

Advertisements

About davidand

Hi, welcome to my blogs. My name is David Andriansyah. I am currently working as an independent Cognos Business Intelligence consultant, and I also as Freelance Web Developer. View all posts by davidand

3 responses to “exp / imp some table in Oracle

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: