I'm a student
I'm trying to disable the auto-commit feature in oracle so I can successfully manage savepoints and rollbacks
there is no auto-commit button in the interface I'm using, do you know how to disable it?
Thanks in advance :)
connect to the internal workspace as admin user
go to "Manage instance" menu (at the top of the screen), then
Feature configuration
SQL Workshop
Set "Enable transactional SQL Commands" to Yes
log off, log on (as a normal user)
go to SQL Workshop
in upper left corner of the screen, you'll now notice the Autocommit checkbox - uncheck it
If you're on a hosted instance like apex.oracle.com the autocommit feature will be turned off and you can't switch it on. However, you can still test/use savepoints and rollbacks - just make sure you test them within a single anonymous pl/sql block.
Related
Is there a way to ignore "ENABLE CHANGE_TRACKING" in SQL Schema Compare?
Change tracking is a lightweight solution that provides an efficient change tracking mechanism for applications. Typically, to enable applications to query for changes to data in a database and access information that is related to the changes, application developers had to implement custom change tracking mechanisms.
According my experience, we can not ignore the "ENABLE CHANGE_TRACKING" in SQL Schema Compare.
But when the the schema/database duplicated, we can disable Change Tracking manually:
ALTER DATABASE AdventureWorks2012
SET CHANGE_TRACKING = OFF
For more details, please reference: Enable and Disable Change Tracking (SQL Server).
Hope this helps.
I already assign data source and get these table, but I still can not Mapping my Column name (like the picture)
How should I do it?
I'm using H2 DB.
I think you have only selected the "current schema" - which is the one you used to create your datasource/connection. You need to add/select the owning schema for the objects you wish to map.
OPTION 1 -
During Datasource Setup:
Data Sources and Drivers Window
Select the "Schemas" tab (the tool opens on the "General" tab) and choose the schema under which the object you are looking to map exists.
OPTION 2 -
After Datasource Setup
You can follow the instructions for new datasource setup if you can get back to the window where you initially set up the datasource, however, there is a shortcut. If you were able to successfully create a datasource, you should see that data source in the IntelliJ "Database Tool Window" (View > Tool Windows > Database). There is a small pill icon that you can interact with. Mine says "3 of 2195" - this is telling you that you have visibility of 3 schemas of a total 2195 available. Click the pill icon. Find the schema that owns the table you need to map and select it.
After Option 1 OR 2
You should then be able to navigate to the persistence tool, right click your project, and select "Generate Persistence Mapping", then click "By Database Schema". Once you select a datasource in the "Import Database Schema Window" you should see all the objects(tables) available for mapping.
NOTE:
I am running IntelliJ Ultimate Edition v2020.1. I am connecting and mapping objects from an enterprise Oracle 12c database (can't really share screenshots so I will try to be descriptive)
I know I was pulling my hair out so I hope someone finds this helpful!
Our Oracle database has 500+ database users ( one for each 'human' user ). We are using TOAD Version 11.5
After every logon, I have to switch to the application schema, which means choosing the schema from a very long "users" dropdown list.
Is there a way to set a default schema upon logon ?
If you just want to pre-select the schema in the Schema Browser, for example, then right-click the Schema Dropdown and choose the "Set XYZ as Default Schema" menu item. If you are referring to some other place in Toad then please be specific.
You can set an Auto Connect connection too. From the session/new connection window, scroll right and check the box for "Auto Connect" on the connection you want. When you start Toad, it will auto-connect to the entry you selected.
I am trying to use HikarCP in a legacy system. I configured autocommit to false, which is what we want, and realized that my logs are filled with
[c.z.h.p.ProxyConnection][ProxyConnection.java:232] ora - Executed rollback on connection net.sf.log4jdbc.ConnectionSpy#3f2bba67 due to dirty commit state on close().
This is happening when a connection acquired from the pool is closed after issuing a finder query. No insert/update/delete's are happening within the life of connection. Is this how it should be for select queries? Should I be doing a COMMIT after each select?
Yes, you should be committing. Even SELECT queries initiate transactions and acquire locks. Particularly with various isolation levels, and depending on the database even with TRANSACTION_READ_COMMITTED.
HikariCP treats a non-explicit commit when autocommit is false as an application error. Some other pools support configuring "commit-on-close", but HikariCP considers that risky, and a hack to support applications that were never properly written.
The JDBC specification is explicitly silent on whether a Connection without auto commit should automatically commit or rollback. That is an implementation detail left up the the driver developers.
Anyone know why the Netbeans IDE's Database result explorer disables CrUD operations and "Show SQL 'CrUD' Operation" when using a JDBC connection via JTOpen 9.1 driver to a DB2 for i database with Netbeans 8.1?
JTOpen is a open source JDBC driver to IBM i DB2 for i database in addition to bunch of Java Classes for interacting with the IBMi system. http://jt400.sourceforge.net/
I tried a few JDBC connection properties but no cigar...
I guess i'll have to keep browsing the IBM KB
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzahh/jdbcproperties.htm
and the JT400 source
https://github.com/devjunix/libjt400-java/blob/master/src/com/ibm/as400/access/JDProperties.java
Many DB2 for i systems are configured to not use commitment control or journaling. This is not what many toolkits expect to see. Try changing the connection string to tell Netbeans that you don't want commitment control.
Add "extended metadata=true" in the connection properties fixed my issue.
https://godzillai5.wordpress.com/2016/08/21/jdbc-jt400-setting-to-get-crud-and-show-sql-features-added-in-netbeans-with-ibm-db2-for-i/
The IBM documentation here http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzahh/jdbcproperties.htm
"extended metadata"
Specifies whether the driver requests extended metadata from the
server. Setting this property to true increases the accuracy of the
information returned from the following ResultSetMetaData methods:
getColumnLabel(int) isReadOnly(int) isSearchable(int) isWriteable(int)
apparently readonly for the result set is incorrectly assumed true, unless the ext. metadata comes back with the actual value for isReadOnly(int). I'm guessing that its assumed false because on the initial connection the connection property "Read Only" is true. It would be helpful to understand what setting on the system or the Library/Schema is causing the connection to have that property.
The most obvious reason for the original image showing just some read-only operations presented, would seem to have been the "access" attribute for the connection; i.e. if set to "read only", that would limit access to SELECT statements only. But with the new information showing the connection properties, seems the readOnly=false, so that "access" attribute should not be the origin for the issue.
I suspect that for any given TABLE, the issue might be for lack of a PRIMARY KEY CONSTRAINT; i.e. IIRC, some client database applications might prevent update-capable mode for a particular TABLE, if that TABLE is not known to have a PK.