Domanda

Could some body help me on auto commit of below statements. How do you I use Commit statement in Oracle to avoid the auto commit confirmation dialogue boxes?

TRUNCATE TABLE manual_list_backup; 

INSERT INTO manual_list_backup 
SELECT * 
FROM   manual_transactions 

I am executing the above statement in TOAD Data-point. Every time this statement is run I get the Dialogue box saying that

You have uncommitted changes on 'My schema Name'. Do you want to commit them?

Unless I say YES to this dialogue box the above statement will not produce any results

È stato utile?

Soluzione

". Every time this statement is run I get the Dialogue box saying that "You have uncommitted changes on 'My schema Name'.Do you want to commit them"."

So what you're really complaining about is a feature of TOAD. Because Oracle will quite simply execute the implicit COMMIT for any DDL statement. Your problem is that TOAD is interfering with the default Oracle behaviour with its chiding dialogue box.

This nannying tone is one reason why I dislike IDEs so much. They are often slick and helpful but sometimes they just need to step out of the way and let us get on with the jobs.

It's been a long time since I used TOAD (too expensive) but there ought to be a way to switch off this dialogue. Is there a checkbox on the dialogbox itself? Something like Always show this message? Alternatively, there may be something in the View | Toad Options menu, perhaps under Oracle | Transactions. A sophisticated IDE such as TOAD is highly customisable.

Altri suggerimenti

You can not rollback TRUNCATE statement.

The operation cannot be rolled back and no triggers will be fired. As such, TRUNCATE is faster and doesn't use as much undo space as a DELETE.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top