3

I've got a standalone SQL 2005 server (on Windows Server 2003) which has 2 LUN drives attached for the datafiles and transaction logs.

When the server reboots, the SQL Server service starts before the LUN drives are available and therefore errors and creates new logfiles on another drive.

I've read some articles, such as this one:

SQL Dev article

that show you how to do it using Cluster Manager but my box isn't clustered. Does anyone know how to set this dependency up??

EEAA
  • 109,363
  • 18
  • 175
  • 245
Richard Jones
  • 33
  • 1
  • 3
  • "errors and creates new logfiles on another drive" - Can you clarify this? Is your SQL Server configure to use the default database locations? – jl. Jul 18 '11 at 15:40
  • in the SQL Server log files are errors "File Activation Error...F:\xxxxx may be incorrect" and then later on it creates the logfile on the T:\ (where the datafiles are) so it's looking for F:\ but then using T:\ (which, i assume has come online while F:\ was being tried) – Richard Jones Jul 19 '11 at 07:51
  • You could set up a 1-node cluster and use the MSCS approach anyway. – Nick Chammas Nov 18 '11 at 20:17

3 Answers3

4

I'm not sure if this will work or not, as I don't have a machine with the same problem, but you can configure the SQL Server service to not start until the disk driver reports that it is online.

I talk about setting this registry key in this FAQ. The disk drivers are called "Disk". If this doesn't work you'll want to remove the setting from the registry.

mrdenny
  • 27,174
  • 4
  • 41
  • 69
  • Tried the registry edit and it works so going to keep that in for now while i try to get a "cleaner" solution. thanks. – Richard Jones Jul 21 '11 at 13:49
  • Glad it works. Sounds like something I can blog about in the future. There's no risk in leaving the registry key in place. – mrdenny Jul 24 '11 at 03:22
  • +1 just read the expanded answer at: http://itknowledgeexchange.techtarget.com/sql-server/sql-server-wont-start-due-to-luns-being-unavailable/ – Jeff Aug 01 '11 at 18:45
  • This is still an issue in Server 2016. Applied this fix for a client who had this problem, will report back if I remember to do so. – Aaron Mason May 20 '20 at 23:41
  • Tech Target has taken all their blogs offline, but I copied the post to here https://www.dcac.com/blog/sql-server-wont-start-due-to-luns-being-unavailable. It doesn't shock me that this is still an issue. If the disk doesn't come up before SQL Server, SQL Server won't wait, it'll just report that the disk isn't there (or fail to start if it is the disk under the master database. – mrdenny May 22 '20 at 06:58
0

Are you using the Microsoft iSCSI software initiator? Are the defined iSCSI drives dynamic?

There is a known issue where the software iSCSI initiator doesn't start dynamic drives properly on boot. My work-around was to redefine the drive as a "basic" drive instead. Of course, changing this means you will lose all the data on the drive and have to reformat.

This site has a work-around which may be more useful.

Aaron Mason
  • 703
  • 6
  • 20
David Mackintosh
  • 14,293
  • 7
  • 49
  • 78
  • Yes I'm using Microsoft iSCSI initiator. I'll have a look at the workaround as I'm not sure people will be happy with downtime to move the data, re-format the drives, etc. – Richard Jones Jul 18 '11 at 16:30
  • Just checked in Computer Management - Disk Management and the disks are Basic (or at least I assume they are as a right-click gives the option to "Convert to Dynamic Disk". – Richard Jones Jul 18 '11 at 16:37
0

This is an old post, but in addition to the DependOnService registry tweak, another possibility would be to change the MSSQL Service startup type from "Automatic" to "Automatic (Delayed Start)" in Services.msc; That option should cause the service to wait until other Automatic services have been started & then start the 'delayed' services. That should take a minute or two after Windows starts. Other services which in turn depends on MSSQL would also need to be set to delayed start (ie. SQL Server Agent).

I believe the OS will have to be Windows Server 2008 or later for the option to be available.

Word of warning: I haven't actually tried this myself.