create database link mylink connect to 用户名 identified by 密码 using 'DB.69LINK'; 运行如下,检查连接是否已经创建 select * from user_db_links 5.在存储过程中应用:
CREATE OR REPLACE PROCEDURE remoteaccess AS TYPE t_ReadUser IS REF CURSOR; v_CursorVar1 t_ReadUser; DECOUNT NUMBER(18); Begin SELECT * FROM 表明@mylink; 其他操作 dbms_output.put_line('END'); EXCEPTION WHEN OTHERS THEN dbms_output.put_line(SQLERRM); ROLLBACK; END; / SHOW ERRORS;