Oracle exp export with full tns-string

Handling the oracle tns-names file can be a pain in the ass, especially if you don’t want to rely on it. For example you want a user to enter dynamically a connection with typical “host, port, sid, username, password” configuration. In oracle you can also use the full tns-string to connect to a database. I struggled some time finding the correct escape and quotation configuration, but finally this worked:

(if the line is too long to fit in the browser window mark it completely (double-click) and copy&paste it in your favourite editor)

exp userid=\'sys/yourpw@\(DESCRIPTION\=\(ADDRESS_LIST\=\(ADDRESS\=\(PROTOCOL\=TCP\)\(Host\=\)\(Port\=1521\)\)\)\(CONNECT_DATA\=\(SID\=xe\)\)\) as sysdba\' file=/tmp/testexp.dmp full=y


pixelstats trackingpixel

Leave a comment

Your comment

Time limit is exhausted. Please reload the CAPTCHA.