130313exp導出小測

 EXP-00030: Unexpected End-Of-File encountered while reading inputPS C:\Users\calvin> exp help=y

 
Export: Release 11.2.0.1.0 - Production on Tue Mar 19 13:01:50 2013
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
 
 
You can let Export prompt you for parameters by entering the EXP
command followed by your username/password:
 
     Example: EXP SCOTT/TIGER
 
Or, you can control how Export runs by entering the EXP command followed
by various arguments. To specify parameters, you use keywords:
 
     Format:  EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
     Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
               or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
 
USERID must be the first parameter on the command line.
 
Keyword    Description (Default)      Keyword      Description (Default)
--------------------------------------------------------------------------
USERID     username/password          FULL         export entire file (N)
BUFFER     size of data buffer        OWNER        list of owner usernames
FILE       output files (EXPDAT.DMP)  TABLES       list of table names
COMPRESS   import into one extent (Y) RECORDLENGTH length of IO record
GRANTS     export grants (Y)          INCTYPE      incremental export type
INDEXES    export indexes (Y)         RECORD       track incr. export (Y)
DIRECT     direct path (N)            TRIGGERS     export triggers (Y)
LOG        log file of screen output  STATISTICS   analyze objects (ESTIMATE)
ROWS       export data rows (Y)       PARFILE      parameter filename
CONSISTENT cross-table consistency(N) CONSTRAINTS  export constraints (Y)
 
OBJECT_CONSISTENT    transaction set to read only during object export (N)
FEEDBACK             display progress every x rows (0)
FILESIZE             maximum size of each dump file
FLASHBACK_SCN        SCN used to set session snapshot back to
FLASHBACK_TIME       time used to get the SCN closest to the specified time
QUERY                select clause used to export a subset of a table
RESUMABLE            suspend when a space related error is encountered(N)
RESUMABLE_NAME       text string used to identify resumable statement
RESUMABLE_TIMEOUT    wait time for RESUMABLE
TTS_FULL_CHECK       perform full or partial dependency check for TTS
TABLESPACES          list of tablespaces to export
TRANSPORT_TABLESPACE export transportable tablespace metadata (N)
TEMPLATE             template name which invokes iAS mode export
 
Export terminated successfully without warnings.
PS C:\Users\calvin> exp hr/123456@test
 
Export: Release 11.2.0.1.0 - Production on Tue Mar 19 13:02:08 2013
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
 
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
Enter array fetch buffer size: 4096 >
 
Export file: EXPDAT.DMP >
 
(2)U(sers), or (3)T(ables): (2)U >
 
Export grants (yes/no): yes >
 
Export table data (yes/no): yes >
 
Compress extents (yes/no): yes >
 
Export done in ZHS16GBK character set and UTF8 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user HR
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user HR
About to export HR's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export HR's tables via Conventional Path ...
. . exporting table                      COUNTRIES         25 rows exported
. . exporting table                     COUNTRIES1          3 rows exported
. . exporting table                    DEPARTMENTS         27 rows exported
. . exporting table                      EMPLOYEES        107 rows exported
. . exporting table                        INDTEST          1 rows exported
. . exporting table                       IOT_TEST          0 rows exported
. . exporting table                           JOBS         19 rows exported
. . exporting table                          JOBS1         14 rows exported
. . exporting table                    JOB_HISTORY         10 rows exported
. . exporting table                      LOCATIONS         23 rows exported
. . exporting table                     ORDER_ITEM          0 rows exported
. . exporting table                   ORDER_MASTER          0 rows exported
. . exporting table                         PHONES          0 rows exported
. . exporting table                        REGIONS          6 rows exported
. . exporting table                             T1          3 rows exported
. . exporting table                             T2       5000 rows exported
. . exporting table                          TEST1          1 rows exported
. . exporting table                       TEST_REC         39 rows exported
. . exporting table                       TMPTABLE          0 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
 
導出hr中的具體表
PS C:\Users\calvin> exp hr/123456@test file=emp_dept.dmp tables=hr.employees,hr.departments log=emp_dept.log
 
Export: Release 11.2.0.1.0 - Production on Tue Mar 19 13:18:14 2013
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
 
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
Export done in ZHS16GBK character set and UTF8 NCHAR character set
 
About to export specified tables via Conventional Path ...
. . exporting table                      EMPLOYEES        107 rows exported
. . exporting table                    DEPARTMENTS         27 rows exported
Export terminated successfully without warnings.
 
導出hr中的所有對象
PS C:\Users\calvin> exp system/123456@test file=hr.dmp owner=hr log=hr.log
 
Export: Release 11.2.0.1.0 - Production on Tue Mar 19 13:20:41 2013
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
 
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Product
Export done in ZHS16GBK character set and UTF8 NCHAR character set
 
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user HR
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user HR
About to export HR's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export HR's tables via Conventional Path ...
. . exporting table                      COUNTRIES         25 rows exported
. . exporting table                     COUNTRIES1          3 rows exported
. . exporting table                    DEPARTMENTS         27 rows exported
. . exporting table                      EMPLOYEES        107 rows exported
. . exporting table                        INDTEST          1 rows exported
. . exporting table                       IOT_TEST          0 rows exported
. . exporting table                           JOBS         19 rows exported
. . exporting table                          JOBS1         14 rows exported
. . exporting table                    JOB_HISTORY         10 rows exported
. . exporting table                      LOCATIONS         23 rows exported
. . exporting table                     ORDER_ITEM          0 rows exported
. . exporting table                   ORDER_MASTER          0 rows exported
. . exporting table                         PHONES          0 rows exported
. . exporting table                        REGIONS          6 rows exported
. . exporting table                             T1          3 rows exported
. . exporting table                             T2       5000 rows exported
. . exporting table                          TEST1          1 rows exported
. . exporting table                       TEST_REC         39 rows exported
. . exporting table                       TMPTABLE          0 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
PS C:\Users\calvin>
 
導出整個數據庫,將權限賦予hr用戶
PS C:\Users\calvin> sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 19 13:22:17 2013
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
 
13:22:17 SYS@TEST>grant exp_full_database to hr;
 
Grant succeeded.
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章