Hi,
We are struggling a little bit with using a database link in a dynamic sql section in a procedure.
v_sql := 'CREATE TABLE ' || v_target_schema ||'.'|| v_tbl_prefix || v_table_name ||' AS SELECT * FROM '|| v_source_schema ||'@'|| v_db_link ||'.'|| p_table_name;
EXECUTE IMMEDIATE v_sql;
ORA-02019: connection description for remote database not found
The db_link is public and the remote database can be accessed.
We believe that the issue could be with the '@' sign and the single quotes.
Help greatly appreciated. Thanks!