0

I'll preface my question with: I am an absolute beginner with respects to the nature of MS SQL Server and have a layman's understanding of networking and 'computers' in general...

So, I'm trying to replicate an environment where:

  1. There is an 'application server' which hosts HPE's ALM
  2. This communicates with a database server with a Microsoft SQL Server DB

I currently have Microsoft SQL 2012 Server with a sample DB uploaded onto it on one laptop (Laptop 1) and the ALM software on the other laptop (Laptop 2). Both are connected to the same WiFi network.

Laptop 2 is asking me for Database parameters such as:

  • DB Host Name
  • DB Port Number (1433 by default)
  • OR Connection String

I have little idea of what I'm doing - I'd have thought it might be possible to connect to the DB through some sort of variant of the IP address of Laptop 1... but I'm unsure.

How can I connect to a MS SQL 2012 DB from one laptop to another? I realise this is probably a loaded question - I'd be happy if someone can point me in the right direction rather than an exact answer!

Thanks guys,

ST

smashtest
  • 1
  • 1
  • http://connectionstrings.com/ – Sean Lange May 04 '18 at 15:39
  • DB Host Name = "Laptop 1", DB Port Number = 1433 assuming you left it at the default. Have you tried making the connection yet and it's not working? There are millions of references on the Internet for how to do this. – squillman May 04 '18 at 15:41
  • Thanks Sean! Squillman - I'm not even sure what 'making the connection' would comprise of yet! I have tried but... I'm fairly sure the DB Host Name is incorrect and from the looks of Sean's website... it looks like there's other considerations I have to take into account! – smashtest May 04 '18 at 15:53
  • DB Host Name you can either use the name of the computer, or the IP address. Trying pinging laptop1 from laptop2 by name. Then port 1433 is the default port. Then for testing if it is not working, disable the firewall on laptop 1, that maybe blocking connections. You may also have to configure laptop1 SQL to allow remote connections (should already be enabled by default). You may have to enable 'mixed mode' authentication. – sniperd May 04 '18 at 16:01
  • You need to Enable TCP/IP access to the sql server. and allow that through firewall. for more detail you can visit the [detailed](http://www.blog.udaymanvar.com/2019/04/27/sql-server-enable-ip-or-named-instance-over-the-network-access/) tutorial – Uday May 02 '19 at 12:01

2 Answers2

2

I see two potential issues:

  • A corporate laptop might have firewall restrictions. So, you have to open port 1433 for SQL Server.
  • Possibly you are playing with SQL Express, which by default, does not have TCP/IP connection enabled. To enable it run "SQL Server configuration manager", go to Network configuration->Protocols->TCP/IP->Enable->restart SQL Server. Also check other properties. If static port 1433 is not set - set it.
Slava Murygin
  • 1,951
  • 1
  • 10
  • 10
0

Two types of adjustments must be set before connecting to the remote SQL Server. These settings are necessary because without them the connection to the remote SQL Server will not be able to be successfully created

Configuration settings:

-The SQL Server instance to allow the protocol being requested
-Allow access through the Window Firewall 

1- Enabling TCP/IP protocol 2- Configuring Windows Firewall

For More details see the link : https://www.sqlshack.com/how-to-connect-to-a-remote-sql-server/