Oracle expdp bash sh 通过 at 传递密码

Oracle expdp bash sh pass password with at

根据:

https://oracle-base.com/articles/10g/oracle-data-pump-10g#expdp

传递授权数据我们有模式:[用户]/[密码]@[sid]

如何使用at (@) 传递密码?这样就打破了模式,但行不通:

expdp scott/passw@rd@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

您始终可以使用引号来隔离那些有问题的部分。

expdp scott/"passw@rd"@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

应该可以。

引用如下:

expdp scott/\"passw@rd\"@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log