ssodbdel
Format
- To delete all databases:
ssodbdel [-S connection-destination-server-name] [-st] -all [-start {DATE date-and-time | BDATE date | BMONTH month[,date]}] [-stop {DATE date-and-time | BDATE date | BMONTH month[,date]}]
- To specify and delete a database:
ssodbdel [-S connection-destination-server-name] -dbname resource-ID,database-name [-start {DATE date-and-time | BDATE date | BMONTH month[,date]}] [-stop {DATE date-and-time | BDATE date | BMONTH month[,date]}]
- To specify and delete a resource:
ssodbdel [-S connection-destination-server-name] [-st] {-r resource-ID,... | -rf group-definition-file,group-name} [-s server-name,... | -sf group-definition-file,group-name] [-start {DATE date-and-time | BDATE date | BMONTH month[,date]}] [-stop {DATE date-and-time | BDATE date | BMONTH month[,date]}]
- To specify and delete a server:
ssodbdel [-S connection-destination-server-name] [-st] [-r resource-ID,... | -rf group-definition-file,group-name] {-s server-name,... | -sf group-definition-file,group-name} [-start {DATE date-and-time | BDATE date | BMONTH month[,date]}] [-stop {DATE date-and-time | BDATE date | BMONTH month[,date]}]
Function
The ssodbdel command deletes a collection database or statistics information database.
Options
-S connection-destination-server-name
Specifies the monitoring manager whose collection database or statistics information database you want to delete. Specify the host name or IP address in 255 bytes or less. If you omit this option, the command deletes the collection database or statistics information database of the server on which you executed the command.
-st
Deletes the statistics information database. The collection database is not deleted. If you omit this option, only the collection database is deleted.
-all
Deletes all the master databases and copy databases on the connection-destination server, or deletes the statistics information database.
-start {DATE date-and-time | BDATE date | BMONTH month[,date]}
Specifies the range of data to be deleted.
- DATE date-and-time
-
Starts deletion at the collected data or statistics data for the specified date and time.
Specify the date and time in the format yyyy.mm.dd.hh.mm.ss. The specifiable range is January 1, 1980 00:00:00 to December 31, 2099 23:59:59.
- BDATE date
-
Starts deletion at data for 00:00:00 on the date preceeding the current date by the specified number of days. Specify the number of days preceeding the date on which the command is executed.
The specifiable range is 0 to 30 (days). If you specify 0, the command deletes data starting with data for 00:00:00 on the date the command is executed.
- BMONTH month[,date]
-
Starts deletion at data for 00:00:00 on the specified date of the month preceeding the current month by the specified number of months.
The specifiable range for the month is 0 to 13 (months). The specifiable range for the date is 1 to 31 (date).
If you specify 0 for the month, the command deletes data for the month in which you executed the command.
If you do not specify date, the command deletes data from the first day of the month.
-stop {DATE date-and-time | BDATE date | BMONTH month[,date]}
Specifies the range of data to be deleted.
- DATE date-and-time
-
Deletes collected data or statistics data up to the specified date and time.
Specify the date and time in the format yyyy.mm.dd.hh.mm.ss. The specifiable range is January 1, 1980 00:00:00 to December 31, 2099 23:59:59.
- BDATE date
-
Deletes data up to 23:59:59 on the date preceeding the current date by the specified number of days.
The specifiable range is 0 to 30 (days). If you specify 0, the command deletes data up to 23:59:59 on the date the command is executed.
- BMONTH month[,date]
-
Deletes data up to 23:59:59 on the specified date of the month preceeding the current month by the specified number of months.
The specifiable range for the month is 0 to 13 (months). The specifiable range for the date is 1 to 31 (date). If you specify 0 for the month, the command deletes data up to the month in which you executed the command.
If you do not specify date, the command deletes data up to 23:59:59 on the last day of the month.
-dbname resource-ID,collection-database-name
Deletes the specified database. Verify the resource ID and database name by using the -list option in the ssoextractlog command.
-r resource-ID,...
Deletes the master database and copy database of the specified resource, or deletes the statistics information database. To specify multiple resource IDs, delimit the IDs with a comma (,).
You can specify this option together with the -s or -sf option. If you do not specify these options, all the collection databases or statistics information databases stored in the resource directory of the specified resource are deleted.
For details about resource IDs, see E. Resource IDs.
-rf group-definition-file-name,group-name
Deletes the master database and copy database of the resource defined in the specified group, or deletes the statistics information database.
You can specify this option together with the -s or -sf option. If you do not specify these options, all the collection databases or statistics information databases stored in the resource directory of the resource defined in the specified group are deleted.
Specify the group definition file in 512 bytes or less, including the path name.
For details about group definition files, see 6.3.5 Group definition file.
-s server-name,...
Deletes the master database and copy database for the specified monitoring server, or deletes the statistics information database. Specify the host name or IP address in 255 bytes or less. To specify multiple server names, delimit the names with a comma (,).
You can specify this option together with the -r, -rf option or -c, -cf option. If you are not specify these options all collection databases or statistics information database at the specified server will be deleted.
-sf group-definition-file-name,group-name
Deletes the master database and copy database for the server defined in the specified group, or deletes the statistics information database.
You can specify this option together with the -r, -rf option or -c, -cf option. If you do not specify these options, all the collection databases or statistics information databases of the server defined in the specified group are deleted.
Specify the group definition file in 512 bytes or less, including the path name.
For details about group definition files, see 6.3.5 Group definition file.
Examples
-
The following example deletes all the collection databases of the monitoring manager (local host):
ssodbdel -all
-
The following example deletes all the collection data of monitoring servers netmda01 and netmda02 from the collection database of the monitoring manager (local host name: netmds02) on another host:
ssodbdel -S netmds02 -s netmda01,netmda02
-
The following example deletes collection data whose resource ID is 1, 2, or 12 from the collection databases of the monitoring manager (local host):
ssodbdel -r 1,2,12
-
The following example deletes collection data that was collected until 23:59:59 on March 31, 2009 from the collection databases of the monitoring manager (local host):
ssodbdel -all -stop DATE 2009.03.31.23.59.59
-
The following example deletes all the data of the previous day from the specified server (vr260):
ssodbdel -S vr260 -all -start BDATE 1 -stop BDATE 1
-
The following example deletes all the data of the previous week (Monday to Friday) from the specified server (vr260) on the current day (Monday):
ssodbdel -S vr260 -all -start BDATE 7 -stop BDATE 3
-
The following example deletes all the data of the previous month from the specified server (vr260):
ssodbdel -S vr260 -all -start BMONTH 1 -stop BMONTH 1
-
The following example deletes all the data over 1 year ago from the specified server (vr260):
ssodbdel -S vr260 -all -stop BMONTH 13
Return values
0 |
Normal termination |
-1 |
Execution error such as incorrect arguments |
Notes
-
This command also deletes databases of resources currently being collected and databases of resources currently being displayed on a GUI.
-
If the file system of the collection database has insufficient free space (the free space is less than the maximum size of the data file of the collection database), delete all data without using the -stop option or the -start option to specify a period.
Check the value displayed in Size which the ssoextractlog -list command outputs as standard or Size (KBytes) in the collection data list in the Resource Data Reference window to obtain the size of the data file of a collection database. For details about the ssoextractlog command, see ssoextractlog. For details about the Resource Data Reference window, see 4.5 Resource Data Reference window.
-
Notes on concurrently executing the ssodbdel command and the ssoextractlog command
Do not concurrently execute the ssodbdel command and the ssoextractlog command (during execution of one of the commands, you try to execute the other command). If these commands are concurrently executed, the ssoextractlog command outputs the following error message, and the processing might be interrupted if data extraction and copy are incomplete.
In such a case, after the ssodbdel command is completed, re-execute the ssoextractlog command.
The applicable database does not exist. Extraction of the collection database failed.
-
Partial deletion of data by this command takes time in proportion to the size of the collection database. Therefore, make sure that you regularly delete collection data (either by deleting all data or by deleting part of the data by specifying a time period).
-
Do not execute the following commands and GUI operations during execution of the ssodbdel command.
- Command
-
- ssoextractlog command
- ssodbdel command
- ssobackup command
- GUI operations
-
- Reference to resource data from the Resource Data Reference window
- Extraction from the Save file window to a file
- Copy of collection data from the Copy Collection Data window
- Deletion of collection data from the Delete Collection Data window