Data Locks
An additional optimization can be applied to caching through the use of Data Locks.
How to set Data Lock
Step 1. Define Fact Security for the Cube:
1. In the PowerOLAP ribbon, select Model tab and Cubes command.
The Cubes dialog box appears.
2. Select a cube (in this example, Future Year Model is selected), and click the Fact Security button.
3. Click Add button.
This adds a range name at the top of the right hand side of the dialog box.
4. Rename the range relevant to the security being created.
In the example below, Last Months Budget is created.
5. Click the Build Range Reference button .
This will display the Build Range Reference dialog box.
6. Select the Dimensions and Member of those Dimensions as shown in the succeeding images below:
7. Click OK.
The Fact Data Security Rules dialog box will be displayed on the screen, as shown below:
8. Click the Allows button.
This will add an Allows word in the statement found at the right hand pane of the dialog box, as shown below:
9. Click the Rights button.
The Specify Data Security Access Levels dialog box will be displayed on the screen, as shown below:
10. In the Define Users and Groups for section, select PowerOLAP button and pick the user (e.g., Test)
11. Click OK.
The Specify Data Security Access Levels dialog box will be displayed, as shown below:
12. Select the Test user and make sure that the Access level is Read (selected by default).
13. Click OK.
This will return the user to the Fact Data Security Rules dialog box. The defined Dimensions and Users or the defined range will be displayed on the screen.
14. Type a semi-colon at the end of the security statement:
15. Click the Check button to check if security statement is free from syntax errors.
16. Click OK.
This will close the Specify Data Security Access Levels dialog box and display back the Cubes dialog box.
Notes
Now that a security range has been defined, PowerOLAP® has a feature that allows user to lock that Data Range. By locking the Data Range, the user is determining or specifying that no one is allowed to modify the values within the range specified.
Step 2. Lock the data range:
17. From the Cubes dialog box (shown below), make sure that the appropriate cube is selected (as in the example, Future Year Model cube must be selected) then click the Data Locks button.
18. Select a defined Fact Security in the list. In this case, select the Last Months Budget that was earlier defined.
19. Click the Lock Button.
20. Click OK.
21. Back in the Cubes dialog, click OK to close it.
Effects of Data Locks in Caching
The PowerOLAP® Caching Algorithm takes advantage of the knowledge that no one is allowed to ever change the values in the defined range (March, Canada). Therefore, by defining Data Locks and locking ranges of data within PowerOLAP®, users can optimize models by preserving the cache.