expdp as sysdba

Needed to export a table but was not given any login details only the oracle user so at least had sysdba privs (did not want to create another dba directory so just used the DATA_PUMP_DIR) - after a couple of goes found this to work. If anyone knows a better way please let me know. I could have used a procedure from another post but this seemed easiest solution.


[oracle]$ expdp \"/ as sysdba\"  directory=DATA_PUMP_DIR tables=FRM_MAIN.SETTINGS
Export: Release 12.2.0.1.0 - Production on Thu Jul 5 03:42:44 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYS"."SYS_EXPORT_TABLE_01":  "/******** AS SYSDBA" directory=DATA_PUMP_DIR tables=FRM_MAIN.SETTINGS
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
. . exported "FRM_MAIN"."SETTINGS"                       14.25 KB      56 rows
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TABLE_01 is:
  /u01/app/oracle/product/12.2.0/dbhome/rdbms/log/expdat.dmp
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 5 03:43:09 2018 elapsed 0 00:00:24


Please note when going from 12.2 to 12.1 use the VERSION=12.1 option on 12.2 otherwise the import will fail and it is not obvious why !!!

No comments:

Post a Comment