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??

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, 2011 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) Jul 19, 2011 at 7:51
  • You could set up a 1-node cluster and use the MSCS approach anyway. Nov 18, 2011 at 20:17

3 Answers 3

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.

5
  • Tried the registry edit and it works so going to keep that in for now while i try to get a "cleaner" solution. thanks. Jul 21, 2011 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, 2011 at 3:22
  • +1 just read the expanded answer at: itknowledgeexchange.techtarget.com/sql-server/…
    – Jeff
    Aug 1, 2011 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. May 20, 2020 at 23:41
  • Tech Target has taken all their blogs offline, but I copied the post to here dcac.com/blog/…. 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, 2020 at 6:58
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.

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.

2
  • 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. Jul 18, 2011 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". Jul 18, 2011 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.