I've just run a couple of queries where I forgot to click on the blue 'refresh' button when I launched Oracle SQL Developer.
But I was wondering whether it actually refreshes anyway, when you actually launch it?
Short answer: 'no.'
But first, let's share with folks with the 'blue refresh button' you mention in your question.
What does this button do?
It re-executes the query that the resultset is tied to, in this case
select * from employees
When you restart/re-open SQL Developer it does not even connect to any databases, much less re-execute any queries automatically.
What you might see is a .SQL file re-opened as you had it open when you closed the application from your last session. But no database work will happen until you hit the 'Connect' button.
Disclaimer: I work for Oracle and am the product manager for SQL Developer.
Related
I have a large query I am running in Oracle SQL Developer. The query seemed to run successfully and then I made the mistake of hitting count rows and it froze. I had to terminate the program in the task manager. I have been searching online and I have seen a lot about how unsaved scripts can be recovered using history, but I dont see anything about restoring the query result. Is it cashed anywhere so I dont have to run the query all over again?
Any help is greatly appreciated.
If you are using PL/SQL Developer, then you need to press CTRL+E. You can find Recent Executed Quer
Okay, this is kind of odd and it is driving us nuts. I'll outline what is going on as best I can, then I can provide specific details and/or code as folks request it, because I'm not sure what will be needed to suss this out.
I have an access database I have built so our analysts can work within a queue, select records, do whatever research is needed, then either mark the record in question as okay, or fill in some blanks and mark it as needing a dispute (we work in billing).
Basically, the database opens and a hidden form pulls the NT User Name from the local machine, then opens a visible form that queries the database via SQL ODBC to display a list of records with that NT User Name attached to them.
The user can then scroll through the records, select them to get more information, and click a button to mark them as okay, or another to mark them as needing a dispute.
If they click the okay button, it fires off an update query to mark the record as okay. If they click the dispute button, then it opens a third form to show them the line item they are disputing with values from all of the other text fields on the form that they can select from/fill in. On that form there is a button to commit the dispute, which fires off another query to update the values into the same table as the 'okay' button.
So, the issue is, that this all works perfectly on my workhorse machine, and an essentially naked test machine. It also works on another co-worker's machine. However, whenever we try to run it on two other coworkers' machines, everything works just fine, except for any of the queries that attempt to write back to the ODBC connection. All of the read-only stuff works just fine, just not the updates. But the updates work perfectly, and super-fast on my machine, my test rig, and my other co-worker's machine.
We've tried reinstalling the ODBC connection, and the ODBC SQL Drivers.
No go.
We've tried just opening the table in question on the affected machines and making direct edits to the table.
This works if no forms are open in the database, but as soon as we open a form, no update query will run against the table.
So, we tried commenting out all code on all open forms except the docmd.openquery code for the single button we used to test the update query.
No go.
We even built a new form with just a button on it that triggers a new update query that makes only one simple update (Now()) to the table in question.
This runs fine on its own, but times out when run off the button click from the form.
We tried changing the MS Office install on one machine to 'run all from computer' to make sure all necessary components are installed/present.
No go.
We tried installing the ODBC connection both via the normal windows interface, and through the access linked table manager interface.
No go.
We tried installing both 64-bit and 32-bit ODBC connections, both under USER DSN and SYSTEM DSN, and all permutations of one and not the other that we could think of.
No go.
It seems that no update query will write to that table while any form is open, but works just fine with no forms open. But only on these other two machines. Everything works fine on the other three machines we've tested on, whether forms are open or not.
We're kind of at wit's end here and don't know where to go. Google is proving unhelpful, possibly because we just don't know exactly how to search the problem out.
Here's basic technical stuff and I am happy to provide whatever other details, code, queries, etc. that are needed to troubleshoot upon request:
OS: Windows 7 Enterprise 64-bit
Software: MS Office Enterprise 2013 32-bit
ODBC: SQL Server
All users have admin access to their respective machines.
Turns out that the issue here seems to have been an intermittent issue with Access being unable to determine which record to update due to the way we were calling details from a continuous form.
We went back to formula on our UI and built it so there is only ever one record on a form when we try to make changes to records, so there can be no system confusion about what record to update.
Still no clue as to why it was working intermittently, but the new iteration is working now.
Thank you all for your questions and suggestions. :)
Ok, so this may seem like a stupid question but I'm fighting DBeaver and so far it's winning and Google is refusing to pick a side.
I've worked out how to explore the database, view the structure of tables, I can even view the data of a table and filter it.
But if I just want to run an arbitrary SQL statement how do I do that?
And 30 seconds after posting I found the answer. There is an SQL Editor menu appeared at the top of the screen (not in the Database Navigator). Selecting SQL Editor from that brings up a query window I can type SQL into.
is it possible to save the current state(all open windows, tabs, connections, files, etc...), shut down SQL Developer, restart it some other day and resume work where you left?
Yes, I've tried it with my SQL Developer Version 4.0.3.16 Build MAIN-16.84
Every time you close SQL Developer while some tabs opened, it will opened those tabs again when you open SQL Developer again
However, SQL Developer won't remember the connections you used to execute those SQLs. So when you try to execute those SQLs, you will prompted to choose the connection where the SQL will be executed
nb : you can also open recent files by using Navigate -> Go To Recent Files
Just to add to nobodykid's answer: It seems to me that open tabs with queries in are not displayed at next session unless they are stored to a file on disk explicitly by the user.
In other words, if you close SQL developer and you do not save your tabs as files on disk explicitly, the tabs will not be recovered upon restart.
In my *.mdb file I have a macro with an action that runs TransferText and gives me an Error Number of 2950 which according to Microsoft means that the document is not trusted, as far as I know it is trusted! It's located in the Trust Center Trusted Locations.
Is there an explanation point next to the Action causing this in the macro whose tooltip reads This action will not be allowed if the database is not Trusted.
I already tried running a compact and repair on it, what could be causing this?
Method 1: Enable the database for the current session
When you use this method, Access 2007 enables the database until you close the database. To enable the database for the current session, follow these steps:
On the Message Bar, click Options.
In the Microsoft Office Security Options dialog box, click Enable this content, and then click OK.
Note You must repeat these steps every time that you open the database.
Check here: https://support.microsoft.com/en-us/kb/931407
The problem can be as simple as not having first established an ODBC connection. I was getting this macro error (2950), and I ended up reading all the support threads, getting nowhere.
Then it struck me to install our ERP client first --which is the front-end for the database I was trying to access ...with Access.
Doing this established an ODBC configuration, so now when I opened my Access file, an ODBC prompt opened up before I even got to any of the functions that were triggering the error. In hindsight, I could have passed on installing the ERP client, and just went to the ODBC settings in Windows, and pointed a connection to the SQL table.
In my case there was a naming conflict. The macro in turn called a VBA function, and I had inadvertently named the function with the same name as the module it was in. They were both named "RobertsReport". Once I changed the name, everything worked as expected.
Tip: As troubleshooting steps, try running the macro solo by double-clicking on it. If you can, copy only the line that generates the error to a new macro to test it by itself, and of course include any preceding commands it may need to run properly. Once I did this it greatly narrowed down the problem until the lightbulb came on over my head.