As I understand it, SQL Developer responds with "Source does not have a runnable target." if the program is having an error is has compilation error.
why dont you check :
1) whether your db link is working.
2) You have access to the given table
3) change the code if the previous two options are true
create or replace PROCEDURE TEST1
IS
cursor c1 is SELECT FNM FROM EMPL@DVLE.REGRESS.RDBMS.DE
BEGIN
FOR x in c1 Loop
dbms_output.put_line (x.FNM);
END LOOP;
END TEST1;
Main Topics
Browse All Topics





by: markgeerPosted on 2009-08-08 at 18:03:15ID: 25052328
Do you need a stored procedure, or could you simply execute the query: "SELECT FNM FROM EMPL@DVLE.REGRESS.RDBMS.DE V.US.ORACL E.COM"?
If you do need s stored procedure, are you sure that you want the DB link hard-coded in the procedure? It is often better to create a local synonym (like: EMPL) that refers to the remote object, then just use the synonym in the procedure. That way, if the remote object ever gets moved to a different database (or schema) or gets renamed, you can simply drop and recreate the synonym instead of having to change and recompile your procedure.
What business or application problem do you hope to solve with this procedure?
Note that DBMS_OUTPUT.PUT_LINE is a way to have PL\SQL display data to a screen when you run a PL\SQL procedure interactively, but this is not usually used for production deployments. Also, be aware that PL\SQL will cache the results and only display them all at once at the end of the block. They will *NOT* be displayed in real-time record by record as they are retrieved (unless you use a "pipelined" function approach, but that is different from your example here.
You indicate that you are new to Oracle. Do you have some SQL Server experience? If yes, be aware that Oracle and SQL Server are both "SQL compliant". That is: they use similar (or identical) syntax for the four basic SQL verbs; select, insert, update and delete. But beyond that they many have more differences than similarities!