Home > OS >  Registration service component dependency problem (not beg for help)
Registration service component dependency problem (not beg for help)

Time:09-26

The service component is written by myself.
I use sc command register to the service.

Server is a database is mssql2008 server2016

Sc create XXX binpath="XXXX. Exe" displayname="my services" depend=Tcpip/mssqlserver start=auto

My program depend on the network and database

Tcpip the dependence has been set up correctly, that is, I will wait until the web server will start after launch,
But the dependence on SQL is not correct,

I first set rely on into mssqlserver, rely on my service component dialog box that a nothing only one (TCP), as the name mssqlserver is wrong for my machine (including alone I rely on the mssqlserver)

I then sc delete off my service register

Dependence to a service component of SQL, name is MSSQL $SQLEXPRESS, dependency can saw this, but it seems that this component start did not immediately start complete database of other components,


Service program is written by myself. The first is what all don't depend on the situation, directly to the odbc data connection error, it must be because I start too fast, in front of the database,
The second connection, but access to the data failure, what seems to be activated in the front,

Once the server restart, I now is manually stop the service, and then run, everything is all right,


So what is the right way to rely on the MSSQL?
I don't want to do server maintenance log in the server every time after maintenance manual stop start a service component,


Points less!!!!! Thank you for your support!!!!!!!!!!!!!!!!!!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

CodePudding user response:

In addition, mssql2008 already installed with Microsoft's Management Studio Management tools can be connected, you can see the database can also be a variety of operations.
But the use of net stop mssqlserver command said "service name is invalid
"
I see online is the name, is what did I do less??????

CodePudding user response:

Well, dear I was wrong, express is a free version
  • Related