Not all databases are shown on remote connections - Solved

  • Hi community!

    This is just a note as I have already resolved the issue. As I have not found a similar behaviour somewhere else, I thought I should post it here.

    [Behaviour]
    This morning I got a customer call, that informed my that a webservice which connects to a SQL Server instance is not working. I have to say that I am using an instance name and a port for the connection e.g. "localhost,1433\SQLSERVEREXPRESS".
    I connected to the server and checked the database in the SSMS. No problem, the database was running and I could select data.
    I checked the connection parameters in the PHP web application and they seemed pretty fine to me. When I started the web application I got a login error (18456) for the user with the specified password. I checked the logs of the SQL server but found no login errors.
    I checked if the SQL user was active in my database and could connect to my instance with the SQL Server user through SSMS.

    Next I tried to connect to my instance via CMD and OSQL without suppling a database name but the specific instance name. I got no error and was logged in successfully. I executed a "USE MyDatabase" command and a "database unknown" error was returned, although the database was shown in SSMS.
    Querying sys.databases brought different results. For booth tools (SSMS and OSQL) I used the same connection string!

    [Solution]
    I started to search for local installed databases and there was a second database installation as unnamed instance. Through the configuration manager I found out that someone turned off my TCP settings and used the same port for their installation.
     I activated the TCP protocoll and reconfigured TCP port of my instance. After a restart of SQL Server installation everything was working again.

    [Open question]
    I am wondering why I was able to connect to the other database instance with osql although I supplied an instance name.

    Best Regards

  • Alex-489474 - Monday, June 12, 2017 3:56 AM

    [Open question]
    I am wondering why I was able to connect to the other database instance with osql although I supplied an instance name.

    Best Regards

    Using Configuration Manager, check to see if any aliases are defined.

    Sue

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

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