Top
Systemwalker Desktop Keeper Reference Manual
FUJITSU Software

1.22 DTKTBLTRUNCATE.BAT (Delete Log Table)

Functional Specification

Delete all log records by initializing a log table of the operation database.
By formatting the table area, the log can be deleted in less time than the time required for deleting records. If you execute this command, all data space of the target log table can be released so that the free disk space can be increased.

Command Format

DTKTBLTRUNCATE.BAT  DTKDB  {OPELOG | SETTINGSLOG | ALLLOG}  [NOPROMPTLOG]  [-Y|-y]

Option

DTKDB:

It is a fixed value.

<Processing target>:

Uppercase/lowercase letters can be used in the string of option. Fullwidth characters cannot be specified.

OPELOG:

Specify when processing the log table.

SETTINGSLOG:

Specify when processing the configuration change log table.

ALLLOG:

Specify when processing both the log table and the configuration change log table.

NOPROMPTLOG:

Specify when the command prompt log text file under the PromptLog folder collected from the client (CT) needs not be deleted.
When NOPRONPTLOG is omitted by specifying OPELOG or ALLLOG in <Processing target>, all the files under PromptLog folder are deleted.
When NOPRONPTLOG is omitted by specifying SETTINGSLOG in <Processing target >, the command prompt log is not deleted.
It can be omitted. (The log table and PromptLog are in pair; therefore, if OPELOG,ALLLOG is specified, PromptLog also gets deleted. The configuration change log table does not have any relation to the PromptLog; therefore, PromptLog is not deleted when the SETTINGSLOG is specified.)

-Y|-y:

When "-Y" or "-y" is entered, no confirmation message is displayed during execution or after execution.

  • Execute by specifying "-Y" or "-y"

    (Processing without displaying any message)
  • Execute by omitting "-Y" or "-y"

    Execution is confirmed. (Please push the CTRL+C key when interrupting. )
    Press any key to continue . . .
    Here, if the [Enter] key is pressed, the process is continued. If [CTRL] and "C" keys are concurrently pressed, the process is discontinued. 
                        .
                        .
                    (Omitted) 
                        .
                        .
    Press any key to continue . . .
    Here, the process can be continued by pressing the [Enter] key.

Return Value

[ERRORLEVEL] 0:

Ended normally

[ERRORLEVEL] 1:

Option error

[ERRORLEVEL] 2:

Other errors

Location for Saving Commands

<Installation folder for database related files>\BackupCommand\DTKTBLTRUNCATE.BAT

Authority Required for Execution/Execution Environment

Note

  • Confirm that the backup of the data is taken before executing this command.

  • When the database capacity is large, it might require few minutes to few tens of minutes to end the command.

  • When executing this command in Windows Server 2008, Windows Server 2012, or Windows Server 2016, it is necessary to open the command prompt with "Run as Administrator".

  • According to the environment being used, it is necessary to edit DTKTBLTRUNCATE.BAT. For information on how to edit, refer to relevant content in "Edit Backup Commands" of "Using the Backup Commands" of Installation Guide. In addition, error check is not performed in backup command for database name, connection user ID and password. When the set value is incorrect, an error will occur during the execution of backup command.

Example of Use/Execution Results/Output Format

[Example of normal execution]
C:\Program Files\Fujitsu\Systemwalker Desktop Keeper\DB\BackupCommand>DTKTBLTRUNCATE.BAT DTKDB ALLLOG -y
Tue 06/02/2015-20:21:33.94   (1) [Start]Initialization of log system table
Tue 06/02/2015-20:21:33.96    (1-1) COMMONLOG1 Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:34.54    (1-2) COMMONLOG2 Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:35.02    (1-3) COMMONLOG3 Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:35.64    (1-4) FILEACCESSLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:36.16    (1-5) FILEBRINGOUTLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:36.64    (1-6) LOGINGUARDLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:37.47    (1-7) LOGKEYWORDS Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:38.00    (1-8) PRINTLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:38.41    (1-9) SESSIONMANAGE Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:38.80    (1-10) STARTUPGUARDLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:39.14    (1-11) USERLIST Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:39.65    (1-13) Command prompt log file deletion
Tue 06/02/2015-20:21:39.68   (1) [End]Initialization of log system table
Tue 06/02/2015-20:21:39.68   (2) [Start]Initialization of setting change log system table
Tue 06/02/2015-20:21:39.68    (2-1) SETTINGSLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:39.97    (2-2) LOGONUSER_SETTINGSLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:21:40.19   (2) [End]Initialization of setting change log system table
[Example of execution when any abnormality occurs in database]
C:\Program Files\Fujitsu\Systemwalker Desktop Keeper\DB\BackupCommand> DTKTBLTRUNCATE.bat DTKDB OPELOG -y
Tue 06/02/2015-20:46:21.28   (1) [Start]Initialization of log system table
Tue 06/02/2015-20:46:21.28    (1-1) COMMONLOG1 Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:46:22.27    (1-2) COMMONLOG2 Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:46:22.88          ERROR:COMMONLOG2_DSI Initialization is abnormal (RC=1)
Tue 06/02/2015-20:46:22.88 It terminated abnormally
[Example of execution when -y option is omitted]
C:\Program Files\Fujitsu\Systemwalker Desktop Keeper\DB\BackupCommand>DTKTBLTRUNCATE.BAT  DTKDB  SETTINGSLOG
Execution is confirmed. (Please push the CTRL+C key when interrupting. )
Press any key to continue . . . 
Terminate batch job (Y/N)? 
Tue 06/02/2015-20:32:08.19   (2) [Start]Initialization of setting change log system table
Tue 06/02/2015-20:32:08.19    (2-1) SETTINGSLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:32:08.33    (2-2) LOGONUSER_SETTINGSLOG Initialization
TRUNCATE TABLE
Tue 06/02/2015-20:32:08.50   (2) [End]Initialization of setting change log system table
Press any key to continue . . .