how to show un-committed changes in a database table in datagrip - datagrip

How can I run a statement in the sql query console in manual mode on datagrip and see their effect on the table locally in order to make sure it has the intended effect before committing it to the database?

From DataGrip 2020.2 you can review the query that represents your changes in the data editor.
DML button is active if there are pending changes:

There is a context action "Preview update".
(right click on statement > show context actions)

Related

Oracle SQL Developer insert and delete buttons disabled

I am using SQL Developer for my Oracle DB, wonder why are my shortcut buttons are being disabled (see attached image) while the user acc i logged in has the permission to add/edit/delete rows. I am able to add rows by typing in query. How should I enable them?
And also not able to edit the row using the GUI by clicking on the pencil button.

Copy and paste text into an Oracle table

In SQL Server, you can copy an Excel spreadsheet, go to SQL Server, open a table, highlight the last row and Ctrl+V to paste all the records from Excel into SQL.
Is there a way to do this in Oracle? I don't want to import, I want to copy & paste. It doesn't appear to let me do it.
Please note; my experience with Oracle is a whopping 3 hours. One of those, "Oh, we're switching to Oracle today. Learn it or find a new job" things. So feel free to explain your answer as if I'm a complete Oracle n00b, because I am.
I'm using Oracle SQL Developer. According to the Help, it's Version 4.1.3.20
click the table. in the window on the right there should be a data tab. click it. there will be an insert row tab. click the field you want to paste to click control+v then click the commit button
Make sure what you are copying is the right data type for the field you are copying into. Since you have sql experience this should help.
It should be noted this is not the preferred way to do this, you should use insert statements.

update the package body in Oracle Database (Sql developer)

I need to have a miner update to the package body in Oracle Database using Oracle SQL Deverloper 3.2. The update does not need to change the package specification.
Using the Oracle SQL Deverloper, I right-click on the package name, choose "edit body", then update the body.
Then I find that it seems there are several ways to update the package body:
(1) click "run" button.
(2) click "compile" button.
(3) click "compile with debug" button.
(4) close the tab of package windows, then choose "yes" to save the changes on the pop-up windows.
My questions are:
1) what are the difference in the above 4 ways?
2) which is the proper way?
Thanks a lot
Regards
1) When you click "Run", the SQL Developer starts to execute the current Active SQL. And now it is a CREATE OR REPLACE PROCEDURE..., so it turns to be a DDL
2) When you click Compile, Developer explicitly do the same as previous. No difference actually.
3) When you choose for Debug, if you enable "debugger" in SQL Developer, then you can enable breakpoints in your code, after compiling.
4) When you click Save, SQL Developer simply pushes the code to be Executed, again as Step1.
All are proper ways, but when you SQL developer to edit your proc, you may feel some slowness, because it do maintain some persistent setting behind the screens, and it is slightly buggy. It wont harm, but just slows down.

Refreshing Intellisense in Toad for Oracle

I am using Toad 10.5.1.3
The new objects that I create are automatically not showing up in the intellisense dropdown. The only thing I know works is to shut down Toad and reopen it. There's got to be a better way than that!
How do I refresh the cache for the intellisense dropdown in Toad for Oracle?
Toad caches results per connection string.
There is a button on your popup that displays objects. Just click it and it will refresh results in cache.
Another way i found out for this is to disable caching of Toad Insight results. Go to options->editor->code assist and disable "cache code insight results".
Of course, this sucks if your dictionary is slow.

How can I see other schemas apart from my own when connecting to an Oracle database through server explorer?

I am attempting to add a connection to an Oracle database through Server Explorer. The 'Test' Connection' is successful, however whenever I go to view the list of tables / schemas, I can only see the one associated with my login.
I realise this sounds silly, but when I use the same login/password through Toad for Oracle, I am still allowed to browse "All Schemas" to find the tables I want.
Is this possible through Server Explorer? Or do I need to find a specific login for the schema I want to access?
Solution (just so it's here and not just on the OTN forums)
Right-click on connection in Server Explorer
Choose filters
Select the "Dispalyed Schemas" row in the property grid (it should be selected by default)
In the Property/Condition/Value fields, click the "..." button for Value
Pick any schemas you want to see and click Ok.
Conversely, instead of using the dialog that appears after clicking the "..." button, you can list the schemas separated by commas in the Value textbox.
Oracle's way of dealing with users and schemas is different from SQL Server's. So I suspect the default Visual Studio behaviour won't work properly with Oracle.
Have you installed the free Oracle Developer Tools for Visual Studio? Find them here. If you do that then you can manually add the other schemas to the filter of your main connection. I found instructions in this OTN forum thread:
"highlight the connection node you
want to moidy and choose filters or
right click on the specific connection
node and choose modify then click on
the filters tab to modify the
filters."
I agree this is clunky, and it should be done automatically. I guess there's a limit to how VS can be extended.

Resources