I would like to know the syntax to call datapump commands (expdp/impdp) logged as 'sys as sysdba' from a remote machine.
I know that when logged on the machine which runs the database, I can use :
expdp \"/ as sysdba\"
However, I cannot find how to do this from a remote machine, for example, these does not work :
expdp 'SYS@SID AS SYSDBA'
expdp "SYS AS SYSDBA"@SID
In both case, the error message is :
LRM-00108: invalid positional parameter value [...]
This works for me (10.2 and 11.1), but you need either to define service in your tnsnames.ora or to use proper SCAN. Generally, ORACLE_SID is a different identifier than TNS service, but for simplicity they often are administratively set to the same value.
I use IMPDMP as follows:
Impdp SYS@SYSDBA/45561602 SCHEMAS=PRUEBAS DIRECTORY=DATA_PUMP_DIR DUMPFILE=PRUEBAS.dmp remap_schema=PRUEBAS:TEST TABLE_EXISTS_ACTION=replace LOGFILE=impdmp.log