MSSQL Server Remote Login Issue on Windows Server 2012 R2 - sql-server

I have installed MSSQL Express 2012 on Windows Server 2012 R2, I have set up database and logins. Everything works fine while I'm logged in at the server, but once I want to login from another machine I got the message:
"login failed for user sa".
Settings that I have made:
Added permission for port 1433 in Firewall,
Named Pipes,
TCP/IP,
VIA are enabled from Sql Server Configuration Manager.
Also for TCP/IP I have set IPALL - TCP Dynamic Ports (blank) and TCP Port 1433. ( These settings are used on other versions of windows that are working, but cant get it on Windows Server 2012 R2 when I want to connect from another machine ).

Thank you Larnu - I have just checked the instance name and it was another instace, because also on that machine was installed and older version and I was doing settings on that older version using that older Sql Server Configuration Manager.

Related

Unable to link SQL Server Express to SQL Server

I have a SQL Server version 12.0 instance installed on a Windows Server 2012R2 (SERVER/SQL), and a SQL Server Express version 11.0 instance installed on a windows 10 workstation (WIN10/SQLEXPRESS). Both are on the same domain. I am logged in as the domain admin and have full rights on both SQL instances.
On my WIN10 machine I am able to create a linked server from (WIN10/SQLEXPRESS) to (SERVER/SQL).
On my SERVER when I attempt to create a linked server from (SERVER/SQL) to (WIN10/SQLEXPRESS) I am told to ensure that the instance will allow for remote connections. I have gone through about 40 hours of troubleshooting this, ensuring that all firewalls, ports, security and agents and browsers are open.
Is there any reason I cannot link a SQL Server Express to another SQL Server, but can the other way around?
I would like to be able to call stored procedures from my main SQL Server but am not able to.
Please note, the purpose for the SQLEXPRESS on the WIN10 machine is due to the vendor requirements for the software I am using. Otherwise I would have the instance on my SERVER.
Almost certianly a network issue.
Using SQL Server Configuration Manager configure SQLEXPRESS to enable TCP/IP and listen on a fixed port, preferably 1433 if no other instance is on the server. Restart the instance.
Create a Windows Firewall rule enable inbound TCP/IP connections to the port.
Test network connectivity to the target port from the other server with powershell, eg:
PS C:\> test-netconnection WIN10 -Port 1433
Test SQL connectivity with SQLCMD or SSMS on the server to the WIN10 box.
Create the linked server.

Cannot connect to SQL Server via TCP/IP from SQL Server Management Studio

Software:
Windows 2012 server R2
SQL Server express (64 bit), installed by choosing all defaults
SQL Server 2014 Management Studio, installed on the same machine
When I connect from SQL Server Management Studio to SQL Server, it works fine as long as I have "Network protocol" on the connection tab set to <default>.
When I set the protocol to TCP/IP, the connection fails:
A network related error ... The server was not found or was not accessible...
I checked with the SQL Server Configuration Manager that TCP/IP is enabled on the server as well as on the client. I can't find help from Google.
One observation: after the installation, the SQL Server Configuration Manager would not come up (Configuration Manager Cannot Connect To WMI Provider). I followed this advise (https://www.youtube.com/watch?v=igl-CB0qP_c) and got it to work.
I am unable to post a comment due to reputation score so I had to post an answer.
Some things to try/check:
Start the SQL Browser Service if it is not running
Check the SQL Error Log to ensure it is running on port 1433
Are you connecting to servername\SQLEXPRESS in the connection dialog
Try telnet to connect telnet servername port
if it goes to a blank screen instead of giving you a failure to connect then it is communicating. Ctrl + ] to cancel the connection.

SQL Server 2014 Express on Windows 10

I've downloaded and installed SQL Server 2014 Express on Windows 10, I've been through this loop at least 3 times now. The installation completes without warnings or errors. I have chosen to use Window authentication. I'm trying to use HeidiSQL to connect to SQL Server. I already have MariaDB installation and am able to connect to that using HeidiSQL.
When I connect to MariaDB I am able to select Databases from the drop down combo, but not for SQL Server. I don't seem to be able to connect with HeidiSQL.
In HeidiSQL, the settings are:
Network type: Microsoft SQL Server (TCP/IP, experimental)
Hostname / IP: 127.0.0.1
Ticked checkbox 'Use Windows authentication'
Port: 1433
I can't select a Database, if I click on the Open button after a while it comes up with:
SQL Error(17): [DBNETLIB]ConnectionOpen (COnnect()).]SQL does not exist or access denied SQL Server does not exist or access denied.
In order to use HeidiSQL's network type Microsoft SQL Server (TCP/IP), you need to activate TCP/IP protocol in your MSSQL configuration.
Further on, I am unsure if Windows authentication worked for me, as I'm always using the default SA user, which is created while installing SQL Server.
Apart from that, you should be able to connect using <yourmachine>\SQLEXPRESS on port 1433.
Use Microsoft SQL Server (named pipe) as Network type and .\SQLEXPRESS for Hostname / IP
SQL Server Express by default installs as a named instance called SQLEXPRESS - so for your "hostname", try one of these:
.\SQLEXPRESS
(local)\SQLEXPRESS
yourmachine\SQLEXPRESS
your-ip-address\SQLEXPRESS
Those should work.

How to solve it when there are multiple SQL Server instances, but can only connect to one?

Using SQL Server 2008 R2
I have 2 SQL Server instances on my PC, SQL1 and SQL2.
I have Windows XP installed in a VirtualBox. In XP, I have an application which can connect to SQL Servers.
When I try to connect to SQL1, everything is fine, but when I try to do that with SQL2 it errors out with
Could not open a connection to SQL Server
So I started checking the settings. I can connect to SQL2 using SQL Server Management Studio (on a local PC), so I checked that 'Allow remote connections to this server' was enabled. Also, in SQL Server configuration tool I enabled all protocols for this instance, just as it is for the SQL1. SQL Server browser is working.
Configuration of both instances seem to be identical. There is only one difference between SQL1 and SQL2 that I have noticed.
SQL1 version is 10.50.4000
SQL2 version is 10.50.1600
What can cause one of the instances to be unreachable through the network while the other one can be, and both settings are the same?
It could be firewall settings or network settings. For an instance to be reachable, configure at least the following.
TCP protocol enabled (SQL Server Configuration Manager)
Fixed TCP port (SQL Server Configuration Manager)
Enable SQL Server Browser Service
Open firewall for SQL Browser service (UDP port 1434) if you have a named instance.
Open TCP ports for SQL Server Instances.
See Configure the Windows Firewall to Allow SQL Server Access

Unable to connect to remote SQL Server 2008 R2 Express

I'm so frustrated I'm going to give all of my rep points if someone can help me with this.
Scenario:
There was a domain name change and the development server had a SQL Server Express working. Since I have forgotten the SA password and was not able to login with any account from the new domain I decided to uninstall and re-install a new SQL Server 2008 R2 Express.
I installed SQL Server Express from WPI with management studio. After the installation I can open the local server with Management Studio, but cannot open from a remote Management studio.
What I did to try to figure out WTH is going on:
I made sure Remote connection was checked on the SQL Options "Connections"
I enable TCP/IP and Named Pipe on SQL Server Configuration for my instance SQLEXPRESS
I ensure that the port was OK on Properties of TCP/IP of the SQL Server Configuration, there were no value at first, so I manual entered 1433, stop, start the server, try to connect.
a) I even try playing with the Active / Enable value, and with a stop, start, re-try in between every any changes.
Disable the Windows Server 2008 firewall, even added a manual rules for 1433.
Make sure the instance name was good on hkey_local..\software\ms\sql\... and the one I see on the local Management Studio, it's SQLEXPRESS
I can ping the server with its name or ip address, I even tried to connect with the IP address as well.
I'm just trying to connect from another server with another Management Studio, and here is the error I get:
Cannot connect to DEVSERVER\SQLEXPRESS.
ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified) (Microsoft SQL Server, Error: -1)
The server is a Windows Server 2008 x64
What a time waster
TIA for any tips, can't believe what's happening.
UPDATE:
I telnet from the remote server on port 80 just to make sure it's not a network problem, and I got HTML result, since firewall is disabled, and tcp/ip is enabled, SQL Browser started, Remote connection is activated it's hard to put the finger on what's not OK.
We had the same problem, finally figured out that a dynamic port entry has to be given along with the SQLExpress login .. ie 192.168.1.25\SQLEXPRESS,45490... then it allowed the login to happen.
We had installed a new SQLEXPRESS 2008 R2 (Windows 7 Professional Edition) in a new machine & was trying to connect to this DB from another machine from the mgmt studio and it was not connecting, nor was it connecting from any of the client machines.
We tried to check the SQLEXPRESS Browser / TCPIP was enabled and spent couple of hrs before we we figured out that the Dynamic port was causing this issue.
You can find this information, Open the SQLEXPRESS Configuration Manager, Select SQL Server Network Configuration on the left menu![Configuration Manager][1]
Select Protocol for SQLEXPRESS
You will find the TCPIP Enabled on the right side, click on the TCPIP and select properties
go to IPALL .. you will find the dynamic port info there.
btw, we tried installation on two HP PCs had the same issue & was solved with the dynamic port, while when we tried the installation on the ACer PC - did not get this dynamic port issue - so not really sure if it had anything to do with the OEM OS setup !?
However, the above solved our situation.
Last time this has happened to me, it was because I forgot about the SQL Server Browser service.
Did you try these steps: http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx ?
SQLEXPRESS is named instance, so it doesnt listen on 1433 port (it's for default instance). Try this:
Disable firewall
Start SQL Browser
Try to connect from remote machine
My problem solved by using the server configuration manager to disable the dynamic port (blank = disable), and fix the port to 1433

Resources