• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

service connecting to remote service

My question is can my service running on the local system
fetch records from a service (SQL server service or sybase server service) running on another machine in the LAN.
If not what do I do/use to solve this connectivity problem
of a service not being able to connect to a remote service.
0
chicksaw
Asked:
chicksaw
1 Solution
 
rbrCommented:
yes it can.
0
 
chicksawAuthor Commented:
rbr,
I have an application containing ODBC code which works fine, when run as an application. However the same code when introduced in a service executable does not connect to the same databse on the remote SQL server. It can connect to all DSN's accessing databases on the local machine, but none of the remote machine. If as you say it should, where is the possibility of the error(probably on the service api side of the code).
Any ideas?
0
 
rbrCommented:
Which OSs?
0
Live webcast with Pinal Dave

Pinal Dave will teach you tricks to help identify the real root cause of database problems rather than red herrings. Attendees will learn scripts that they can use in their environment to immediately figure out their performance Blame Shifters and fix them quickly.

 
chicksawAuthor Commented:
rbr,
The operating system is windows NT and the service code is in 'C' SDK.
0
 
chicksawAuthor Commented:
initial answer only 'yes' and further no response to further comments.
0
 
corodentCommented:
Is the DSN for the remote machine a system DSN or a user DSN?  Services can only connect to system DSNs
0
 
jkrCommented:
The problem is that 'LocalSystem' (the account that services use) has almost administrator privileges, but NO network access - to overcome this limitation, assign your service to run under a certain user account (either using the control panel or by specifying a username/password when calling 'CreateService()').

Please ask if you need more information!

(BTW: I happen to have finished such a project some days ago ;-)


0

Featured Post

Choose an Exciting Career in Cybersecurity

Help prevent cyber-threats and provide solutions to safeguard our global digital economy. Earn your MS in Cybersecurity. WGU’s MSCSIA degree program was designed in collaboration with national intelligence organizations and IT industry leaders.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now