3
8/17/2014 What is pragma autonomous transaction? Plz can u let me know it in a simple understandable way.Thanks in advance.Byee http://www.geekinterview.com/question_details/36513 1/3 Home | Ask Question | Interview Questions | Tech FAQs | Engineering | Company | Geek Forums | Interview Coaching | Online Quiz | Learning Center | Interview eBook Home Interview Questions Oracle PL/SQL Search Login | Sig Question: 308 of 490 Fi rst Previous Next Last Return back to PL/SQL Answer Question Answer Question Login to rate this answer. Answer Question Login to rate this answer. Answer Question Login to rate this answer. Showing Answers 1 - 8 of 8 Answers missoracle Answered On : Oct 17th, 2006 Pragma Autonomous transaction:- -- When ever we commit.. all the transactions before the last commit in that session get saved. Suppose that u hav a senario u jst want a particular transaction only 2 be save.Inorder to achive that u make this as a seperate transaction which can b commited but prior to this the txns are not commit.eg: being insert into tab1 () values (); update tab2 set values.. some more stmts.. pragma sutonomus transaction insert into tab3 values(); commit; here.. insert into tab1 is only saved but not tab1 and tab2. sangeeta Answered On : Oct 19th, 2006 what she means is only tab3 will be committed and not tab1 and tab2.she made a spell mistake. basukolur014 Answered On : Nov 5th, 2006 View all questions by basukolur014 View all answers by basukolur014 hello friend pragma autonomous transcation is nothing set of sql statements that transcation is differant from parent transcationconsider one anynomous block in that you are calling procedure declare a number;begininsert into x values(12,30);---know iam calling procedure here-- procedurename();---rollback transacation--rollback;end;above transcation is parent transacation...if u rollback the transcation takes place in procedure is also get rollback...to that not happenin procedure we are making use pragma autonomous transcation that is differant from parent transcationpragma keyword tells compiler forcibily to do that....in procedurecreate or replace procedure basupragma autonomous_transcation;asbegininsert into y values(20,'xxx');commit;end basu;this transcation is not rollback because its differant from parent transcation PA WA NA HUJA HUJA Answered On : Nov 7th, 2006 View all answers by PAWANAHUJAHUJA autonomous transaction means independent commitedundersatnd by ex:1.)Create or replace What is pragma autonomous transaction? Plz can u let me know it in a simple understandable way. Thanks in advance. Byee Asked by: Interview Candidate | Asked on: Oct 17th, 2006 User Panel Register Login Lost Password Get Activation Code Categories Backup and Recovery Basics Concepts and Architecture D2K Data Access Database Administration Database security Database Tuning Distributed Processing General Memory Management Oracle Forms 4.0 PL/SQL Programmatic Constructs RMAN Interview Questions Scenarios Your Question... GO Ads Connect Ads Interview Question Ask Interview Question? Latest Questions Web testing Call external procedure Call fieldcontrols Call soap web service from PL/SQL SQL optimization Call a procedure in trigger Access cursor output Load tab delimited data Better tunning PL/SQL blocks Set time for job Nested tables PL/SQL coding help For each hour, list the number of called, total transactions' values, and total duration. How can I use the bind variable in a report to create output file. For example I give the starting date and e date. I would like to get the report output in a file wh has the start date and e How to export SQL XML using SQL or PL/SQL or dyna SQL for Oracle data from Oracle database. What is difference between records group and objec Series: Interview Questions Subject: Oracle Topic: PL/SQL Ad by Mov ie Mode Ad by Mov ie Mo

What is Pragma Autonomous Transaction_ Plz Can u Let Me Know It in a Simple Understandable Way.thanks in Advance

Embed Size (px)

DESCRIPTION

autonomus trans

Citation preview

Page 1: What is Pragma Autonomous Transaction_ Plz Can u Let Me Know It in a Simple Understandable Way.thanks in Advance

8/17/2014 What is pragma autonomous transaction? Plz can u let me know it in a simple understandable way.Thanks in advance.Byee

http://www.geekinterview.com/question_details/36513 1/3

Home | Ask Question | Interview Questions | Tech FAQs | Engineering | Company | Geek Forums | Interview Coaching | Online Quiz | Learning Center | Interview eBook

Home Interview Questions Oracle PL/SQL

Search Login | Signup

Question: 308 of 490

First Previous Next Last

Return back to PL/SQL Answer Question

Answer Question

Login to rate this answer.

Answer Question

Login to rate this answer.

Answer Question

Login to rate this answer.

Showing Answers 1 - 8 of 8 Answers

missoracleAnswered On : Oct 17th, 2006

Pragma Autonomous transaction:- -- When ever we commit.. all the transactions before the last

commit in that session get saved. Suppose that u hav a senario u jst want a particular transaction

only 2 be save.Inorder to achive that u make this as a seperate transaction which can b commited but

prior to this the txns are not commit.eg: being insert into tab1 () values (); update tab2

set values.. some more stmts.. pragma sutonomus transaction insert into tab3

values(); commit; here.. insert into tab1 is only saved but not tab1 and tab2.

sangeetaAnswered On : Oct 19th, 2006

what she means is only tab3 will be committed and not tab1 and tab2.she made a spell mistake.

basukolur014Answered On : Nov 5th, 2006

View all questions by basukolur014 View all answers by basukolur014

hello friend pragma autonomous transcation is nothing set of sql statements that transcation is

differant from parent transcationconsider one anynomous block in that you are calling

procedure declare a number;begininsert into x values(12,30);---know iam calling procedure here--

procedurename();---rollback transacation--rollback;end;above transcation is parent transacation...if u

rollback the transcation takes place in procedure is also get rollback...to that not happenin procedure

we are making use pragma autonomous transcation that is differant from parent transcationpragma

keyword tells compiler forcibily to do that....in procedurecreate or replace procedure basupragma

autonomous_transcation;asbegininsert into y values(20,'xxx');commit;end basu;this transcation is not

rollback because its differant from parent transcation

PAWANAHUJAHUJAAnswered On : Nov 7th, 2006

View all answers by PAWANAHUJAHUJA

autonomous transaction means independent commitedundersatnd by ex:1.)Create or replace

What is pragma autonomous transaction? Plz can u let me know it in a simple

understandable way.

Thanks in advance.

Byee

Asked by: Interview Candidate | Asked on: Oct 17th, 2006

User Panel

Register

Login

Lost Password

Get Activation Code

Categories

Backup and Recovery

Basics

Concepts and Architecture

D2K

Data Access

Database Administration

Database security

Database Tuning

Distributed Processing

General

Memory Management

Oracle Forms 4.0

PL/SQL

Programmatic Constructs

RMAN Interview Questions

Scenarios

Your Question...

GO

Ads

Connect

Ads

Interview Question

Ask Interview Question?

Latest Questions

Web testing

Call external procedure

Call fieldcontrols

Call soap web service from PL/SQL

SQL optimization

Call a procedure in trigger

Access cursor output

Load tab delimited data

Better tunning PL/SQL blocks

Set time for job

Nested tables

PL/SQL coding help

For each hour, list the number of called, totaltransactions' values, and total duration.

How can I use the bind variable in a report to create anoutput file. For example I give the starting date and enddate. I would like to get the report output in a file whichhas the start date and e

How to export SQL XML using SQL or PL/SQL or dynamicSQL for Oracle data from Oracle database.

What is difference between records group and objects

Series: Interview Questions Subject: Oracle Topic: PL/SQL

Ad by Mov ie Mode

Ad by Mov ie Mode

Page 2: What is Pragma Autonomous Transaction_ Plz Can u Let Me Know It in a Simple Understandable Way.thanks in Advance

8/17/2014 What is pragma autonomous transaction? Plz can u let me know it in a simple understandable way.Thanks in advance.Byee

http://www.geekinterview.com/question_details/36513 2/3

Answer Question

Login to rate this answer.

Answer Question

Login to rate this answer.

Answer Question

Login to rate this answer.

Answer Question

Login to rate this answer.

Answer Question

Login to rate this answer.

procedure auto_transis pragma autonomous_transaction;begininsert into table

ee1(1,'pawan');commit;end;now suppose again i enter the value by another pl/sql blockbegininsert

into table ee1(2,'ahuja')autonomous_transaction;rollback;end; first block will be commit and other

will be rollback; RegardsPawan AhujaTechnical consultant

suresh.sajwanAnswered On : Jan 22nd, 2008

View all answers by suresh.sajwan

Pragma autonomous transaction:It is used for commiting the particular block only.for e.g if u declare

pragma autonomous transaction suppose there are two insert statement in your Code and if the two

insert fails it will go to the exception part for insertion and in the exception part there is one more

insertion and then u commit. it will commit all the insert stmt which should not happen.for commiting

only the exception part pragma autonomous transaction is used.--Suresh Sajwan

shinehereAnswered On : Feb 25th, 2008

View all answers by shinehere

An autonomous transaction is a transaction that is started within the context of another

transaction, called the parent transaction, but is independent of it. An autonomous transaction can

be committed or rolled back regardless of the state of the parent transaction. For making a

transaction autonomous, we should use the PRAGMA PRAGMA AUTONOMOUS TRANSACTION A

PRAGMA is a compiler directive, which in this case tells the compiler that this transaction is to be

considered as AUTONOMOUS.

lijinaAnswered On : Nov 15th, 2011

Before that statement that is pragma auto_tra only will save ...

pragadeeshAnswered On : Apr 19th, 2012

Very simple meaning is...

1) Pragama means force (like it says to compiler forcible do this operation)

2) It is used for committing the particular block.

3) We can't rollback this Pragama autonomous block

Related Answered Questions

Basic elements of oop

Displaying parameter/render variable in ms-xl output

How to write an query for the following?

What is advance reporting concept in micro strategy?

Graph performance

Increment values based on column (looping)

Sql-transaction in nested stored procedure

Transaction control transformation to get flat file names

Involving testing personnel in project planning stage

Pension domain

Related Open Questions

Flat file with header and trailer

SQL

SQL Plus

System Architecture

Interview Coaching

Has anyone asked you for

help? What did you do?

What was the most important

decision you ever had to make?

What do you do when things

do not go as planned? Cite an

example.

Careers and Higher Education

Options for BBA Graduates

Do you find yourself busy most

of the time? Why?

How productive are you?

How do you handle workplace

problems?

How to Overcome Employment

Gap during interview.

How do you handle pressure

and stress?

What will you do when you are

not able to get your message

across to your audience?

group?

Hi how do I call procedures which have ref cursors asparameters and print the elements in the ref cursor inPL/SQL developer ?I executed the following code inPL/SQL developer : create or replace pac

What is the syntax for ref cursor working with forms 6i?

Interview & Career Tips

Get invaluable Interview and Career Tips delivered

directly to your inbox. Get your news alert set up today,

Once you confirm your Email subscription, you will be

able to download Job Inteview Questions Ebook . Please

contact me if you there is any issue with the download.

Page 3: What is Pragma Autonomous Transaction_ Plz Can u Let Me Know It in a Simple Understandable Way.thanks in Advance

8/17/2014 What is pragma autonomous transaction? Plz can u let me know it in a simple understandable way.Thanks in advance.Byee

http://www.geekinterview.com/question_details/36513 3/3

GeekInterview

About Us, Privacy Policy, Terms and Conditions, DMCA, Contact Us

Popular Sections

Code, Learn, Online Testing, Geek Talk,

Propose Category, Ask Question, Site Updates

SAP FICOew

Interview questions on hogan core banking testing

Information required regarding certifications in etl

Adding new application at existing Oracle 11gr2 database.

Adding new application at existing Oracle 11gr2 database.

Database design

SAP bi/bo consultant

Interview question from ibm, hexaware.

Disk have become damage and we have datafile on it.

Copyright © 2014 GeekInterview.com | All Rights Reserved