To export a remote oracle DB we can use an alias from
tnsnames.ora, or provide a connection string in a similar format :
Note that this requires the service name of the database, which might not be the same as the SID. We can get the services by running
lsnrctl services on the remote server or by querying the
v$parameter view , or by asking the DBA for the remote server.
The connection options are the same as for any other tool, so if we can connect to the remote database using SQL*Plus then we can use the same connect string for
If you’re using
@database to connect to a local instance then that is probably already defined in your
tnsnames.ora, and you could add entries for the remote database there too.
Also, if you’re not still on an old version (pre-10g), you should use datapump (
expdp) rather than the old