how to export PDB tables with SYS user with out password.
I want to export tables under a specific schema using SYS user with out password.
I have created a par file as below:
directory=EXPDP_REFRESH
dumpfile=CLIENT_TABLE.DMP
schemas=TEST
CONTENT=ALL
NOLOGFILE=Y
include=table:"in('ABCD','DEFG','HIJK','LMNO')"
$export ORACLE_PDB_SID=<PDB_NAME>;
$expdp \"/ as sysdba\" parfile=client_export.par
Above script works fine at 19.15 version but does not work on 19.18 DB version.
please provide any alternate solution.
That's because its undocumented and unsupported to my knowledge.
As per Mike's post,
https://mikedietrichde.com/2020/05/07/can-you-connect-as-sysdba-without-password-into-a-pdb-directly/, there was always going to be a risk that you would end up with a change or issues as time went on.
Also, you're not meant to dump as SYS as per the best practices
https://www.oracle.com/a/ocom/docs/oracle-data-pump-best-practices.pdf But having said that - it still works fine for me in 19.18, so its not a version thing - you must have changed a configuration somewhere
[oracle@db19 ~]$ export ORACLE_PDB_SID=PDB1
[oracle@db19 ~]$ expdp \"/ as sysdba\" tables=scott.emp
Export: Release 19.0.0.0.0 - Production on Wed Apr 5 21:38:00 2023
Version 19.18.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "SYS"."SYS_EXPORT_TABLE_01": "/******** AS SYSDBA" tables=scott.emp
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/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
. . exported "SCOTT"."EMP" 8.773 KB 14 rows
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/admin/db192/dpdump/823B94BC877B18D5E053B601A8C0020F/expdat.dmp
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at Wed Apr 5 21:38:20 2023 elapsed 0 00:00:20