Connecting to server on network

What connection string would I use to connect to a MSFT SQL Server 2014 Server on my own local network? I was using:
\\[servername]\[databaseinstancename]
and linqpad does not like it

Comments

  • I changed that to:
    Data Source=\\fl-dc-1\voysays;Integrated Security=SSPI;AttachDbFilename=\\FL-DC-1\Samples\AdventureWorks\instawdb.sql;User Instance=True;app=LINQPad;TrustServerCertificate=true
    and still no good.
    I've reworked firewall settings for a named instance and more. Getting error 26, error locating server/instance specified. Remote connections is enabled. Could it be Windows Authentication I'm thinking?
  • I figured it out:

    1) had to config SS on Server for remote connections in SSMS
    2) had to create inbound and outbound rules on Server Firewall for UDP Port 1434
    3) and, finally, the key to the whole thing, which for some reason is shrouded in mystery and mentioned nowhere, the Driver parameter:
    Driver={SQL Server Native Client 11.0}; Server=fl-dc-1\voysays; Database=AdventureWorks; Trusted_Connection=yes;

    I had the rest of the command. Was not aware the Driver param was required. Added it and worked fine.

    BTW, really cool commandline command PORTQRY you can run on workstation and direct at Server to make sure UDP port 1434 is configured correctly.

    portqry -n [servername] -p udp -e 1434
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!