Skip to main content
  1. Posts/

Delete orphaned files from Siebel FileSystem

·2 mins

It is quite easy to forget about filesystem.

All that you do is to create a file in the application, an application is going to take care of moving the actual attachment to the file system and creating a record in the database. Only when you see something wrong with accessing an attachment, or you run out of disk space, you start recollecting about filesystem.

Siebel filesystem is quite resilient. As long as the shared drive/fileserver is available, tt continues to function without hitches.

But large implementations test the limits of the filesystem. They tend to accumulate data in hundreds of GBs, and drag their leg on the archival strategy.

Accumulation of huge number of files may cause performance issues with the filesystem. This problem may be compounded if you allow users to delete parent records which may orphan the file records. All these files choose to remain in the file system forever.

sfscleanup is a utility provided by Oracle to do this filesystem cleanup .

Located in the Siebel server BIN directory, sfscleanup utility has to be periodically run to delete all orphaned files from the filesystem.

To execute, you simply run the following command-

sfscleanup /U <user> /P <password> /F \\<fs-server>\files\att /X \\<fs-server>\logs\sfscleanup.log

The parameters are a straightforward. You can use the following additional parameters -

/Q: (Specify Y or N). Query by attachment records. Use this parameter if you want to run for a specific timeframe, and then resume the process later. Useful in filesystems that are large in size.

/T: (Y/N). Run the process for the specified number of minutes. You can resume the process later. Can be used only if /Q argument is specified as “Y”.

/M: (Y/N). Specify the directory where the archived files have to be moved.

/S: (Y/N). Instruct the process is to be resumed. Can be used only if /Q argument is specified as “Y”.

One of the other users of this utility is to archive files in test environments which have a subset of data from production. Test environments often get refreshed with the part of the data from production combined with migration of data from external systems. Files orphaned because of previous record deletions Can be safely removed using sfscleanup utility.