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

asked 29 Jan, 07:18

J%20Diaz's gravatar image

J Diaz
939263349
accept rate: 13%


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, 07:50

Volker%20Barth's gravatar image

Volker Barth
33.9k333487718
accept rate: 33%

edited 29 Jan, 07:53

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

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

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

(29 Jan, 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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×7

question asked: 29 Jan, 07:18

question was seen: 202 times

last updated: 29 Jan, 08:47