开发者

How to read the current machine NTFS settings?

Before inserting filestream data I'd like to check the following NTFS settings:

1) 8.3 naming status (this is disabled by using fsutil开发者_高级运维 behavior set disable8dot3 1)

2) last access status (this is disabled by using fsutil behavior set disablelastaccess 1)

3) cluster size (this is set with format F: /FS:NTFS /V:MyFILESTREAMContainer /A:64K)

The filestream recomendation is to disable (1) and (2) and to set (3) at 64kb.

But before setting this I'd like to know the existing settings. How do I check this? Answer can be in Delphi but not necessarly.


The GetDiskFreeSpace Windows API call returns the sector_per_cluster and bytes_per_sector values. I think this function should be in Windows unit.


You can read the registry for points 1 and 2 (using xp_regread in SQL)

Number 3 is not essential but helps and has been SQL Server best practice for a decade or more. You'd have to use sp_OA% or a CLR function to read this in SQL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜