473,396 Members | 1,777 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why Rollback?

115 100+
Hi,

I am an Oracle n00b. If i start a transaction, run an update statement and don't commit the database does not save changes. Soo my question is..why or when would i use the rollback command?
Oct 28 '08 #1
3 2030
debasisdas
8,127 Expert 4TB
you need to rollback if not commiting. But if you do not commit and close session oracle automatically rolls back all the un-committed transactions.
Oct 30 '08 #2
ShadowLocke
115 100+
you need to rollback if not commiting. But if you do not commit and close session oracle automatically rolls back all the un-committed transactions.
so you would only want to use rollback if you do not intend to close the session?
Oct 30 '08 #3
Pilgrim333
127 100+
No, rollbacking is important when things go wrong along the way.

It's really useful when you are developing in Oracle.

For instance you have some code that is executing, the program inserts data for one person in multiple tables. But if something goes wrong with the insert in one of the tables, you don't want to keep the inserted data in all of the other tables, so you rollback.

Pilgrim.
Oct 30 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: tkestell | last post by:
Is their anyway to perform mass deletes (several million records) without "maxing out" rollback segments? I'm working on archiving data from an Oracle 8.1.7 database The system is about 4 years...
2
by: Alice | last post by:
Hi all, Given a rollback segment with storage as follows : Initial Extent 5 MB Next Extent 5 MB Min Extents 20 Does this mean that every time a transaction uses this rollback segment it...
2
by: Alice | last post by:
Hi all, I have a problem with rollback segment. I am a beginner and do not have much knowledge of DBA. Anyways, the problem is there is a transaction of around 105 MB. This would not fit...
1
by: anders_tung | last post by:
Hi, I have a procedure which will call 3 functions. First function will update a record. Second function will delete a record. Third function will insert a record. Each function will return...
3
by: level8 | last post by:
Hi, Everybody, I'm a Hungarian SQL user and I need a little help for SQL Server 7 ! I protect my table against bad data with a trigger. I use ROLLBACK and RAISERROR statement in this trigger....
1
by: Susan Lam | last post by:
Hi, I am an Oracle developer and new to SqlServer. Is there rollback segment in SqlServer? If there is, does it use only for the purpose of rollback or to maintain read consistency as well? ...
1
by: cheesey_toastie | last post by:
I have a long query which I have set off and would like to stop, and rename one of the tables used. My query is due to my lack of understanding of the underlying structure of MSSQL-Server... ...
2
by: Ian Boyd | last post by:
We're encountering a situation where we're encountering a deadlock, and someone's been made the deadlock victim. But after that, DB2 refuses to run any SQL, and instead we get the error message: ...
1
by: varmamkm | last post by:
I am new to db2 and want to know more about rollback and exception handling.... I am using AS/400 operations navigator to write the stored procedures. I am trying this by using SAVEPOING and...
2
by: NarutoFanatic | last post by:
Hello, I'm having trouble using a transaction - rollback statement in sql. I can't seem to have the rollback executed during an error when i've altered a table to add a column with the same name...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.