Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

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?



asked 29 Jan '19, 07:18

J%20Diaz's gravatar image

J Diaz
accept rate: 10%

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');
permanent link

answered 29 Jan '19, 07:50

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

edited 29 Jan '19, 07:53

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

(29 Jan '19, 08:15) J Diaz
Replies hidden

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

(29 Jan '19, 08:47) Breck Carter
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 29 Jan '19, 07:18

question was seen: 1,196 times

last updated: 29 Jan '19, 08:47