cancel
Showing results for 
Search instead for 
Did you mean: 

Directory Server Free Space

JimDiaz
Participant
0 Kudos
1,485

I am using a directory server which does not exist on the same drive as any of the database files. Is there any way to query the space available on the drive before inserting into a table on the drive to see if there is room?

Thanks

Jim

Accepted Solutions (0)

Answers (1)

Answers (1)

VolkerBarth
Contributor
0 Kudos

When using SQL Anywhere 17, you can use the sp_disk_info() system procedure.

On Windows, this can be used both with directories on drives identified by drive letters or UNC names. Don't know how this works on Unixes.

-- note, need do specify an existing file/dir (here the root dir)
call sp_disk_info('C:\\\\.');
-- UNC (seems to expect an existing dir or file other than the root dir
call sp_disk_info('\\\\\\\\ServerName\\\\Netshare\\\\AnExistingDir');
JimDiaz
Participant
0 Kudos

Any options on 12 or 16 we are not up to 17 yet.

Breck_Carter
Participant
0 Kudos

See this topic about using WMIC: Check free disk space using Batch commands.