14

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 [...]
Denis R.
  • 293
  • 1
  • 2
  • 6

2 Answers2

24
expdp \"SYS@service AS SYSDBA\"

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.

kubanczyk
  • 13,502
  • 5
  • 40
  • 55
  • 2
    Dear future readers: Using the `user/pass@db_link` format in the login may lead to a `UDE-00018: Data Pump client is incompatible with database version` message. To work around this, supply the database link via the `NETWORK_LINK` parameter instead. – Mr. Llama Dec 03 '14 at 19:04
  • as a note to everyone, please note the escaping of the double quotation marks. the backslashes fixed the problem for me – Peter Perháč Oct 20 '16 at 14:03
  • wow, how does this work? – Parv Sharma Sep 06 '18 at 00:37
0

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

chicks
  • 3,639
  • 10
  • 26
  • 36
Osvi
  • 1