Archive for the ‘Eng’ Category

MSSQL and ramdrive (ImDisk ), bad idea…

juuli 26, 2018

I woke up in the morning and tried to optimize my MSSQL server. Simple optimization; since tempdb has quite a lot of traffic, I decided to move it to ramdrive.

USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = ‘Z:\SQLData\tempdb.mdf’);
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = ‘Z:\SQLLog\templog.ldf’);
GO

AND this was a major failure…SQL server won’t start.

“An unexpected error occurred while checking the sector size for the file ‘Z:\tempdb\tempdb.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.”

To start SQL server and restore previous tempdb location. Step one: unmount ramdrive disk (Z:). Step two: mount USB stick with letter Z:. Then restart SQL server and restore tempdb paths.

Advertisements