Skip to main content

Use the ^DBSIZE Function

Use the ^DBSIZE Function

You can also call ^DBSIZE from a routine. To do so, you use the following function:

$$INT^DBSIZE(backup_type)
Important:

The values of backup_type differ from the menu option numbers when running ^DBSIZE interactively.

backup_type Description
1 Incremental backup
2 Full backup
3 Cumulative incremental backup

For example, to see the size estimate for running a full backup:

%SYS>w $$INT^DBSIZE(2)
18950^5^160952320^2710^160309248^313104^313104

The returned value is seven numbers separated by a caret (^). In this example, the returned value 18950 is the total estimated size of the backup, in blocks; the returned value 5 indicates the number of database directories to back up. The following table shows what is contained in each piece of the output.

Position of output Description
Piece 1 Number of database blocks for backup

(-1 if error during processing or invalid parameter)

Piece 2 Number of directories to back up
Piece 3 Number of bytes for media (not including inter-record gaps)
Piece 4 Number of blocks for media
Piece 5 Number of bytes for a disk file
Piece 6 Number of 512-byte blocks for a disk file

The following shows the output of calling the ^DBSIZE function for each type of backup:

%SYS>w $$INT^DBSIZE(1)
466^5^4157440^70^4122624^8052^8052

%SYS>w $$INT^DBSIZE(2)
18950^5^160952320^2710^160309248^313104^313104

%SYS>w $$INT^DBSIZE(3)
466^5^4157440^70^4122624^8052^8052

FeedbackOpens in a new tab