Dot notation vs (local)

  • Does anyone know when to use ".\instancename" vs. "(local)\instancename" notations for specifying a server name? I have an app that accesses an MSDE instance on the local machine via a UDL file. My app uses both ADO (MDAC 2.7) and SQL-DMO. In many cases the two notations work interchangeably, but I did run into a couple of of situations where one worked and the other didn't.

    My current issue is that the (local) version fails when used by an account without local admin rights whereas the DOT notation succeeds... Any thoughts would be greatly appreciated.

    Thanks in advance,

    Chris

  • This was removed by the editor as SPAM

  • I'd use the dot notation. I think that this is more likely to be supported, but that's an opinion. I don't know if it's really true.

    Steve Jones

    sjones@sqlservercentral.com

    http://qa.sqlservercentral.com/columnists/sjones

    The Best of SQL Server Central.com 2002 - http://qa.sqlservercentral.com/bestof/

    http://www.dkranch.net

  • I wrote some SQL-DMO code and found a similar situation.

    SQLServer.Start... on 9x/ME I had to use .\instancename and on NT/2K/XP I had to use (local)\instancename

    With SQLServer.Connect, (local)\instancename worked for all platforms.

    Weird and I never did find a reason for it.

    Paul

  • Now that you mention it, I ran into the same issue earlier and ended up coding around it. I was wondering if perhaps a different network library is being chosen???

  • I assumed it was library related, so didn't look into the problem in depth.

  • I ran into the same problem where I could not use (local)\instancename, only when trying to connect to MSDE using Shared Memory protocol. I did find that using the specific machine name instead of (local) or DOT worked on all platforms tested(Win98/ME/NT4/2000/XP/2003).



    Mark

Viewing 7 posts - 1 through 6 (of 6 total)

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