Remote Sql Server connection with MSSMS - sql-server

I am trying to connect to a remote sql server. I write the IP a.b.c.d into a server name, then I put username test and password test. This account has all Server Roles selected (I also tried with another account which only had public) and the databases I want to allow the user to manage (in User Mapping section) also have public and db owner. I have completed all the steps in here and I got it working on my local network with another computer in LAN having the server set up.
The error I get looks like this:
===================================
Cannot connect to a.b.c.d.
===================================
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
===================================
The user name or password is incorrect
But I can connect with the same credentials in the server itself, so I assume either: something is configured in a wrong way or I have to write the login name in some different fashion.
My both MSSQL programs (in two different computers) were installed with SQL Server 2012 Standard and SQL Server 2014 Express and the one I am trying to connect to is SQL Server 2008 R2 Express. However, at work, I have no problem connecting with version of MSSMS being different from the Server, so I doubt it is the case.
Any ideas what I am missing/doing wrong?

Related

UWP cannot connect to local SQL Server

I'm creating a simple UWP application working together with my local DB server I set up with SQL Server Management Studio.
I can successfully set up a connection in the server explorer and run queries in the DB:
However when I run the application I get an error when the connection is being established:
System.Data.SqlClient.SqlException HResult=0x80131904 Message=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: 25 - Connection string is not valid) Source=Core .Net SqlClient Data Provider
I'm not sure if it's a problem with the connection string or what else it could be. I checked the firewall settings and everything seems to be fine. The SQL server settings also allow for remote connection.
Which SQL Server version is running?
Have you tried with the following connection string format?
Data Source=.\\MSSQLServer;Initial Catalog=PapaDario;Trusted_Connection=yes;
Before you connect to your database, some aspect of the SQL Server configuration needs to be changed. First, ensure that you've enabled TCP/IP for SQL Server. You can do that in the Computer Management console. Then make sure that your SQL Server Browser service is running.

login issue with SQL Server

I recently install SQL server 2014 in my PC and I selected SQL authentication rather than Windows authentication after completion of installation when I tried to log in my server it shows this error even my server name and password was correct even though it shows this what to do now!!
following is the error message shows when I try to log in.....
TITLE: Connect to Server
Cannot connect to AADI_SQLSERVER.
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476
The network path was not found
As the error states "network-related or instance-specific error" its related not being able to find the instance.
This maybe due wrong instance name, Check the spellings of the server that you are connecting to.
You may have installed a named instance like sqlexpress in that case the server name should be {YourServer}\Sqlexpress.
You can get your instance name by going to services, if its MSSQLSERVER you can connect with the machine name else you should provide the correct instance name.
Please refer the screenshot below.
If you are connecting to another machine check the network configuration of the instance by going to sql server configuration manager. If the status is disabled you can connect from outside.
If that also fails better check the firewall settings

SSRS: how to prompt user and password for remote SQL Server instance

I've installed tigertoolbox from Microsoft and I'm using SQL Server Performance Dashboard Report daily.
It's very useful and I suggest you to install it if you are not using it yet.
BTW, when I connect to localhost everything works smoothly but when I'm trying to connect to another SQL Server instance on the network I receive the error
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'DataSource1'. (rsErrorOpeningConnection)
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Access is denied
The answer is very easy: I can easily connect to localhost thanks to my credentials but I need to enter user/password for a remote SQL Server instance.
How can I ask to SSRS to prompt user and password for remote SQL Server instance?
The problem Cannot create a connection to data source ‘DataSource1’. (rsErrorOpeningConnection) is even mentioned in the comments on the official Microsoft page but it's not mentioned how to fix this issue.
Check if you are running the SSRS on the default port of Server. If not, inform the port in the connection.
The answer is very easy: I can easily connect to localhost thanks to
my credentials but I need to enter user/password for a remote SQL
Server instance
That is NOT the answer.
The error tells you that your server was not found, so it cannot be authentication error, the server is not reached so it just cannot authenticate you.
You should check your connection string if it's right. if it's correct, it can be firewall or your server is not configured to accept remote connections.
So for whe first thing post here your connection string, it looks like this:
My picture is for shared DSN, if you use it embedded you can find it in your report properties

Connection from Visual Studio to SQL Server 2005

In Visual Studio 2010 I am trying to set up a connection with a SQL Server database with the add connection wizard but the connection fails!
This is the error I get:
a network-related or instance-specific error occured 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:Named Pipes Provider, error:40 -Could not open a connection to SQL Server)
Extra info;
I can ping the server!
Remote connections are allowed on the SQL Server!
SQL service is running!
What is here the problem?
To work around this problem, use one of the following methods depending on the symptom that you are experiencing:
A SQL Server login
Use a valid Windows login to connect to SQL Server. If you must continue to use a SQL Server login, you can change the security authentication mode in SQL Server to SQL Server and Windows.
A Windows account with insufficient permissions
To work around this problem, you must add the Windows account to SQL Server, and then grant the appropriate permissions to each database that the user requires access to.
Source: http://support.microsoft.com/kb/889615/en-us

Cannot connect to sql server

I cannot connect to Sql server remotely from management studio , It is corrrect User name and password, but
how to enable remote connections to a sql server?
what is other chances?
Cannot connect to xxxx.xxxx.xxxx.xxxx
===================================
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
thanks
Check out surface area configuration. It gives options to do so.
Edit: Enable the Named pipes conenction as well. I guess you are using Named pipe to connect. Also check if the SQL server browser service is running on the DB server.
Check the Authentication mode settings. It may be set to Windows Authentication only, it needs to be in Mixed Mode to accept SQL usernames & passwords.
Also check the Server network configuration and make sure named pipes or tcp/ip are enabled add that the client is using the appropriate protocol.
If everythings are correct, you may want to connect with a upper version, for example you are in SQL Server 2005 and want to connect to SQL Server 2008.
Note that you cannot connect to a upper version.(only same version or older version are granted)

Resources