I am learning SQL Deverloper and am using it in a University environment as well as Oracle test instances at Oracle.
I know my way around SQL some but I am just learning PL/SQL. I want to run an anonymous block and see output for the "dbms_output.put_line" items.
At school, I enter my block in the "SQL Worksheet" and receive the "anonymous block completed" in the "Script Output" screen. Then there is a 3rd screen, the name of which I cannot remember, but I believe it is the equivalent of "server output". When I open it I have to tell it which database I'm using. Then, I see the dbms output lines in this 3rd section.
The problem is when I am using SQL Developer at work, I see only 2 sections: "SQL Worksheet" and "Script Output".
I have looked but cannot find an option or a button or a window that is called something like "server output" or "view server output."
Can a more experienced user please help me?
I am using:
SQL Developer Version 3.1.07
There are no changes of which I am aware in the Dbms_Output view functionality between the 3.2 and 4.0 releases.
As to your point about confusion, keep in mind the following:
1. Each Worksheet tab and Dbms_Output tab include the name of the connection in use. Match on that name when checking output results.
2. Opening multiple Worksheets on the same connection name will share one database connection by default.
3. Multiple Worksheets sharing a database connection also share one Dbms_Output tab. That is by design.
To force worksheets to use unshared connections:
4. Change the default behavior of (2) via Tools -> Preferences -> Database -> Worksheet -> New Worksheet to use unshared connection.
5. Or avoid (4's) overhead of always using unshared connections by opening one-off unshared Worksheets: Ctrl + Shift + N from a shared Worksheet.
6. When using unshared Worksheets, one Dbms_Output tab may be opened per unshared Worksheet. Note that the names of any unshared Worksheets will appear in Dbms_Output's Select Connection dialog drop down list. That should avoid any confusion.
Hope this helps,
Thanks for all the information. I prefer unshared connections so it's good to know I can make them the default.
I suppose I think of the connection as being the "parent", and the individual worksheets/outputs as "children" of that connection. Maybe I've been conditioned by using a different tool in the past, but I feel it would be more intuitive if each connection had a window, and all worksheets/etc for the connection were tabs of that window.