Program Administration
5.4. OFFLINE MODE USER GUIDE
Figure 5.4.2: Log-on dialogue. Database page
• PressOK
• An info message is shown. (fig.5.4.3)
Figure 5.4.3: Info message
• PressOK
• After initialization the usual PowerFactory application window will is shown.
5.4.1.2 Release Offline Session
• Open the main menu File → Offline→ Terminate Offline session
• A warning message is shown to confirm the synchronization.
• PressYes
• Then all unsynchronized local changes are transferred to the server and the local Offline database is removed.
5.4.1.3 Synchronize All
Synchronizes the global data (new users, projects added, projects removed, projects moved) and all subscribed projects.
• Open the main menu File → Offline→ Synchronize all
5.4.1.4 Subscribe Project for reading only
• Open the Data Manager and navigate to the project
• Right-click on the project stub. A context menu is shown.
• Select Subscribe project in Offline mode for reading only
Then the project is retrieved from the Offline Proxy Server and stored in the local Offline DB cache.
5.4.1.5 Subscribe Project for reading and writing
Write access to the project is required.
• Open the Data Manager and navigate to the project
• Right-click on the project stub. A context menu is shown.
• Select Subscribe project in Offline mode for reading and writing
5.4.1.6 Unsubscribe Project
• Open the Data Manager and navigate to the project
• Right-click on the project. A context menu is shown.
• Select Unsubscribe project in Offline mode
5.4.1.7 Add a new project
A new project is created in Offline mode. It is available only in this Offline session. Later this project should be published to other users and synchronized to the Online database.
• Create new project or import an PFD file with a project
• Open the Data Manager and navigate to the project
• Right-click on the project stub. A context menu is shown.
• Select Subscribe project in Offline mode for reading and writing
5.4. OFFLINE MODE USER GUIDE
5.4.1.8 Synchronize Project
Synchronizes a subscribed project. If the project is subscribed for reading only, the local project will be updated from the Online database. If the project is subscribed for reading and writing, the changes from the local Offline database will be transferred to the Online database.
• Open the Data Manager and navigate to the project
• Right-click on the project stub. A context menu is shown.
• Select Synchronize
5.4.2 Functionality in Online mode
5.4.2.1 Show current Online/Offline sessions
The session status for each user is shown in the Data Manager.
Figure 5.4.4: Online and Offline Users
In figure5.4.4:
• User 1 and Administrator are logged in an Online session. They are marked by the green ONLINE icon.
• User 2 has started an Offline session. It is marked by the red OFFLINE icon.
• Public, Demo, and User 3 are not logged on at all.
5.4.3 Terminate Offline session
It might be necessary that an Offline session has to be terminated by the Administrator e.g. if the computer where the Offline session was initialized is now damaged and can’t be used any more, and the user wants to start a new Offline session on a different computer.
The Administrator is able terminate such a session:
• Right-click on the user object; the context menu is shown.
• Select Terminate session (see fig.5.4.5)
Figure 5.4.5: Terminate Offline session
• A warning message is shown to confirm the synchronization.
• PressYes
As shown in figure5.4.6User 2has no active session now:
Figure 5.4.6: Online Users
5.5 Housekeeping
5.5.1 Introduction
Housekeeping automates administration of certain aspects of the database, in particular purging projects, emptying user recycle bins and the deletion of old projects. Housekeeping is triggered by the execution of a Windows Scheduled Task; this can be set up to run at night, thus improving performance during the day by moving regular data processing to off-peak periods. An additional benefit to housekeeping is that users will need to spend less time purging projects and emptying recycle bins, something in particular that can slow down the process of exiting PowerFactory .
Housekeeping is only available for multi-user databases (e.g. Oracle, SQL Server). For details about how to schedule housekeeping, see the PowerFactory Installation Manual.
5.5. HOUSEKEEPING
5.5.2 Configuring permanently logged-on users
Normally housekeeping will not process data belonging to logged-on users; however, some user ac-counts (e.g. those for a control room) may be connected to PowerFactory permanently. These users can be configured to allow housekeeping to process their data whilst logged-on. This is done from the User Settings dialogue (see figure5.5.1). Regardless of this setting, housekeeping will not operate on a user’s active project.
Figure 5.5.1: The User Settings Dialogue: housekeeping for connected users
5.5.3 Configuring housekeeping tasks
The SetHousekeeping object is used to control which housekeeping tasks are enabled (see figure5.5.2).
It is recommended that you move this object from Database∖System∖Configuration∖Housekeeping to Database∖Configuration
∖Housekeeping, in order to preserve your configuration through database upgrades.
The following sections discuss the different housekeeping tasks shown on the SetHousekeeping object.
Figure 5.5.2: The SetHousekeeping object
5.5.4 Configuring deletion of old projects
If ‘Delete projects based on last activation’ is set on the SetHousekeeping object, then when house-keeping executes, for each user, each project in turn will be considered for automatic deletion.
The project properties determine whether a project can be automatically deleted, as shown in fig-ure5.5.3. The default setting is for project deletion to be off. When set on, the default retention pe-riod is 60 days. These defaults can be changed for new projects by using a template project (under Configuration/Default in the Data Manager tree).
Figure 5.5.3: Project properties
You can change the settings for many existing projects at once using the tabular pane of the Data Manager window (select the relevant column, right-click and choose Modify Values). A value of ’1’ is
5.5. HOUSEKEEPING
equivalent to the Housekeeping project deletion radio button being set to ‘On’. (see figure5.5.4). You can also change projects in bulk via the tabular window resulting from a Find operation, though note that executing a Find is potentially a lengthy operation.
Figure 5.5.4: Setting parameters for many projects at once
A project will be deleted by the housekeeping task if it meets the following criteria:
1. The project is configured for automatic deletion on the Storage page of the project properties.
2. The last activation of the project is older than the retention setting on the project.
3. It is not a base project with existing derived projects
4. It is not a special project (user settings, or anything under System or Configuration trees) 5. The project is not locked (e.g. active).
6. The owner of the project is not connected, unless that user is configured to allow concurrent housekeeping (see section5.5.2).
5.5.5 Configuring purging of projects
If ‘Purge projects’ is set on the SetHousekeeping object, then when housekeeping executes, each project in turn will be considered for purging. A project that is already locked (e.g. an active project) is not purged.
The criteria for housekeeping to purge a project are:
• if the project has been activated since its last purge.
• if it is now more than a day beyond the object retention period since last activation, and the project hasn’t been purged since then.
• if the project is considered to have invalid metadata (e.g. is a pre 14.0 legacy project, or a PFD import without undo information).
Once housekeeping is configured to purge projects you can consider disabling the automatic purging of projects on activation, thus preventing the Yes/No dialogue popping up. To do this set ’Automatic Purging’ to Off on the Storage page of the Project properties dialogue. You can also set this parameter to Off for many projects at a time (see methods described in section5.5.4).
5.5.6 Configuring emptying of recycle bins
If ‘Delete recycle bin objects’ is set on the SetHousekeeping object, then when housekeeping executes, each user’s recycle bin in turn will be examined. Entries older than the number of days specified on the SetHousekeeping object (see figure5.5.2) will be deleted.
5.5.7 Monitoring Housekeeping
Once deployed, how do you know that housekeeping is operating effectively? For example, it could be failing every night with a connection error. An administrator should regularly check that housekeeping is working. The primary check is to inspect the HOUSEKEEPING_LOG table via SQL or the data browsing tools of your multi-user database. For each run, housekeeping will insert a new row to this table showing the start and end date/time and the completion status (success or failure). Other statistics such as the number of deleted projects are kept. Note that absence of a row in this table for a given scheduled day indicates that the task failed before it could connect to the database. In addition to the HOUSEKEEPING_LOG table, there is also a detailed log of a Housekeeping run in the log file of the Housekeeper user.
5.5.8 Summary of Housekeeping Deployment
The basic steps to implement housekeeping are:
1. Set up the Windows Scheduled Task, as described in the PowerFactory Installation Manual..
2. Configure users expected to be active during housekeeping, as described in section5.5.2.
3. Configure the SetHousekeeping object as described in section5.5.3.
4. If using the project deletion task, configure automatic deletion properties for new projects, as described in section5.5.4.
5. If using the project deletion task, configure automatic deletion properties for existing projects, as described in section5.5.4.
6. Regularly monitor HOUSEKEEPING_LOG table to check for success after housekeeping runs, as described in5.5.7.