Siebel System Administration Guide > Siebel Server Infrastructure Administration > Administering the Siebel File System >
Cleaning Up the Siebel File System
This topic describes the task of cleaning up the Siebel File System by removing orphan records using sfscleanup.exe, a command-line utility. Orphan records are those that remain if a user deletes a parent record in the application that has associated child records; the child records are not deleted from the Siebel File System with the parent record and must be removed using sfscleanup.exe. This utility is located in the binary (bin) subdirectory within the Siebel Server root directory. The sfscleanup.exe utility processes every file in the file attachment directory and performs one of several operations to each file depending on the file type and the parameters that are set. For descriptions of the run-time parameters that you can set when running sfscleanup.exe, see the following procedure. For descriptions of the file types and the associated operation performed by sfscleanup.exe during processing, see Table 23. For a list of Siebel File System background information and other administrative tasks, see Administering the Siebel File System. To clean up the file attachment directory using sfscleanup.exe
- At the command prompt, change directory to the bin subdirectory within the Siebel Server root directory.
- Run sfscleanup.exe using the parameters listed in the following table as shown in the following example:
sfscleanup /u sadmin /p secret /f \\server1\files /x \\server1\logs\sfscleanup.log
|
|
|
|
/u |
Username |
Username ID. |
Y |
/p |
Password |
Username password. |
Y |
/c |
ODBC data source |
Set this value to the ODBC data source. Default value is set to the environment variable, SIEBEL_DATA_SOURCE. |
N |
/d |
Siebel table owner |
Set this value to the Siebel table owner. Default value is set to the environment variable, SIEBEL_TABLE_OWNER. |
N |
/f |
Path for file directory |
Set this value to the path for the file attachment directory. Do not append att to the file attachment directory path. |
Y |
/x |
Path for output file |
Set this value to the path for the output file. |
N |
/m |
Path for move directory |
Set this value to the path for the directory where discarded files will be moved. |
N |
/n |
Remove old revisions |
Determines if old versions of file attachments will be removed. To remove old versions, set this value to Y. Default value is N. |
N |
/r |
Generate report file only |
Set this value to Y to generate only a report file. If set to Y, the report file contains only the columns File Name and File Type. Default value is N. |
N |
/g |
Garbage files |
Set this value to remove garbage or non-Siebel files. Default value is N. |
N |
Further details on some parameter settings:
- /n. By default old file revisions are kept. Such files are marked ANCIENT in the log, and represent old revisions of an existing attachment record; that is, their row ID matches with the database record but not the file revision number. To delete such files, set the /n parameter to Y.
- /g. If the file system contains files that were not created by the File System Manager component (alias FSMSrvr), then their deletion or move is controlled by the /g parameter. This parameter includes non-Siebel files or directories. By default these files are not deleted. The directories are not affected or moved by sfscleanup.exe.
If you specified an output file using the /x parameter, sfscleanup.exe generates a log file listing the operations that were performed. The output file is a tab-delimited text file that contains the following columns:
- File Name
This column lists the name of each file that was processed.
- File Type
This column lists the type of each file that was processed. Table 23 lists the possible file types and the associated operation performed by sfscleanup.exe during processing.
Table 23. File Types and Associated Operation
|
|
|
CURRENT |
The file has a corresponding record in the file attachment database table. |
KEPT |
NEW |
The file is less than one hour old. The sfscleanup.exe program does not check for the file in the file attachment database table. |
KEPT |
ORPHAN |
The file does not have a corresponding record in the file attachment database table. |
DELETED |
INVALID |
The file (or directory) is not a file attachment. If sfscleanup.exe is attempting to delete a subdirectory that is not empty, the operation errors out. This gives you an opportunity to review the files contained within the directory before deletion. |
KEPT |
ANCIENT |
The file has an associated record in the database with a different revision number. |
KEPT |
- Operation
This column lists the type of operation that was performed during processing. Table 24 lists the types of operation that sfscleanup.exe may have performed during processing.
Table 24. Operations
|
|
KEPT |
The file was kept. |
DELETED |
The file was deleted. |
MOVED |
The file was moved to the directory specified by the /m parameter. Files will only be moved if you used the /m parameter. |
KEPT_DIR |
The item was kept because it was a directory and requires manual processing. |
KEPT_ERROR |
The file was kept because an error occurred while trying to move or delete the file. |
|