Exporting Remote Oracle Database when host and port address are provided

To export a remote oracle DB we can use an alias from tnsnames.ora, or provide a connection string in a similar format :

exp user/password@host:port/service_name

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 exp.

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 exp tool.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: