When attempting to make a new database on the RAM drive I get an error.
An unexpected error occurred while checking the sector size for the file 'R:\DATA\TestDb2.mdf'. Move the file to a local NTFS volume, where the sector size can be retrieved. Check the SQL Server error log for more information.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors. (Microsoft SQL Server, Error: 5177).
I am running windows 10 x64, using an i5 laptop with 12gb RAM. With MS SQL Server Express 2014.
I'm trying to do this because I want to run integration tests in here.
PS: It is, in fact, very hard to get MSSQL to work outside its preferred settings (e.g. on my RAM disk on R:) because it does not want to set (O/S) permissions on the folder to allow itself to use it. Nor is it easy for me to manually set permissions; as I can't find the MSSQL$ServerName user. In short: forcing MSSQL to create a file there seems a better way to make sure the correct permissions are obtained on that RAM disk folder.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you really need this compatibility, you need another tool, such as Arsenal Image Mounter. There is a command line tool that allows you to create a ramdisk.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was facing same issues but did not get any solution. But a simple workaround is as below.
Fix : try to create databsae on root directory instead of inside a directory.
Hope it helps !!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When attempting to make a new database on the RAM drive I get an error.
An unexpected error occurred while checking the sector size for the file 'R:\DATA\TestDb2.mdf'. Move the file to a local NTFS volume, where the sector size can be retrieved. Check the SQL Server error log for more information.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors. (Microsoft SQL Server, Error: 5177).
More info: The issue has been around for a while. See: https://social.msdn.microsoft.com/Forums/en-US/ea3b1420-3284-475c-a13e-c850c13e2b2c/sql-2012-sp1-tempdb-using-ram?forum=sqldatabaseengine&prof=required
I am running windows 10 x64, using an i5 laptop with 12gb RAM. With MS SQL Server Express 2014.
I'm trying to do this because I want to run integration tests in here.
PS: It is, in fact, very hard to get MSSQL to work outside its preferred settings (e.g. on my RAM disk on R:) because it does not want to set (O/S) permissions on the folder to allow itself to use it. Nor is it easy for me to manually set permissions; as I can't find the MSSQL$ServerName user. In short: forcing MSSQL to create a file there seems a better way to make sure the correct permissions are obtained on that RAM disk folder.
It likely expects that the volume is handled by the volume mount manager, which is not the case with ImDisk.
As said by the author of the imdisk driver, some things could be implemented but would require a major redesign, so this is absolutely not planned.
If you really need this compatibility, you need another tool, such as Arsenal Image Mounter. There is a command line tool that allows you to create a ramdisk.
Dear @mark4asp,