0

I'm working on an application which has a Windows Service that depends on SQL Server. The service can only be started after the SQL Server has started. However, on client machines, people names SQL Instances differently which leads to different ServiceName.

I have take a look at here but unfortunately, because SQL Server names the service based on Instance name, such as MSSQL$RMS and MSSQL$ABC. Is there a way to configure service dependencies using wildcard?

1 Answers1

1

Obviously your service should depend on a specific instance, the one your service uses for storage. Your should declare your dependency on that instance's service.

Is is unusual for services to take dependency on SQL Server. As a database, it's location is transparent to the client and the client should allow for custom connection strings that allow for any location. Besides, expecting always a local instance would break all of HA/DR scenarios SQL Server offers.

I would seriously reconsider this requirement.

Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569