Skip to Main Content
  • Questions
  • Rollback segment needed via database link?

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question.

Asked: February 28, 2004 - 3:54 pm UTC

Last updated: March 02, 2004 - 9:50 am UTC

Version: 8.1.7

Viewed 1000+ times

You Asked

Hi Tom,

I want to transfer a 2G table from database1 to database2 (both are the same version, on different server) via database link (use insert append). We want to test the performance against the transportable tablespace. Is there any rollback segment needed in this process to keep the read consistent image on database1 (assume there is update/insert/delete on database1 during the process)? If yes, should I need to create a rollback segment with 2G? And how to specify the rollback segment on the remote database?

Thanks,
David

and Tom said...

you will need sufficient RBS configured in database1 in order to ensure that it does not wrap around and get reused during the period of time it takes to do the insert /*+ append */ into database 2. the RBS on db1 will be used for read consistency.

Creating a "single" 2gig rbs won't buy you much since the probability of an ora-1555 is directly related to the size of the SMALLEST rbs you have, not the largest. You want to have sufficient, equi-sized RBS's on db1. Your DBA should know what to do here.

The RBS on db2 is hardly worth mentioning since the only RBS generated would be for data dictionary updates, not for table updates (assuming no indexes on the table being inserted into of course). insert append is used to bypass UNDO generation on the table itself. No need to specify any RBS for db2.

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

2 GB table copy

Dilip Dandekar, March 01, 2004 - 12:03 am UTC

Export / Import of this table may be much simpler.

Tom Kyte
March 01, 2004 - 7:34 am UTC

why?

you would have the same exact consistent read issue on db1
but a larger RBS issue on db2


How can I specify the rollback segment in remote database?

A reader, March 01, 2004 - 8:53 am UTC

Hi Tom,

Thanks for the info. But I am still don't understand your statement : "Creating a "single" 2gig rbs won't buy you much since the probability of an ora-1555 is directly related to the size of the SMALLEST rbs you have, not the largest. You want to have sufficient, equi-sized RBS's on db1". Do you mean that creating many small rollback segment is better than creating a large rollback segment on db1?

Thanks,
David



Tom Kyte
March 01, 2004 - 9:14 am UTC

No, not at all.

I am saying "the probability of ora-1555 is related to the size of the smallest rbs you have"

if you have 15 2gig RBS's and 1 512k rbs -- your probability of an ora-1555 is based mostly on the 512k rbs. It will be used as often as the 2gig rbs's but it will "wrap around" and reuse itself much faster. If someone needs the undo that was in that small one -- and it no longer exists -- ora-1555 is the result.

When using manual undo:

You want to have equi-sized RBS's

Each of which is large enough to not wrap around under normal conditions -- for the amount of time it takes to execute your long running queries.

Say you generate "about 5meg of undo per minute" during peak (5meg is just a number, pretend it is "N")

Now, you have queries that need to run for 10minutes.

You need at least 75meg of undo (room for comformt, 10*5 = 50meg, 75 just makes us feel better).

So, if you decide you want 15 rollback segments (you have about 10-20 concurrent transactions for example) each RBS should be about 5meg in size nominally.


In that fashion, you should find your RBS is not wrapping around and reusing itself inside of the 10 minute window. You should not be recieving the ora-1555



If you are using automatic undo:

set undo retention to 900 (about 15 minutes).

make sure you have sufficient disk space allocated to the undo tablespace to allow it to hold 15 minutes of undo.




Great explanation

A reader, March 02, 2004 - 9:50 am UTC

Hi Tom,

Thanks for your explanation.

David

More to Explore

Hints

Need more information on hints? Check out the complete hint descriptions