I am trying to send message to the same instance in my local machine. It is working perfectly when the network is connected. But if i unplug the network cable, or disconnect the connection, the message not sending and hence the conversation handle is not retrieving. I wonder when i am using my local machine's database instance and logged in as "sa" user, why the Send Conversation is not working. Please put some light on this issue as i didnt see any useful posts anywhere.
Please find my code i am using..
Have you specified 'LOCAL' as the network address when defining your route? If you have provided an actual address, the message is being routed through your NIC.
answered Dec 20, 2012 at 08:26 PM
Thanks for the reply..As you can see i have raised my doubt around 4 months back. I have rectified the issue by applying below solution. Please find below my analysis result and solution, which may help some techies who is fighting to find a solution for same issue.
Reason: Even though the database server is in the local machine, the owner of the DB is a network user as we use windows authentication for logging in to the management studio (Eg: Domain\Username) . So, the queues , messages and services created are owned by this user. So when the network cable is unplugged, Initiator Service is not able to resolve the windows identity of its owner. This was the root cause for the issue.
The solution to overcome this issue is to provide ownership of the Initiator Service to a SQL User. In our case, we are not supposed to use more independent SQL users and logins in the system due to security reasons, we have given the ownership to a domain user who uses the login credentials of [NT AUTHORITY\NETWORK SERVICE] which is a local user to the machine. So, whichever user try to send messages, the service will use the identity of the owner user and will run seamlessly.
Sample Code Snippet
Create USER User1 For Login [NT AUTHORITY\NETWORK SERVICE]
ALTER AUTHORIZATION ON SERVICE::InitiatorService TO [User1]
NB: Pls correct me if i am wrong in any of my analysis.
Thanks and Regards, Baiju Raj.
answered Dec 21, 2012 at 06:29 AM