1 2 3 4 5 6 > >>   Sort: Rank

Understanding SQL Transaction Management in Oracle
Where to find answers to frequently asked questions on SQL Transaction Management in Oracle? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on SQL Transaction Management in Oracle. Clear answers are provided with tutorial exercises on starting and e...
2019-09-16, 635👍, 0💬

Return Top 5 Rows in Oracle
How To Return Top 5 Rows in Oracle? If you want the query to return only the first 5 rows, you can use the pseudo column called ROWNUM in the WHERE clause. ROWNUM contains the row number of each returning row from the query. The following statement returns the first 5 rows from the employees table: ...
2019-09-16, 603👍, 0💬

Ways to Start a New Transaction in Oracle
How To Start a New Transaction in Oracle? There is no SQL statement to explicitly start a new transaction. Oracle server implicitly starts a new transaction with the following two conditions: The first executable statement of a new user session will automatically start a new transaction. The first e...
2019-09-16, 513👍, 0💬

What Is a Transaction in Oracle
What Is a Transaction in Oracle? A transaction is a logical unit of work requested by a user to be applied to the database objects. Oracle server introduces the transaction concept to allow users to group one or more SQL statements into a single transaction, so that the effects of all the SQL statem...
2019-09-16, 511👍, 0💬

Counting Groups Returned with the GROUP BY Clause in Oracle
How To Count Groups Returned with the GROUP BY Clause in Oracle? If you use the COUNT(*) function on groups returned with the GROUP BY clause, it will count the number of rows within each group, not the number of groups. If you want to count the number of groups, you can put the GROUP BY query into ...
2019-09-16, 509👍, 0💬

Ways to End the Current Transaction in Oracle
How To End the Current Transaction in Oracle? There are several ways the current transaction can be ended: Running the COMMIT statement will explicitly end the current transaction. Running the ROLLBACK statement will explicitly end the current transaction. Running any DDL statement will implicitly e...
2019-09-04, 590👍, 0💬

Rollback the Current Transaction in Oracle
How To Rollback the Current Transaction in Oracle? If you have used some DML statements updated some data objects, you find a problem with those updates, and you don't want those updates to be permanently recorded in the database, you can use the ROLLBACK statement. It will remove all the database c...
2019-09-04, 558👍, 0💬

Create a Test Table for Transaction Testing in Oracle
How To Create a Test Table for Transaction Testing in Oracle? If you want to practice DML statements, you should create a testing table as shown in the script below: >cd (OracleXE home directory) >.\bin\sqlplus /nolog SQL> connect HR/fyicenter Connected. SQL> CREATE TABLE...
2019-09-04, 548👍, 0💬

Transaction Commit When DDL Statement Executed in Oracle
What Happens to the Current Transaction If a DDL Statement Is Executed in Oracle? If a DDL statement is executed, the current transaction will be committed and ended. All the database changes made in the current transaction will become permanent. This is called an implicit commit by a DDL statement....
2019-09-04, 544👍, 0💬

Commit the Current Transaction in Oracle
How To Commit the Current Transaction in Oracle? If you have used some DML statements updated some data objects, and you want to have the updates to be permanently recorded in the database, you can use the COMMIT statement. It will make all the database changes made in the current transaction become...
2019-09-04, 469👍, 0💬

What Is a READ ONLY Transaction in Oracle
What Is a READ ONLY Transaction in Oracle? A READ ONLY transaction is a transaction in which the read consistency is set at the transaction level. In a READ ONLY transaction, a logical snapshot of the database is created at the beginning of the transaction and released at the end of the transaction....
2019-08-23, 615👍, 0💬

What Is a READ WRITE Transaction in Oracle
What Is a READ WRITE Transaction in Oracle? A READ WRITE transaction is a transaction in which the read consistency is set at the statement level. In a READ WRITE transaction, a logical snapshot of the database is created at the beginning of the execution of each statement and released at the end of...
2019-08-23, 551👍, 0💬

Transaction Commit When Session Ended in Oracle
What Happens to the Current Transaction If the Session Is Ended in Oracle? If a session is ended, the current transaction in that session will be committed and ended. All the database changes made in the current transaction will become permanent. This is called an implicit commit when session is end...
2019-08-23, 534👍, 0💬

Transaction Rollback When Session Killed in Oracle
What Happens to the Current Transaction If the Session Is Killed in Oracle? If a session is killed by the DBA, the current transaction in that session will be rolled back and ended. All the database changes made in the current transaction will be removed. This is called an implicit rollback when ses...
2019-08-23, 501👍, 0💬

Read Consistency in Oracle in Oracle
How Does Oracle Handle Read Consistency in Oracle? Oracle supports two options for you on how to maintain read consistency: READ WRITE (the default option), also called statement-level read consistency. READ ONLY, also called transaction-level read consistency.   ⇒Understanding SQL Transaction Manag...
2019-08-23, 465👍, 0💬

Set a READ ONLY Transaction in Oracle
How To Set a Transaction To Be READ ONLY in Oracle? If you want a transaction to be set as READ ONLY, you need to the transaction with the SET TRANSACTION READ ONLY statement. Note that a DML statement will start the transaction automatically. So you have to issue the SET TRANSACTION statement befor...
2019-08-19, 600👍, 0💬

What Is a Data Lock in Oracle
What Is a Data Lock in Oracle? A data lock is logical flag the Oracle server is placed on data objects to give an exclusive right to a transaction. Statements in other transactions needs to respect data locks based on certain rules. Rules on data locks are: SELECT query statements do not create any ...
2019-08-19, 577👍, 0💬

Restrictions in a READ ONLY Transaction in Oracle
What Are the Restrictions in a READ ONLY Transaction in Oracle? There are lots of restrictions in a READ ONLY transaction: You can not switch to READ WRITE mode. You can not run any INSERT, UPDATE, DELETE statements. You can run SELECT query statements. The tutorial exercise below shows you some of ...
2019-08-19, 548👍, 0💬

General Rules on Data Consistency in Oracle
What Are the General Rules on Data Consistency in Oracle? Here is a list of general rules on data consistency: All SQL statements always work with a snapshot of the database to provide data consistency. For READ WRITE transactions, the snapshot is taken when each statement starts. For READ ONLY tran...
2019-08-19, 542👍, 0💬

Supported Transaction Isolation Levels in Oracle
What Are Transaction Isolation Levels Supported by Oracle in Oracle? Oracle supports two transaction isolation levels: READ COMMITTED (the default option). If the transaction contains DML that requires row locks held by another transaction, then the DML statement waits until the row locks are releas...
2019-08-19, 531👍, 0💬

How Oracle Handles Dead Locks in Oracle
How Oracle Handles Dead Locks in Oracle? Oracle server automatically detects dead locks. When a dead lock is detected, Oracle server will select a victim transaction, and fail its statement that is blocked in the dead lock to break the dead lock. The tutorial exercise below shows you an example of s...
2019-08-08, 584👍, 0💬

Show Existing Locks on the Database in Oracle
How To View Existing Locks on the Database in Oracle? As can see from the pervious tutorial exercise, performance of the second session is greatly affected by the data lock created on the database. To maintain a good performance level for all sessions, you need to monitor the number of data locks on...
2019-08-08, 548👍, 0💬

Experiments of Data Locks in Oracle
How To Experiment a Data Lock in Oracle? If you want to have some experience with data locks, you can create two windows running two SQL*Plus sessions. In session 1, you can run a UPDATE statements to create a data lock. Before committing session 2, switch to session 2, and run a UPDATE statements o...
2019-08-08, 534👍, 0💬

What Is a Dead Lock in Oracle
What Is a Dead Lock in Oracle? A dead lock is phenomenon happens between two transactions with each of them holding a lock that blocks the other transaction as shown in the following diagram: (transaction 1) (transaction 2) update row X to create lock 1 update row Y to create lock 2 update row X (bl...
2019-08-08, 495👍, 0💬

1 2 3 4 5 6 > >>   Sort: Rank