Consultor Eletrônico



Kbase P104308: How to create multivolume sort file?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/14/2006
Status: Unverified

GOAL:

How to create multivolume sort file?

GOAL:

How to create a multivolume srt file?

GOAL:

Overcoming the SRT Files Size limitation

FIX:

When you perform the Index Rebuild utility and choose the Sort option, you might encounter space limitations that can cause the utility to terminate. These are some of the reasons that you might reach the limit:
The temporary sort file allocated to do the sort reaches the operating system limit for file size (2GB on most systems).

To overcome this limitation, simply create a file that contains specifications for the directories and the amount of space per directory that you want the SRT file to have access to during the Index Rebuild. The file that contains the specifications must be a text file, must have the same name as the database with an extension of .srt (dbname.srt), and must reside in the same directory as the .db file. In addition, the contents of the file must follow these conventions:
List the directory and the amount of space that you want to allocate to the index rebuild sort on separate lines.
The size that you specify in the dbname.srt directory specification is the maximum (in 1024 byte units) that the file can grow. Specifying 0 for any directory indicates that you want to allow unlimited growth.
When you provide a file size that is larger than the maximum allowed by your operating system, Index Rebuild ignores the value you specified in the file and uses the maximum size allowed by the operating system. When you specify a nonzero file size that is less then the temporary block size (-TB), Index Rebuild ignores the value you specified in the file and uses the temporary block size (-TB) value.

Separate the directories from the size by at least one blank.
Terminate the line with a slash (/) followed by end of line.

For example, if you want to rebuild the index for the sports database and you want the speed sort to have access to 300K of space available in the /user2/db1/first directory, 400K in the user3/junk directory, and unlimited space in the /user4/last directory, then the sports.srt looks like this on UNIX:

300 /user2/db1/first/
400 /user3/junk/
0 /user4/last/
and looks like this for Windows:

300 \user2\db1\first\
400 \user3\junk\
0 \user4\last\

The Index Rebuild utility accesses the files in the order in which they are listed in the dbname.srt file. So, if you specify an amount of space that is not available, when the disk is filled, then Index Rebuild terminates and the next directory specification is not used. Thus, if a disk has only 200K of space and the dbname.srt specifies 300K, when the 200K is exhausted the Index Rebuild terminates. For example, if /user2/db1/first above does not get 300K of data, Index Rebuild never processes /user3/junk. In addition, if you specify a directory size of 0, any directories specified after it in the dbname.srt are not processed. For these reasons, you should verify that the space you specify in the dbname.srt file is available before running index rebuild.

The Index Rebuild utility opens the files for each of the directories before it actually starts the sort process. As a result, one of the following messages is displayed for each file:

Temporary sort file at pathname used up to nK of disk space.
or:
Temporary sort file at:pathname will use the available disk space.

The previous message occurs even if the .srt file was not found.

When the sort completes, the following message is displayed for each file:
Temporary sort file at pathname used nK of disk space.

In some cases the message displays OK. This simply means that the sort took place completely in memory.
If Index Rebuild does not find a dbname.srt file, then by default, it uses the directory supplied by either the -T parameter or the current working directory.