Prev | Current Page 387 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"


Creating an Archive
You can create one or several Flashback Data Archives in existing tablespaces using the create
flashback archive command; however, Oracle best practices recommends that you use dedicated
tablespaces. All archives must have a default retention period using the retention clause and can
optionally be identified as the default archive using the default keyword. The disk quota in an
archive is limited by the disk space within the tablespace unless you assign a maximum amount
of disk space in the archive using the quota keyword.
In this example, you first create a dedicated tablespace for your Flashback Data Archive:
SQL> create tablespace fbda1
2 datafile '+data' size 10g;
Tablespace created.
SQL>
Next, you create three Flashback Data Archives: one for the ES department with no quota limit
and a ten-year retention period, a second one for the finance department with a 500MB limit and
a seven-year retention period, and a third for all other users in the USERS4 tablespace as the default
with a 250MB limit and a two-year retention period:
SQL> create flashback archive fb_es
2 tablespace fbda1 retention 10 year;
Flashback archive created.
SQL> create flashback archive fb_fi
Chapter 7: Managing Transactions with Undo Tablespaces 237
2 tablespace fbda1 quota 500m
3 retention 7 year;
Flashback archive created.
SQL> create flashback archive default fb_dflt
2 tablespace users4 quota 250m
3 retention 2 year;
Flashback archive created.


Pages:
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399