Implementing Information Lifecycle Management Using Oracle Database 10g
Implementing Information Lifecycle Management Using Oracle
Database 10g
The goal of this tutorial is to show you how to manage data
during its lifetime by using the Information Lifecycle Management strategy with
Oracle Database 10g.
Approximately 1 hour
This tutorial covers the following topics:
Place the cursor over this icon to load and view all
the screenshots for this tutorial. (Caution: Because this action loads all screenshots
simultaneously, response time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor
over each individual icon in the following steps to load and view only the screenshot
associated with that step.
Information Lifecycle Management (ILM) is related to everything
that happens to data during its lifetime.
Although most organizations have long regarded their stores
of data as one of their most valuable corporate assets, how this data was managed
and maintained varies enormously. Originally, data was used to help achieve
operational goals, run the business, and help identify the future direction and
success of the company. However, new government regulations and guidelines, such
as Sarbanes-Oxley, HIPAA, DOD5015.2-STD in the U.S. and the European Data Privacy
Directive in the European Union, are a key driving force in how and why data
is being retained, as they are now requiring organizations to retain and control
information for very long periods of time.
Information today comes in a wide variety of types, for example,
an e-mail message, a photograph, or an order in an online transaction
processing system. The challenge now before all organizations is to understand
how their data evolves, determine how it grows, monitor how its usage changes
over time, and decide how long it should survive.
Today, there are two additional objectives IT managers are
trying to satisfy: to store vast quantities of data, for the lowest possible
cost; and to meet the new regulatory requirements for data retention and protection.
Oracle Database 10g is Ready for Business ILM
Oracle Database 10g is ready today for Business ILM. It is
capable of storing different types of data, and storing all your data
in an Oracle database, means that it is much easier to manage, because the data
is all in one place, instead of being stored using many different formats. Thus,
the Oracle database is the ideal platform to implement an Information Lifecycle
Management policy, because it has a number of unique features that makes it
very easy to implement an ILM solution:
 |
Fine-grained: Managing data at individual
row level |
 |
Application Transparency: Data classification
is transparent |
 |
Low-Cost: Uses low cost storage to reduce
costs |
Implement ILM in Three Easy Steps
To implement ILM using Oracle Database 10g, perform
the following steps:
| 1. |
Define the Data Classes. |
| 2. |
Create storage tiers for the Data Classes.
|
| 3. |
Manage access and migration of data by class. |
Data can be classified in a variety of ways, such as on frequency
of usage, and then storage tiers can be created for the data classes that have
been identified. During its lifetime, data will migrate between
the data classes and access to it will be controlled. Eventually the data may
be archived or it could remain in the database forever.
Oracle Database 10g is ideal for implementing ILM, because it is simple to use (with no specialized data stores to manage) and it operates independent of any hardware. It has proven fast performance,
therefore, all information can be quickly retrieved. The security features in
the database ensure that data is secure from unauthorized access and data is
always transactionally consistent. The Oracle database provides total flexibility,
therefore, it can rapidly adapt to any change in requirements, which is extremely
important because of the continuing evolution of the emerging regulations. Using
Oracle Database 10g, a comprehensive ILM solution can be implemented for the
lowest possible cost.
Back to Topic List
This tutorial shows how a number of the features in the Oracle
database can be used to implement an Information Lifecycle Management strategy.
During this tutorial, you migrate data between storage tiers, protect it from
changes, and control the data that users may see.
In this tutorial, you retain all sales orders placed since
1995. Users are only allowed to see data from the year 2000 onwards and only
a special category of users is allowed to view the historical data.
Back to Topic List
Before starting this tutorial, you should have:
Back to Topic List
Identifying the Data Classes requires analyzing the data to
determine the most suitable classification. Perform the following steps to see
how the data is currently classified:
| 1. |
Open a browser window, and enter the following URL:
http://<hostname>:5500/em
Log in as system/<password>, and click Login.

|
| 2. |
Click the Administration tab.

|
| 3. |
Under Schema, click Tables.

|
| 4. |
Enter SH for the schema and SALES in
the Object Name field. Click Go.

|
| 6. |
Make sure SALES is selected and click Edit.

|
| 7. |
Click the Partitions tab.

|
| 8. |
The data has been classified by date using the
TIME_ID column, and the data has been grouped by years or quarters depending on
how old it is. All the data for each date range is held in a partition.
Classifying by time is a very common method and in this case is the most
suitable method. Click the Cluster Database: O10G locator link.

|
Back to Topic List
Next you need to identify where all your data is to be
stored. Typically this would involve using different types of storage devices
such as high performance disks for frequently accessed data and low-cost devices
for infrequently used and historical data. In this tutorial, you create three storage
tiers: High Performance, Low Cost, and Historical. Because you do not have three
types of storage devices available, you create tablespaces that map to the tiers
instead. In this section, you perform the following tasks:
Create Tablespaces for Each Storage Tier
| 1. |
Click Tablespaces under Storage.

|
| 2. |
Click Create.

|
| 3. |
Enter HIGH_PERFORMANCE in the Name field, and scroll
down.

|
| 4. |
In the Datafiles section, click Add. Note that
for the High_Performance tier the data files would typically be placed
on a high performance storage device or by using ASM. Because those devices
are not unavailable, the data files will have to be placed on a single
device in order to complete this step.

|
| 5. |
Enter high_perf in the File Name field and specify 3 MB for the file size. Click Continue.

|
| 6. |
Click OK.

|
| 7. |
Now you can create the next tablespace. Click Create.
The process is now repeated to create the Low Cost Storage Tier.

|
| 8. |
Enter LOW_COST in the Name field, and scroll down.

|
| 9. |
In the Datafiles section, click Add. Note that
for the LOW_COST tier the data files would typically be placed on a low
costs ATA storage devices. Because those devices are not unavailable, the
data files will have to be placed on a single device to complete
this step.

|
| 10. |
Enter low_cost in the File Name field and specify
10 MB for the file size. In the Storage section, select the Automatically extend
datafile when full check box, and enter 10 KB for the increment. Click Continue.

|
| 11. |
Click OK.

|
| 12. |
Click Create.

|
| 13. |
Enter HISTORICAL in the Name field, and scroll down.
The final tier is the Historical tier where all the orders before 2000 are held.

|
| 14. |
In the Datafiles section, click Add. Note that
for the Historical tier the data files would typically be placed on a
low cost ATA storage devices. Because those devices are not unavailable,
the data files will have to be placed on a single device in order to complete
this step.

|
| 15. |
Enter historical in the File Name field, and specify
10 MB for the file size. Click Continue.

|
| 16. |
Click OK.

|
| 17. |
Scroll down to see the list of tablespaces you just
created.

|
| 18. |
Note that the tablespaces are currently empty. Scroll
up to the top. Now you see the three tablespaces that correspond to each
storage tier. Note that in a real ILM implementation, the tablespaces
would not have to be named to correspond to the required storage tiers.
The tablespace approach has been used in this tutorial to illustrate the
process, because three types of actual storage devices are unavailable.

|
| 19. |
Click the Cluster Database: O10G locator link.

|
Back to List
Assign Partitions to Storage Tier Tablespaces
After the storage tiers have been created, the next step is
to assign the partitions holding the data to the appropriate storage tiers.
| 1. |
Under Schema, select Tables.

|
| 2. |
Enter SH in the Schema field and SALES in the Object
Name field. Click Go.

|
| 3. |
Click SALES.

|
| 4. |
Click the Partitions tab.

|
| 5. |
Assign the HIGH_PERFORMANCE partitions first. Select
the last set of pages in the drop-down list. The High Performance
storage tier should only contain orders for Q3 to Q4 for 2003.

|
| 6. |
Select the SALES_Q3_2003 partition, and select Move
in the Actions drop-down list. Click Go.

|
| 7. |
Click the searchlight icon for the Tablespaces field.

|
| 8. |
Select the HIGH_PERFORMANCE tablespace, and click
Select.

|
| 9. |
Click OK to assign the partition to the HIGH_PERFORMANCE tablespace.

|
| 10. |
Select the SALES_Q4_2003 partition, and select Move
in the Actions drop-down list. Click Go.

|
| 11. |
Enter HIGH_PERFORMANCE in the tablespace field,
and click OK.

|
| 12. |
Click Apply to commit your changes.

|
| 13. |
Now you can assign the LOW_COST tablespace to the partitions
from Q4 2000 to Q2 2003. Select any of the partitions within
this timeframe (SALES Q1 2002). Select Move in the Actions drop-down list, and
click Go.

|
| 14. |
Enter LOW_COST in the Tablespace field, and click
OK.

|
| 17. |
Perform the previous steps for the following partitions,
and assign the LOW COST tablespace. When done, click Apply.
SALES_Q1_2000
SALES_Q2_2000
SALES_Q3_2000
SALES_Q4_2000
SALES_Q1_2001
SALES_Q2_2001
SALES_Q3_2001
SALES_Q4_2001
SALES_Q1_2002
SALES_Q2_2002
SALES_Q3_2002
SALES_Q4_2002
SALES_Q1_2003
SALES_Q2_2003

|
| 18. |
Perform the previous steps for the following partitions
and assign the HISTORICAL tablespace. When done, click Apply.
SALES_1995
SALES_1996
SALES_H1_1997
SALES_H2_1997
SALES_Q1_1998
SALES_Q2_1998
SALES_Q3_1998
SALES_Q4_1998
SALES_Q1_1999
SALES_Q2_1999
SALES_Q3_1999
SALES_Q4_1999

|
| 19. |
All your partitions have been assigned to the various
storage tiers. Click the Cluster Database: O10G locator link.

|
| 20. |
Click Tablespaces.

|
| 21. |
Scroll down to see your tablespaces are now full with
data.

|
| 22. |
Notice that your tablespaces are now full with data.
Scroll up to the top, and click the Cluster Database: O10G locator link.

|
Back to List
Back to Topic List
The final step in implementing your ILM strategy is to decide
who can access your data and what they can do. There are different
techniques that can be used to restrict access to the historical data so that
it is not always visible in routine reports. In addition, you can prevent changes
to the historical data and illustrate how to store all of this data using the
minimum of storage requirements. Perform the following tasks:
Control Access to Historical Data
Because all the data is now being held in the database, it is
necessary to ensure that it is only viewed when it is really required, thus
saving query execution time and system resources by only accessing the data
that is really needed.
There are two techniques that can be used to restrict access
to the historical data:
 |
Using Views |
 |
Using a Virtual Private Database (VPD) policy |
In this section, you create two views: one that allows standard
users to access data from January 1, 2000 and another view that allows access
to the historical data. Perform the following steps:
| 1. |
In the Administration page, click Views under Schema.

|
| 2. |
Create a view called SALES_HISTORICAL that allows
access only to the historical data, that is, up to December 31, 1999. Click
Create.

|
| 3. |
Enter SALES_HISTORICAL in the Name field and SH
in the Schema field. Enter the following Query Text, and then click OK.
SELECT * FROM sales WHERE time_id < '1-Jan-2000'

|
| 4. |
Now create a second view SALES_CURRENT that allows
access to all the current data, that is, from January 1, 2000. Click Create.

|
| 5. |
Enter SALES_CURRENT as the Name, SH as
the Schema, and enter the following Query Text. Then click OK.
SELECT * from sales where time_id > '31-Dec-1999'

|
| 6. |
Scroll down to see the list of views.
You can see that you have two views created, SALES_CURRENT for
the recent data and SALES_HISTORICAL for all the old orders.

|
| 7. |
Notice the Views you just created. Now you need to create
the user SH_USER that will use them.
Scroll up and click the Cluster Database: O10G locator link.

|
Back to List
Query Historical Data
Now you can query the historical data. To query the historical data, perform the following
steps:
| 1. |
To illustrate, the SALES_HISTORICAL view is only showing data before the year 2000. Query the SALES_HISTORICAL view to report the most recent data it holds. This can be found by querying the time_id
column. Open a terminal window and enter the following commands:
cd /home/oracle/wkdir
sqlplus sh/sh
@ilm_query01
The @ilm_query01.sql
command contains the following:
select max(time_id)from sh.sales_historical;

|
| 2. |
Because this view contains data only up to the end of
1999, you can now report which Customers purchased the most goods up to
the year 2000. Execute the following command:
@ilm_query02
The @ilm_query02.sql
contains the following:
SELECT cust_last_name, sum(amount_sold)
FROM sh.sales_historical h, sh.customers c
WHERE c.cust_id=h.cust_id
GROUP BY cust_last_name
ORDER BY sum(amount_sold) desc;

|
Back to List
Specify a VPD Policy on Sales
With so much data being retained in the database, it is important
to ensure that users view only the data they are allowed to see. Although views
restrict what a user can see in the database, the user can bypass the view by
querying the table directly. To avoid this potential breach of security, which
can occur when someone does not use the designated application to query the
data and instead uses a tool, such as SQL*Plus, a security policy can be defined
by using Virtual Private Database (VPD) which defines exactly what data is visible.
In this section, you see how you can use VPD to prevent access to the historical
data. To prevent access, perform the following steps:
| 1. |
As user SH, count the number of rows visible in
the Sales table. Make a note of this number. At the moment, you have access
to all the data in the Sales table. From your SQL*Plus session, run the
following SQL script:
@ilm_count_sales
The @ilm_count_sales.sql
contains the following:
connect sh/sh select count(*) from sales;

|
| 2. |
Next as user SYSTEM, add the following VPD Policy which
states that a user only see data from January 1, 2000. From your SQL*Plus session,
run the following SQL script:
@ilm_add_policy
The @ilm_add_policy.sql
contains the following:
connect system/oracle CREATE OR REPLACE FUNCTION ilm_pf1 (oowner IN VARCHAR2, ojname IN VARCHAR2)
RETURN VARCHAR2 AS con VARCHAR2(200); BEGIN con :='time_id > ''31-DEC-1999'''; RETURN (con); END ilm_pf1; / BEGIN DBMS_RLS.ADD_POLICY (object_schema=>'SH',object_name=>'Sales', policy_name=>'ilm_current_data',function_schema=>'system', policy_function=>'ilm_pf1', sec_relevant_cols=>'time_id'); END; /

|
| 3. |
Now repeat the query of the Sales table as user SH and
fewer rows should be visible because only data from January 1, 2000 is
available to this user. From your SQL*Plus session, run the following SQL
script:
@ilm_count_sales
The @ilm_count_sales.sql
contains the following:
connect sh/sh select count(*) from sales;

|
Back to List
Restrict Update Access to the Sales
Data
In order to comply with some new regulations, you need to
show that only authorized users can update the sales data. Therefore, you need
to create a new user called SH_USER who is only permitted to read the sales
data. Perform the following steps:
| 1. |
In the Administration page, under Security, click Users.

|
| 2. |
The first step is to create a new user SH_USER. Click
Create.

|
| 3. |
Enter SH_USER for the Name and Password. Enter EXAMPLE in the Default Tablespace field, and TEMP in the Temporary Tablespace field.
Click the Roles tab.

|
| 4. |
Because this is not a privileged user, only limited resources
are granted to this user. Click Modify.

|
| 5. |
Select RESOURCE from the list of Available Roles,
and click Move. Then click OK.

|
| 6. |
To ensure that this user can only read the sales and
customer data, they must be explicitly granted the SELECT privilege. Click the
Object Privileges tab.

|
| 7. |
Select Table in the Select Object Type drop-down list, and click Add.

|
| 8. |
In the Select Table Objects field, enter SH.SALES,
SH.SALES_HISTORICAL, SH.CUSTOMERS. Select Select from the Available Privileges list, and click Move. Then click OK.

|
| 9. |
Click OK to create the user.

|
| 10. |
Select the Cluster Database: O10G locator link.

|
Back to List
Try to Update the Historical Data
Some new regulations require that data cannot be changed or
there may be a business requirement where records may not be altered after a
certain date. Using the security features within the Oracle database, user SH_USER
does not have sufficient privilege to update the historical data. Perform the
following steps:
| 1. |
Execute the following SQL script:
@ilm_update01
The @ilm_update01.sql
contains the following:
update sh.sales set prod_id=12 where prod_id=13 and time_id='10-Jan-98';

|
Back to List
Make Historical Data Read Only
There will come a point during the lifetime of the data when
updates to the data will no longer be allowed. In the previous section, you saw
how database security can be used to prevent changes, but an even better approach
is to set the tablespace to read only. After a tablespace is set to read only, absolutely
no one can update the data. Perform the following steps:
| 1. |
Switch back to Enterprise Manager Database Control.
In the Administration page, click Tablespaces under Storage.

|
| 2. |
In the Search field, enter HISTORICAL, and click
Go.

|
| 3. |
Then select Make Readonly from the Actions drop-down list, and click
Go.

|
| 4. |
Note that the tablespace is now set to read only.
Click the Cluster Database: O10G locator link.

|
Back to List
Back to Topic List
In this tutorial, you've learned how to:
 |
Identify Data Classes |
 |
Assign Data Classes to Storage Tiers |
 |
Manage Access and Migration |
Back to Topic List
 |
To learn more about
Oracle Database 10g, refer to additional OBEs on the OTN
Web site. |
 |
To ask a question about this OBE tutorial,
post a query on the OBE
Discussion Forum. |
Back to Topic List
Place your cursor on this icon to hide all screenshots.
|