14 Moving the Shared File System to a Database
WebCenter Sites can leverage a database to store its shared file system using the Java Nonblocking I/O (NIO) API. This eliminates the need for a network file share in a clustered environment and allows file locking to be handled by a Coherence cache.
Note:
Although moving the shared file system to a database helps streamline the backup process, the movement adds an overhead of 5-10% in the overall performance. To improve performance and make the impact negligible, Oracle recommends you to tune the NIO cache parameters based on your architecture.Out of the box, WebCenter Sites defaults to a disk-based shared file system (local or network). To move the shared file system to a database, complete the steps in this topic. Steps for reverting the process are also provided.
Note:
-
Only the Oracle 11g and 12c databases are supported.
-
Oracle recommends storing files managed by WebCenter Sites (also referred to as shared files) in a database. This helps in configuring highly available deployments along with streamlining backup and restore processes for your environments. The database can be WebCenter Sites’s own database or a separate database. Depending upon the needs of your site, you may need to plan for additional capacity or processing, or both.
-
If you are clustering WebCenter Sites, you must do the following steps before moving the shared file system:
-
Complete the steps in Setting Up a Cluster.
-
Add all cluster members to the Coherence Cluster:
-
In the WebLogic Server Administration Console, navigate to Domain Name > Environment > Coherence Clusters.
-
Select the default Coherence cluster, and then click the Members tab.
-
In the Clusters section, enable your WebCenter Sites cluster, and then enable the
All servers in the cluster
option.
-
-
-
Ensure that the primary node of the cluster has been set up and registered as a cluster node as Setting Up a WebCenter Sites Cluster describes.
-
The default data source name is
wcsitesDS
. If you want to use a different data source name, you must set thedatabaseConnector
bean insites_config_dir/NIOSharedServices.xml
to the new name before completing the following steps.Note:
Thesites_config_dir
isDOMAIN_HOME/wcsites/wcsites/config/
. -
If you have already setup a traditional, file-based cluster, the
wcs_properties.json
would have been moved to thesites-shared/config
directory as part of the cluster setup. In that case, make note of the following:-
Move the
wcs_properties.json
file back to thesites_config_dir
. -
If subsequently you wish to revert from database back to disk storage, then after having run the NIO Conversion utility with revert option, copy the
wcs_properties.json
file back to thesites-shared/config
directory.
-
-
If you want to store the WebCenter Sites shared file system in the WebCenter Sites repository database, increase the tablespace size for the
prefix_TS_WCSITES
andprefix_TS_TMP_WCSITES
tablespaces. -
If you want to store the WebCenter Sites shared file system in a database other than the WebCenter Sites repository database, do the following steps:
-
Create a new database with the same permissions as the WebCenter Sites repository database with the following commands:
-
CREATE SEQUENCE
-
CREATE SESSION
-
CREATE TABLE
-
CREATE TRIGGER
-
CREATE VIEW
-
UNLIMITED TABLESPACE
-
-
Create a new data source pointing to the new database, and deploy the new data source as a JDBC data source on the Managed Servers running WebCenter Sites.
-
Set the
databaseConnector
bean insites_config_dir/NIOSharedServices.xml
to the new data source name.
-
To move the WebCenter Sites shared file system from disk to a database (either the WebCenter Sites repository, or a different database), do the following steps:
Note:
If you store the WebCenter Sites shared file system in a database other than the WebCenter Sites repository database, logging in to the Admin interface takes a few extra minutes the first time.Parent topic: Configuring WebCenter Sites Components