佚名通过本文主要向大家介绍了windows oracle 服务,windows服务管理器,windows 服务命令,windows服务,windows搜索服务等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: windows服务中如何使用oracle数据库
描述:
解决方案1:
lpDependencies
A pointer to a double null-terminated array of null-separated names of services or load ordering groups
that the system must start before this service. Specify NULL or an empty string if the service has no dependencies.
Dependency on a group means that this service can run if at least one member of the group is running after an
attempt to start all members of the group.
You must prefix group names with SC_GROUP_IDENTIFIER so that they can be distinguished from a service name,
because services and service groups share the same name space.
解决方案3:
描述:
rt
自己写的windows服务每次都比oracle数据库先启动,于是读数据库就失败,有没有什么好的方法?
解决方案1:
最简单的方法是让你的服务sleep一下,等数据库启动了在唤醒!!
解决方案2:SC_HANDLE WINAPI CreateService(
__in SC_HANDLE hSCManager,
__in LPCTSTR lpServiceName,
__in_opt LPCTSTR lpDisplayName,
__in DWORD dwDesiredAccess,
__in DWORD dwServiceType,
__in DWORD dwStartType,
__in DWORD dwErrorControl,
__in_opt LPCTSTR lpBinaryPathName,
__in_opt LPCTSTR lpLoadOrderGroup,
__out_opt LPDWORD lpdwTagId,
__in_opt LPCTSTR lpDependencies, // see this member
__in_opt LPCTSTR lpServiceStartName,
__in_opt LPCTSTR lpPassword
);
lpDependencies
A pointer to a double null-terminated array of null-separated names of services or load ordering groups
that the system must start before this service. Specify NULL or an empty string if the service has no dependencies.
Dependency on a group means that this service can run if at least one member of the group is running after an
attempt to start all members of the group.
You must prefix group names with SC_GROUP_IDENTIFIER so that they can be distinguished from a service name,
because services and service groups share the same name space.
解决方案3:
LoadOrderGroup
LoadOrderGroupDependencies
每个N秒重连一次,次过程重复M次。应该可以了。