Sie sind auf Seite 1von 5

** Listing the different directories available to me.

I'll be running the jobs


** with an account that has DBA authorities so I don't have to worry about permi
ssions.
** You must either specify a directory, or use the default one (DATA_PUMP_DIR) t
hat
** is created by Oracle during installation. I'll use the default one. That wa
y I
** won't have to hardcode a directory on my Data Pump command line.
SQL> r
1* select directory_name, directory_path from dba_directories
DIRECTORY_NAME DIRECTORY_PATH
--------------- -------------------------------------------------------------
SUBDIR /app/oracle/product/10.2/db/demo/schema/order_entry//2002/Sep
XMLDIR /app/oracle/product/10.2/db/demo/schema/order_entry/
MEDIA_DIR /app/oracle/product/10.2/db/demo/schema/product_media/
LOG_FILE_DIR /app/oracle/product/10.2/db/demo/schema/log/
WORK_DIR /ade/aime_10.2_lnx_push/oracle/work
DATA_FILE_DIR /app/oracle/product/10.2/db/demo/schema/sales_history/
DATA_PUMP_DIR /app/oracle/product/10.2/db/admin/ctitst/dpdump/
ADMIN_DIR /ade/aime_10.2_lnx_push/oracle/md/admin

** Running a Data Pump Export. Account is foot, password iS foot,


** output file is expfull.dmp, logfile is expfull.log and it is a full
** database export. Since I'm using the default Data Pump Directory,
** I won't have to specify it on the command line.

$ expdp foot/foot dumpfile=expfull.dmp logfile=expfull.log full=y

** Data Pump responds back to the client with the traditional utility
** processing messages.

Export: Release 10.2.0.1.0 - Production on Thursday, 18 May, 2006 6:46:27


Copyright (c) 2003, 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
Starting "FOOT"."SYS_EXPORT_FULL_01": foot/******** dumpfile=expfull.dmp logfil
e=expfull.log full=y
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
ORA-39139: Data Pump does not support XMLSchema objects. TABLE_DATA:"OE"."PURCHA
SEORDER" will be skipped.
Total estimation using BLOCKS method: 59.37 MB
Processing object type DATABASE_EXPORT/TABLESPACE
Processing object type DATABASE_EXPORT/PROFILE
Processing object type DATABASE_EXPORT/SYS_USER/USER
Processing object type DATABASE_EXPORT/SCHEMA/USER
Processing object type DATABASE_EXPORT/ROLE
Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT
<CTL C>

** OK, here is where I hit CONTROL-C to break out of the client session.
** The Data Pump Export continues to run. It displays the prompt below:
Export>

** I typed in EXIT to disconnect from the client session and return to the
** Operating System.
Export> exit

** I created another session to the database and started another Data Pump Expor
t.
** I created a third session and activated SQL*PLUS to select from DBA_DATAPUMP_
JOBS.
** Notice that I still have a client attached to my second Export. The first on
e
** that I broke out of is still running but shows no attached (connected) sessio
ns.
1* select * from dba_datapump_jobs
OWNER JOB_NAME OPERATION JOB_MODE STATE DEGREE ATTACHE
D_SESSIONS DATAPUMP_SESSIONS
----- ------------------------- ---------- ---------- ----------- ------ -------
---------- -----------------
FOOT SYS_EXPORT_FULL_01 EXPORT FULL EXECUTING 1
0 2
FOOT SYS_EXPORT_SCHEMA_01 EXPORT SCHEMA EXECUTING 1
1 3

** I am attaching back to the first Export using the default job name that Oracl
e supplied. I can
** also choose to name the job when I first submit it.
$ expdp foot/foot attach=SYS_EXPORT_FULL_01
** Data Pump responds by giving me a status

Export: Release 10.2.0.1.0 - Production on Thursday, 18 May, 2006 6:48:13


Copyright (c) 2003, 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
Job: SYS_EXPORT_FULL_01
Owner: FOOT
Operation: EXPORT
Creator Privs: FALSE
GUID: 140DBFFB575BF0CFE0400A0A2D0A612A
Start Time: Thursday, 18 May, 2006 6:46:35
Mode: FULL
Instance: ctitst
Max Parallelism: 1
EXPORT Job Parameters:
Parameter Name Parameter Value:
CLIENT_COMMAND foot/******** dumpfile=expfull.dmp logfile=expfull.log f
ull=y
State: EXECUTING
Bytes Processed: 0
Current Parallelism: 1
Job Error Count: 0
Dump File: /app/oracle/product/10.2/db/admin/ctitst/dpdump/expfull.dmp
bytes written: 4,096
Worker 1 Status:
State: EXECUTING
Object Schema: BI
Object Name: SALES
Object Type: DATABASE_EXPORT/SCHEMA/SYNONYM
Completed Objects: 22
Total Objects: 22
Worker Parallelism: 1

** I can also manually enter a STATUS command at any time to see the status of
the job.
** Note that I only have one worker executing.
Export>
Export> status
Job: SYS_EXPORT_FULL_01
Operation: EXPORT
Mode: FULL
State: EXECUTING
Bytes Processed: 0
Current Parallelism: 1
Job Error Count: 0
Dump File: /app/oracle/product/10.2/db/admin/ctitst/dpdump/expfull.dmp
bytes written: 4,096
Worker 1 Status:
State: EXECUTING
Object Schema: SYSMAN
Object Name: MGMT_DB_FEATUREUSAGE
Object Type: DATABASE_EXPORT/SCHEMA/TABLE/TABLE
Completed Objects: 471
Worker Parallelism: 1
Export>

** I can use the PARALLEL command line parameter to dynamically change the job's
number of
** parallel processes.
Export> parallel=2

** Executing another STATUS command to confirm if the job is indeed using parall
el workers.
** We can see two workers are now running and the Current Parallelism indicator
is now 2.
Export> status
Job: SYS_EXPORT_FULL_01
Operation: EXPORT
Mode: FULL
State: EXECUTING
Bytes Processed: 48,674,768
Percent Done: 72
Current Parallelism: 2
Job Error Count: 0
Dump File: /app/oracle/product/10.2/db/admin/ctitst/dpdump/expfull.dmp
bytes written: 54,796,288
Worker 1 Status:
State: EXECUTING
Object Schema: SYSMAN
Object Name: MGMT_HC_HARDWARE_MASTER
Object Type: DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Completed Objects: 55
Total Objects: 626

Worker 2 Status:
State: EXECUTING
Object Schema: SH
Object Name: COSTS
Object Type: DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Completed Objects: 24
Total Objects: 626

** Going back to my SQL*PLUS session to see if we have additional workers.

SQL> select * from dba_datapump_sessions;


OWNER JOB_NAME SADDR SESSION_TYPE
----- ------------------------- -------- --------------
FOOT SYS_EXPORT_FULL_01 29EFE64C DBMS_DATAPUMP
FOOT SYS_EXPORT_FULL_01 29EEBB0C MASTER
FOOT SYS_EXPORT_FULL_01 29EECDC0 WORKER

** Attempting to attach again. Data Pump can't find the job because it is compl
ete.

$ expdp foot/foot attach=SYS_EXPORT_FULL_01


Export: Release 10.2.0.1.0 - Production on Thursday, 18 May, 2006 6:54:56
Copyright (c) 2003, 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
ORA-31626: job does not exist
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.KUPV$FT", line 430
ORA-31638: cannot attach to job SYS_EXPORT_FULL_01 for user FOOT
ORA-31632: master table "FOOT.SYS_EXPORT_FULL_01" not found, invalid, or inacces
sible
ORA-00942: table or view does not exist

Das könnte Ihnen auch gefallen