Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
"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 7:51
    
You could set up a 1-node cluster and use the MSCS approach anyway. –  Nick Chammas Nov 18 '11 at 20:17
add comment

3 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
thanks, i'll have a look at this –  Richard Jones Jul 19 '11 at 7:49
    
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 3:22
    
+1 just read the expanded answer at: itknowledgeexchange.techtarget.com/sql-server/… –  Jeff Aug 1 '11 at 18:45
add comment

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.

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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