Aliases - weird behaviour

  • Hi

    I have 2 versions of SQL on my win 7 machine

    Default instance(ver 2005) = port 20000 Alias = "2005"

    named instance(ver 2008 R2)= "ins2008" for port 47777 Alias = "2008"

    SQL Browser service is running

    Everything works ok when I use aliases in enterprise manager, it's a great feature.

    However whenever I try and use a particular in-house application to connect to the DB I get weird results.

    The application is running on the same machine as my SQL Servers

    The Program uses the SQL Server ODBC driver to connect. It just tries to connect using a connection string (Its compiled code so cannot see exactly what it uses)

    1. The app cannot find the server using the Alias name i.e "2008". On a failed attempt it removes the port number from the alias seen in config manager. This stops Enterprise manager connecting with the alias.

    To fix I have to remove the alias and re-add it with the port number.

    2. To get the app to connect I put the server name as machinename\inst2008,47777

    After it connects I can see a new Alias called machinename\inst2008,47777 has been created

    Can someone explain this behaviour. My machine name has changed since installing both SQL instances so running SELECT @@SERVERNAME returns OLDMACHINENAME\inst2008.

    I'm baffled by this, I never expected an app to change my Alias properties when there is no code to add Aliases in it.

    Thank you

  • Not sure that I can help too much, but I would advise against using all numeric aliases. Try amending the alias to SQL2008 and SQL2005 and see if that helps. I remember something way back in the past that advised against this - Worth a try?

    SQL DBA
    Every day is a school day, and don't trust anyone who tells you any different.
    http://sqlblogness.blogspot.co.uk

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

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