what would make a connection fail???

  • Hello

    I am accessing my db through an application (, usually all is ok.

    Sometimes while working on the application, the connection fails, and i can't tell why:

    Cannot open database requested in login 'dbName'. Login fails. Login failed for user ....

    Can't could suddently make the login fail? why would the db be unavailable?

    Could it be a lock? or anything that can cause disconnection?

    tx for helping!

  • I don't have an answer, but this is how I would approach figuring out why the connection is failing:

    1. Determine where the problem is - on the client? or on the server? or on the network? After it fails, can you ping the server from the client? Can you connect to the server from the client machine, using another tool, such as Query Analyzer or Management Studio? Can you successfully run a query from the server using the same credentials your client application uses to connect?

    2. Are you connecting successfully from the client application, then losing the connection? or are you unable to connect to start with - your comments are not completely clear on this. If you are losing the connection after successfully connecting, find out on the server what your session ID is, and verify that it is still connected on the server.

  • i think the problem is in ur link or LAN just check it out

    and another think is that u have to check domain connection with client and server because most of the time ur server login with domain and ur client as well.

    at that time ur domian is not working u may recive this error "unable to connect " from ur client side.

    if u stuck to resolve this issue just change the method.and use HOST file as well.

    step 1 

     to find host file use this location                                     "C:\WINDOWS\system32\drivers\etc"                                     use windows HOST file for local connection for that u need to login ur server and clients localy 

    Step 2

        update host file whith ur Server IP addaress and Server Name and Save it.

    ###########################################################################

    # Copyright (c) 1993-1999 Microsoft Corp.

    #

    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

    #

    # This file contains the mappings of IP addresses to host names. Each

    # entry should be kept on an individual line. The IP address should

    # be placed in the first column followed by the corresponding host name.

    # The IP address and the host name should be separated by at least one

    # space.

    ###########################################################################

    ###           Host File Provided by                     ###

    ###########################################################################

    # SOUTH BRANCH

    10.200.400.3  ABC-KLM  # KARACHI MAIN BRANCH

    Step 3

    copy this HOST file and paste to all ur clients in metion address                                                                     "C:\WINDOWS\system32\drivers\etc"               

    inshallah ur problem will resolve.                                                                 

     

    Regards

    Syed Naveed

     

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply