dbms_output.put_line prints nothing in SQL Developer version 18.1.0.095 - oracle-sqldeveloper

My database is:
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit
The company just gave me a new desktop with Windows 10. I installed SQL Developer version 18.1.0.095 Build 095.1630. Everything works fine except that dbms_output.put_line no longer prints anything. For example this simple script:
SET SERVEROUTPUT ON;
BEGIN
dbms_output.put_line('hola');
END;
simply gives me this:
Whereas on a Windows 7 Professional box, with SQL Developer version 4.2.0.17.089 Build 17.089.1709 connected to the same oracle instance, the exact same script does print out hola nicely. Look:
Also, Toad version 12.12.0.39 executes this script and prints out hola without an issue.
I see that one guy has the same problem with the same version of SQL Developer at here: https://www.thatjeffsmith.com/archive/2012/03/dbms_output-in-sql-developer/
Check the comment section.
Could this be a bug with version 18.1.0.095?

try the following
SET SERVEROUTPUT ON;
BEGIN...

The answer is here:
sqldeveloper - DBMS_OUTPUT.PUT_LINE() Doesn't Work
which says that SQL Developer 17 and above does not support Oracle 10g.
No wonder.
I've installed version 4.2, and now it's all good.

I'm using sql developer 18.x and the answer from one of the comment threads helped me.
Answer:go to View -> DBMS Output window,
Run the script,
view output in DBMS output window.

Related

Bad screen redrawing in Oracle SQL Developer after statment with error [duplicate]

I have a problem with Oracle SQL Developer. When I use it on a Windows Server 2003 machine, it works fine. When I use it on my Windows 7 desktop, I get a lot of redraw problems in the query results grid when I scroll either horizontally or vertically, like so:
Edit: ImageShack was the original image host for my screenshot, and it's no longer a valid url. Since my problem is fixed now, I can't repro this. The gist is that the client area of the result grids was repainted as gibberish during scrolling.
This makes it tricky to assess the results of your queries. Clicking on the header and on individual cells causes it to then redraw properly, but it's goofy to not be able to just scroll normally. Is there any way to fix this? I am using the current version of SQL Developer 1.5.5 with the included JVM.
I couldn't even see the dropdown list when I clicked Tools. Here's what I did.
Click Tools
Try to locate Preferences by moving your mouse downwards starting from the Tools button.
When in Preferences, do the same in step 2 for the left side of the panel and try to locate Environment.
When in 'Environment', try to locate 'Look and Feel'. You won't be able to see the caption but it has these values: Windows | Oracle. You'll know you found it when you see a dropdown with an actual value of Oracle.
Change it to Windows.
That solved my problem.
To hell with these kinds of stupid problems.
You need to turn off DirectDraw -- see http://tiredblogger.wordpress.com/2009/05/29/configuring-oracle-sql-developer-for-windows-7/, specifically the bit where they add the following to sqldeveloper.conf:
AddVMOption -Dsun.java2d.noddraw=true
I finally solved the problem:
Go to \sqldeveloper\bin\sqldeveloper.conf and add this line:
AddVMOption -Duser.language=en
The problem was de user language (in spanish do not works)
I finally solved the problem after many tries in windows 10. Oracle should fix this without tricks...
What I did:
Download lastest sqldeveloper 4.1.5 with JDK bundled.
Run sqldeveloper and import settings from previous install.
Close sqldeveloper, and go to USER\AppData\Roaming\sqldeveloper erasing config folders of older versions.
Modify file \sqldeveloper\sqldeveloper\bin
Change this option value to true
AddVMOption -Dsun.java2d.ddoffscreen=true
Comment line:
#AddVMOption -Dsun.locale.formatasdefault=true
Add this options before IncludeConfFile sentence at then end:
AddVMOption -Dsun.awt.keepWorkingSetOnMinimize=true
AddVMOption -Dsun.java2d.noddraw=true
And finally always start sqldeveloper with sqldeveloper\sqldeveloper\binsqldeveloper64W.exe
And change sqldeveloper theme to "windows style".
This problem still reproduces in 2015, I'm using W7, jdk version 1.8.0_40-b25 and sqldeveloper version Version 4.1.0.18.
I had the same problem and nothing seems to help, not even William Rose's answer, until, in my desperation, I put the AddVMOption from his answer in the last line of my sqldeveloper.conf file and Voila! It worked. It seems that somehow the option is shadowed if you put it at the begging.
Just wanting to add this bit of information, but I can't comment yet due to lack of reputation.
i had the same problem with vista and win 7.
just downloaded the latest sql developer 1.5.5 version WITHOUT jdk included
exported my connections from the previously installed sql developer and
deleted my installed version!
then downloaded the JDK 1.6 update 16 from sun and installed it: http://java.sun.com/javase/downloads/index.jsp (32bit version! even if you have win x64. sql developer doesn't accept JDK x64!)
then i unzipped the sql developer 1.5.5 i downloaded (without the jdk)
on first start sql developer asks you for the path to java jdk: given it the path that i installed the jdk 32bit from above and it now runs fine!
even without switching from aero to basic windows design and without redrawing-problems.
hope this helps you too...
Just install old version Oracle SQL Developer 3.2.2 (3.2.20.09.87) and jdk-6u35-windows-x64.
That's how I solved the problem.
I made this step after solved
Add or replace the attribute of the following config file.
..\sqldeveloper\bin\sqldeveloper.conf
AddVMOption -Dsun.java2d.noddraw=true
Turkish developer can see this site
Remove or comment out the line below in sqldeveloper.conf:
# AddVMOption -Dsun.locale.formatasdefault=true

MySQL Workbench 6.3 (Mac) hangs on simple queries

I am using MySQL Workbench 6.3.7 build 1199 CE (64 bits) on a Mac with OS X Yosemite 10.10.5. I am connecting to an Amazon RDS MySQL instance.
When I enter a simple query such as
select * from `devices`;
and click the lightning-bolt-with-cursor icon, the query starts, indicated by the spinner activating next to the "SQL File 4" tab in the following screenshot. However, the query doesn't complete and it just hangs. The white-hand-in-red-stop-sign icon is disabled.
I can only force quit MySQL Workbench from this point on. If I try to do a regular quit, nothing happens.
How can I consistently run a simple query on my database? Sometimes it works (maybe 10% of the time), but it mostly just hangs.
UPDATE 3: The problem is fixed for MacOS HighSierra in MySQL Workbench 6.3.10.
UPDATE 2: It looks like the bug is recurring again in MacOS HighSierra. See https://bugs.mysql.com/bug.php?id=83658 for more details.
There is an unofficial build that fixes the problem. You can download it at: https://drive.google.com/drive/folders/0B2fTesDcrHzVRGVFWEdILWpuaEE?usp=sharing
The build was created by Bob Davenport. See https://bugs.mysql.com/bug.php?id=87714 for more details.
UPDATE: The bug is fixed in MySQL Workbench 6.3.9.
----------------------- original answer -----------------------
It is a known MySQL bug: http://bugs.mysql.com/bug.php?id=83658 caused by GateKeeper Path Randomisation introduced in MacOS Sierra. See https://weblog.rogueamoeba.com/2016/06/29/sierra-and-gatekeeper-path-randomization/.
A possible workaround is to remove the Quarantine ACL:
xattr -dr com.apple.quarantine "/Applications/MySQLWorkbench.app"
I found that if you use the latest 6.3 version, that in order to get queries to work, you have open a first connection and ignore it and then open a second connection. This creates two tabs in the workbench. If you perform your queries in the second tab, it works. If you try in the first tab, it hangs.
I also have found that you have to do a force quit the workbench.
I hope the mysql folks get this fixed.
To resolve this issue, I downgraded MySQL Workbench to 6.1. Now I am able to run my query and it doesn't hang.
In my case, it was changing the connection->ssl->Use SSL setting from "If available" to "No". Workbench 6.3.8 on OSX 10.12.1 now works for me.
The spinning wheel of death is due to the new feature introduced in the Sierra update called "Gatekeeper Path Randomization".
Follow the instructions:
Open MySQL Workbench :)
Right click on your connection (most likely “localhost” or “127.0.0.1”)
Choose “Edit connection”
On the right hand window select “Connection > SSL”
Change “Use SSL” from “If available” to “No”
Now click on the tab “System Profile”
Choose “MacOS X” as System Type
Click “Test connection”
Credits: http://cordobo.com/2398-mysql-workbench-6-3-macos-sierra-hangs-on-simple-queries/
The version 6.3.9 solved the problem, but this version is not showing in "Check for upgrades" option, you need to download directly from the site.
MySQL Workbench official download page
6.3.9 fixed the issue in the mac. Here is the link MySql 6.3.9
At last I have downloaded MySQL Workbench 6.3.10 and install MySQL Workbench 6.3.10 and solved my problem. I have downloaded MySQL Workbench 6.3.10 from bellow link https://dev.mysql.com/downloads/workbench/
It is working for me.. I think this will work for you..
I found that deleting the cache and workspaces folder contents (~/Library/Application Support/MySQL/Workbench) it works again. What I haven't found is how to ensure it doesn't hang again :-(
I also found that if I manually close the Connection tab from the menu and exit WB from the menu and not from the OS window buttons it seems more stable next time.
PS: I am using SSH connection so it may be due to this but it is not always happening.
UPDATE: A clean install and no SSH configurations the issue still persists. Unless you manually go and delete the cache folder files it continues to hang.
I was getting around the problem for awhile by deleting the user library folder and dropping back to version 6.2.5 ... but today found the problem was back. So today I deleted the user library folder and dropped back to version 6.1.7. It's working again, for now.
In my case, the IP address changed where mySQL was served.
Flushing the DNS fixed it for me:
sudo dscacheutil -flushcache;
sudo killall -HUP mDNSResponder;
say cache flushed
This seemed to help some of the time, but not 100%:
Connect to the database with a different user, and then re-connect with the original user.
I'm about to downgrade like the accepted answer says though, as this doesn't solve it every time.
This is still an open bug in 6.3.8:
https://bugs.mysql.com/bug.php?id=82231
The possible workaround is to open secondary tab with the same connection and work in there. However it crashes anyway from time to time.
Until the bug is fixed I use free Mysql Workbench aleternative for common work. For mac users I would suggest https://sequelpro.com.
Upgrade to 6.3.9 fixed the issue. The 6.3.4 was hanging on queries for me. Unfortunately the Help > Check for Updates didn't indicate any updates were available, so I went to the source.
This can probably help as a temporary/immediate solution. If I try to manually type the below query, MySQL Workbench hangs, especially at x.*
SELECT
x.*
FROM x_table x;
But if I write the SQL in another editor and paste it in MySQL Workbench and run the query, it doesn't hang.
Versions: MacOS Big Sur (11.2), MySQL Workbench 8.0

Sql Server 2008 R2 Management Studio Yet Another intellisense issue

I have some issue I can't find any info about!
I did a clean install, and VS2010 was not yet installed when it occured!
My colleagues don't seem to have this issue while having exactly the same software!
Sql Server 2008 R2 is fully up to date with SP1 etc.
The issue:
My intellisense works!
For example when I type SELECT * FROM --> right after the last space I see my schema or database or table names!
What doesn't work is:
When I continue SELECT * FROM ma" --> now the database "master" is selected! Normally when I type "." (a dot) I would get SELECT * FROM master., but I just get SELECT * FROM ma.
This is SOOO annoying!!
I have fixed this in the past by installing a Management Studio from the NON R2 version, but I just have a fresh install and I would like to know how to fix this, or at least know the cause?
I hope I described my issue properly!
Kind regards,
Wim
This behavior was changed at some point. I have to type Enter and then the dot in SQL Server 2008 R2.
In SQL Server 2012, when you see the auto-complete list, you need another keystroke to actually select it (e.g. down-arrow), then the dot works. You may want to download SQL Server 2012 RC0 and see if the updated IntelliSense functionality is slightly better (though, admittedly, not perfect and still not how it used to work).
In case you're worried that SSMS 2012 is not worth your time yet, please see this question over on ASK SSC: http://ask.sqlservercentral.com/questions/86305/sql-server-2012-ready-to-use.html

Sybase:-where to save a new database

I have downloaded "SQL Anywhere-12" trial version from the Sybase website.
I use Windows Vista
It installed itself in two locations.The Sybase related folders are in:-
1) "C:\Program Files\.."
-sybase
-SQL Anywhere 12
2) "C:\Users\Public\Documents\SQL Anywhere 12\Samples"
-DBISQL 12.0.1
-SQL Anywhere 12
-Sybase Central 6.1.0
Is it how Sybase downloads itself? Or was there any error in downloading?
The reason I ask is I am not sure where to save any "NEW sybase-DATABASE" created?
Can anyone please help?
The stuff in C:\Users is sample databases, example code, scripts, stuff like that. The actual software is installed in C:\Program Files.
For SQL Anywhere-specific questions, you may want to check out sqlanywhere-forum.sap.com.
Disclaimer: I work for Sybase in SQL Anywhere engineering.

Bad screen redrawing in Oracle SQL Developer

I have a problem with Oracle SQL Developer. When I use it on a Windows Server 2003 machine, it works fine. When I use it on my Windows 7 desktop, I get a lot of redraw problems in the query results grid when I scroll either horizontally or vertically, like so:
Edit: ImageShack was the original image host for my screenshot, and it's no longer a valid url. Since my problem is fixed now, I can't repro this. The gist is that the client area of the result grids was repainted as gibberish during scrolling.
This makes it tricky to assess the results of your queries. Clicking on the header and on individual cells causes it to then redraw properly, but it's goofy to not be able to just scroll normally. Is there any way to fix this? I am using the current version of SQL Developer 1.5.5 with the included JVM.
I couldn't even see the dropdown list when I clicked Tools. Here's what I did.
Click Tools
Try to locate Preferences by moving your mouse downwards starting from the Tools button.
When in Preferences, do the same in step 2 for the left side of the panel and try to locate Environment.
When in 'Environment', try to locate 'Look and Feel'. You won't be able to see the caption but it has these values: Windows | Oracle. You'll know you found it when you see a dropdown with an actual value of Oracle.
Change it to Windows.
That solved my problem.
To hell with these kinds of stupid problems.
You need to turn off DirectDraw -- see http://tiredblogger.wordpress.com/2009/05/29/configuring-oracle-sql-developer-for-windows-7/, specifically the bit where they add the following to sqldeveloper.conf:
AddVMOption -Dsun.java2d.noddraw=true
I finally solved the problem:
Go to \sqldeveloper\bin\sqldeveloper.conf and add this line:
AddVMOption -Duser.language=en
The problem was de user language (in spanish do not works)
I finally solved the problem after many tries in windows 10. Oracle should fix this without tricks...
What I did:
Download lastest sqldeveloper 4.1.5 with JDK bundled.
Run sqldeveloper and import settings from previous install.
Close sqldeveloper, and go to USER\AppData\Roaming\sqldeveloper erasing config folders of older versions.
Modify file \sqldeveloper\sqldeveloper\bin
Change this option value to true
AddVMOption -Dsun.java2d.ddoffscreen=true
Comment line:
#AddVMOption -Dsun.locale.formatasdefault=true
Add this options before IncludeConfFile sentence at then end:
AddVMOption -Dsun.awt.keepWorkingSetOnMinimize=true
AddVMOption -Dsun.java2d.noddraw=true
And finally always start sqldeveloper with sqldeveloper\sqldeveloper\binsqldeveloper64W.exe
And change sqldeveloper theme to "windows style".
This problem still reproduces in 2015, I'm using W7, jdk version 1.8.0_40-b25 and sqldeveloper version Version 4.1.0.18.
I had the same problem and nothing seems to help, not even William Rose's answer, until, in my desperation, I put the AddVMOption from his answer in the last line of my sqldeveloper.conf file and Voila! It worked. It seems that somehow the option is shadowed if you put it at the begging.
Just wanting to add this bit of information, but I can't comment yet due to lack of reputation.
i had the same problem with vista and win 7.
just downloaded the latest sql developer 1.5.5 version WITHOUT jdk included
exported my connections from the previously installed sql developer and
deleted my installed version!
then downloaded the JDK 1.6 update 16 from sun and installed it: http://java.sun.com/javase/downloads/index.jsp (32bit version! even if you have win x64. sql developer doesn't accept JDK x64!)
then i unzipped the sql developer 1.5.5 i downloaded (without the jdk)
on first start sql developer asks you for the path to java jdk: given it the path that i installed the jdk 32bit from above and it now runs fine!
even without switching from aero to basic windows design and without redrawing-problems.
hope this helps you too...
Just install old version Oracle SQL Developer 3.2.2 (3.2.20.09.87) and jdk-6u35-windows-x64.
That's how I solved the problem.
I made this step after solved
Add or replace the attribute of the following config file.
..\sqldeveloper\bin\sqldeveloper.conf
AddVMOption -Dsun.java2d.noddraw=true
Turkish developer can see this site
Remove or comment out the line below in sqldeveloper.conf:
# AddVMOption -Dsun.locale.formatasdefault=true