Using Log Stores in a Cluster Environment

Define a relative or absolute path for the log store by specifying a path for the filename property within the CREATE LOG STORE statement.

Within a clustered environment, a file path must be specified for the filename property in a CREATE LOG STORE statement. Create one log store per project. The filename property in the log store definition should use a relative path; the preferred destination for log files is the base directory where project files are stored.

While it is not recommended, you can define an absolute file path for the log store instead of the recommended relative file path. However, if a project is restarted on a different machine, the absolute path must also be valid there. Configure projects to always start on the same machine by setting strong positive controller affinity.

  1. In the CCL editor, create a log store using the CREATE LOG STORE statement:
    CREATE [DEFAULT] LOG STORE storename
    PROPERTIES
    filename='filepath'
    	[sync={ true | false},]
    	[sweepamount=size,]
    	[reservepct=size,]
    	[ckcount=size,]
    	[maxfilesize=filesize];
  2. For the filename property enter either a relative (preferred) or absolute file path for the location of the log store:
    Option Description
    (Preferred) Relative path A relative path is relative to the base directory. Using a relative path means that your log store automatically points to the base directory. Relative paths do not point to the directory stack; this means that the path does not start with a drive letter or slash (/).
    (Not recommended) Absolute path An absolute path points to any location on your machine, regardless of the current working directory (base directory). For Windows systems, an absolute path begins with the drive letter; on UNIX and Solaris systems, the absolute path begins with a slash (/).
    The relative path location should be a shared disk accessible by all cluster nodes. The log store path is the path relative to that which is specified in the filename property within the log store definition. Using a relative path automatically places the log store under: <base-directory>/<workspace-name>.<project-name>.<instance-number>.<logstore-path>. You can view base directory definitions in the cluster configuration file (<node-name>.xml), under the controller section.
    Sybase recommends that you use a relative path. To use an absolute path, first ensure that all cluster nodes can read and write to the absolute path you specify. This means that the location must be the same for all cluster nodes. You must also ensure that no two projects use the same path for the log store location. If using a shared disk is not possible, strong affinity can be used to ensure the project is always started on the same cluster node.
  3. Enter appropriate values for the remaining properties in the CREATE LOG STORE statement.
  4. Click Compile (F7).
  5. Click Run Project.
Related tasks
Sizing a Log Store
Related reference
Project Logging