Oracle uses expdp to migrate dblink (Tutorial), expdpdblink
To create a dblink, you must use the dblink owner to log on to the database and create it in the current mode. If you do not know the database user password, you cannot directly create dblink.
Therefore, using expdp to migrate dbkink is a very convenient and simple method.
You can use the following method to save the entire database's dblink to a dump file:
Expdp dumpfile = dblink. dmp directory = test full = y include = db_link userid = \ "/as sysdba \"
If you want to export the dblink in several modes:
Expdp dumpfile = dblink. dmp directory = test schemas = user1,... include = db_link userid = \ "/as sysdba \"
Export public dblink:
Expdp dumpfile = dblink. dmp directory = test full = y include = db_link: "IN (select db_link from dba_db_links where owner = 'public')" userid = \ "/as sysdba \"