Not able to see the results by using Dbms_Output.Put_Line - oracle

I am not able to see the results by using Dbms_Output.Put_Line in sql developer. The result is shown only once. When I execute it again, it is not shown.
I checked a lot of workarounds described in google, but those haven't worked for me.
I am executing following:
set serveroutput on;
BEGIN
Dbms_Output.Put_Line('hello1');
END;
It should print 'hello1', everytime it executes, but instead, it does so only during first run. I have also tried the only resolution available on google:
Opening the 'view' menu and clicking on 'dbms output'. I got a dbms output window at the bottom of the worksheet. I then added the connection by clicking on plus sign appearing in window. But even that did not work for me.
Please can anyone help me here?

The version your are using, 3.0.02.83, was an early-adopter (i.e. beta) release. There seems to have been at least one known issue with dbms_output in that version, and this looks like an extension of those problems. As noted in comments, the behaviour you are experiencing in that old version isn't reproducible now.
Unless you have a pressing need to be on an old unsupported beta version, you should upgrade to a later release. At the time of writing the current version is 4.1.0.19, and you can get that from the SQL Developer downloads page.

This version is being used at my workplace and is remotely hosted, so there is a remote possibility that they will upgrade by acting on my advice.
For now I am able to generate output by this simple workaround:
To generate the output I have to select and run all the statements(including 'set serveroutput on;') as a whole, every time I need to generate output. Note that executing 'set serveroutput on;' and
BEGIN
Dbms_Output.Put_Line('hello1');
END;
separately is not working. I need to select the statements at once and run together in one Go. That's the way it is working for me.

Related

UFT 14.x cannot execute ctrlC+ctrlV in IE

I need a solution for this error
Before using UFT 14.x , I wrote my code on UFT 12 (on windows 7) for copy/paste function. (It worked 100%)
When I upgraded UFT to 14.x , that function respond with an error . The code and the image are the following :
Function WritingFast(strDataTable)
set objCB=createobject("Mercury.Clipboard")
objCD.Clear()
objCD.SetText (strDataTable)
Window("Internet Explorer").WinObject("Internet Explorer_Server").Type micCtrlDwn + "v" +micCtrlUp
objCB.GetText
End Function
The error says that WinObject("Internet Explorer_Server") is not unique, what are you trying to refer to by this object?
Please examine the description of the object in the object repository in order to see why the description there isn't enough to make it unique.
Alternatively you could take a step back and think about what you're trying to do, perhaps UFT's web support allows you to do it directly and not by trying to access the underlying Win32 objects.
Can't add a comment, rules, sorry. Gonna put has an answer but its more a tip.
If you don't have a duplicate, try capture the object again. See if UFT recognize that object exists or not at your repository.
At least you can see what he is capturing whit the upgrade and compare (if different).

Exception while using SelectDirectoryDialog (TSelectDirectoryDialog) in Free Pascal / Lazarus

I just wanted to test the "SelectDirectoryDialog" as described on the resource page: TSelectDirectoryDialog, the linked doc page is currently down. But I'm getting an exception "External:SIGSEGV". Not sure what I'm doing wrong here. I put the "SelectDirectoryDialog" on the form and created a button that executes the following code:
procedure TForm1.Button1Click(Sender: TObject);
begin
if SelectDirectoryDialog1.Execute then ShowMessage(SelectDirectoryDialog1.FileName);
end;
I looked up a few examples (here, here and here), but I can't find anything that's wrong with my code. I tried the TOpenDialog, that one works without a problem.
Any ideas how to fix this? Is there a different dialogue that let's me select a directory as a quick fix?
Update:
The problem seems to be with the debugger, here's a thread describing it. Executing the Exe-File works fine. Does anyone know if the more current Version have a fix to this? (I'm using Lazarus V1.6 from 2016, FPC-V. 3.0.0, SVN-Revision 51630 - the 64bit Version).
Not sure if it the problem, but did you try menu -> Tools -> Options -> Debugger -> check the checkbox for DisableLoadSymbolsForLibraries ?

PgAdmin4 unable to query or view data

I have a very basic PostgreSql table. Despite the simple table schema, I cannot query it via PgAdmin4.
The View Data option is unresponsive; Query Tool option becomes unresponsive after a few attempts in opening and closing the panel. When the Query Tool is eventually (somehow) launched, a trivial SQL statement like
SELECT * FROM test_table
will spin forever and never display.
The diagram above shows the exact same table, which is okay under PgAdmin3.
The table was created empty. Then added with a row. But it threw errors about not having a Primary Key. Which also threw errors when I tried to set a Primary Key. So I used TeamPostgreSql to set a Primary Key. So all is good under PgAdmin3 now. Hence I'm really curious about what's going on with PgAdmin4?
I'm running pgAdmin4 v3.0 and I've put localhost as host name.
I mean, left panel > servers > create > server and then connection tab > host name
I could not query tables, clicking on view/edit data > all rows had no results (nor error log entries).
After I changed server name from localhost to 127.0.0.1, all worked as expected!
I hope it helps, because I've lost so much time on this and could not find a proper answer.
I find a way to view query result on Data Output window using the "Reset Layout" command from File menu. Save your current work (query) before as it will kind of restart pgAdmin4. Tested with pgAdmin 2.1
1) First delete the log file to get rid of older logs
2) Start pgAdmin4.
3) Try to view data again
Can you check log file for any errors & paste it here?
Linux log location: ~/.pgadmin/pgadmin4.log
Windows log location:
C:\Users\YOUR_USERNAME\AppData\Roaming\pgAdmin\pgadmin4.log
Try naming your columns with lower case letters.
Or try with a blank query and write the SQL commands manually:
SELECT * FROM “test_table”
ORDER BY “Apple” ASC
I think this is a bug. The command the pgAdmin 4 is sending, does not contain the double quotes in the order command on the column name, and if you have upper case letters, SQL is going to convert them to lower case letters, thus not finding the sorting criteria.
I had a similar problem.
For me the Query Tool did render, however I could not see the Query Tool until after I expanded the view.
Then even after expanding I was not able to see the result of the query until I ran ( File -> Reset Layout ) as Guillaume Raymond suggest.
Before Expand
After Expand
After Running Reset Layout
I fixed this by opening the connection, changing just the connection name and saving the connection.
Based on other comments, I'd say there is likely some difference in the persisted format of the connection and they need to be resaved by the new version to work.
Warning: You may need to recreate connections.
This worked for me.
1.) Shutdown pgadmin4 3.1
2.) Delete folder: C:\Users\YOUR_USERNAME\AppData\Roaming\pgAdmin
Faced a similar issue where the problem was caused by Firefox, pgADmin 4. Launching pgAdmin in Chrome solved the issue.
This problem I experienced with the internet explorer browser where the query tool was not loading at all. It just kept on spinning with a circle. I solved this issue by using chrome browser.
When you launch pgadmin4 it launches in internet explorer by deafult. it has a key attached to it like
http://127.0.0.1:57756/?key=0371aabd-b4c7-4454-8234-b1234416d7e5e.
you can just paste the above url in the browser directly and the pgadmin4 will open
and query tool works in it. Or you cna use cmd and paste the belwo command and pgadmin4 will open as a standlone application rather tahn another tab in the browser and you cna use it like old pgadmin3.
C:\windows\system32>"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=http://127.0.0.1:57756/?key=0371aabd-b4c7-4454-8234-b1234416d7e5e
I had the same problem (version 4.18). Only the following worked for me:
Create a new server group (!) by right-clicking on "servers" in the left-hand navigation.
In this new group I created the desired connection to the database (with host name 127.0.0.1)
After that I could finally work with it
You can remove pgadmin4, then reinstall it. It worked for me. I used Ubuntu 18.04.
Here is my command on terminal:
sudo apt autoremove pgadmin4
sudo apt install pgadmin4 pgadmin4-apache2 -y

Query runs fast but report renders slow: how to debug this?

I'm running SSRS 08. My query has four parameters (all varchars). I can run the query through management studio and it runs in under 10sec. I get the same performance if I run the query in Visual Studio's query designer.
However...if I try to preview the report or actually run the report once it's deployed the actual report sometimes takes more than 5 minutes. I ran a trace and the query seems to be in/out of the SQL server side quickly. How can I find where/why I'm loosing this performance? I've tried/checked so far the following:
No images are referenced in the report
No grouping/sorting outside of the stored procedure
Since it's a straight forward report I rebuilt it with same result (to check if it's not an issue of a corrupted report).
ran SQL trace when I executed the report to make sure the query did not have issues
Based on some suggestions before I rewrote the query to use variables instead of parameters like so
-- ...
-- Note: #Parameter is a varchar(40)
-- ...
declare #Var as varchar(40)
set #var=#parameter
select * from table where fieldvalue=#var
Ran the trace and it's not an issue on the query side.
I had the report html output trouble on report retrieving 32000 lines. In my case I had to activate “Interactive Paging” to allow user see first page and able to generate Excel file. The pro is that first page appears fast and user can generate export to Excel or PDF, the cons is that user can scroll only current page. If user wants to see more content he\she must use navigation buttons above the grid. In my case user accepted this behavior because the export to Excel was more important.
To activate “Interactive Paging” you must click on the free area in the report pane and change property “InteractiveSize”\ “Height” on the report level in Properties pane. Set this property to different from 0. I set to 8.5 inches in my case. Also ensure that you unchecked “Keep together on one page if possible” property on the Tablix level (right click on the Tablix, then “Tablix Properties”, then “General”\ “Page Break Options”).
I was troubleshooting a similar issue a while ago and it turned out to be related to the browser I was using to view the report. If the report returns a lot of data to the screen consider splitting it into multiple pages if it is not already configured that way.
Why Does Business Intelligence Studio Load Reports Faster than the Report Server
I think I may have found my answer on a social.msdn.microsoft.com thread
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/1e34dc76-4d78-4376-89b0-7c381ed82726/
I unchecked the "Keep together" setting and it now actually previews coming from the server and I can export the report. Much improvement

VS2008 won't show Trace output

I'm using Visual Studio 2008. The Trace output is no longer being shown in the Immediate Window any of my forms except the primary form. When it executes code from within another form (called from that primary form) the Trace output doesn't show up. It used to be fine, and one day it just stopped working. I think this is a setting in VS2008. Anyone have any idea what setting this would be under?
It's got a TraceListener in the code, and that hasn't been touched.
Can you do a quick check and see if the second project is compiling in Release or Debug? If it's Release there's a chance Trace won't be defined and Trace output hence won't show up.
Check that you're referencing System.Diagnostics.Trace, and not the Page.Trace TraceContext object. If you're just doing Trace.Write it might be resolving to the wrong place, depending on your using directives.
There's an item under Options - Debugging - General: "Redirect all Output Window text to the Immediate Window". That should do the trick.
Patrick

Resources