I have followed this tutorial to enable Remote Access on my Virtual Dedicated Server, I restarted SQL Service on remote server as well.
When I attempt to connect to the remote sql server I get the following error:
In the connection dialog below, I input my details in the format show:
What am I doing wrong?
On the firewall step (in tutorial) I had chosen Domain, but should have chosen Public because my home PC is not on the same Domain as my server. That fixed it.
Related
I am attempting to create the reporting services database for usage in SCCM. The reporting services installed fine (install only), but once I get to the Database tab and try to connect to the database server to create the database, it fails by timing out when trying to connect (see dialog). I am using Authentication Type: Current User - Integrated Security (domain user account loaded with permissions on that server - used by several other SQL apps).
Full text of error message:
Could not connect to server: 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: 50 - Could not open a connection to the SQL Server)
We are using two named instances, so the ports are dynamic. I have made sure all ports are active (netstat).
I also made sure of the following:
All SQL services are running and have been restarted several times
Firewall is disabled (all profiles) - shouldn't matter, because we are running setup locally
Remote connections are enabled in SSMS (again, shouldn't matter)
Named pipes is enabled (as are TCP/IP and Shared Memory); also re-ordered protocols while testing
Tried service accounts using virtual service account, local system, network service and known-good domain SQL service account
Varied Server Name by using machine name, FQDN, local IP, loopback (127.0.0.1) and LOCALHOST
I can ping the server and access IPC$ (as you would expect on the localhost)
I am inside of the SQL Server 2016 Reporting Services Configuration Manager and logged into the SQL Server on the correct instance and the Report Server is showing as Started. I can also user the Web Service URL (although it obviously gives me a DB error).
I have checked the Application Event log and SQL/Reporting Server logs without any hints of the problem.
What could be causing this issue? I have spent hours troubleshooting something that should be so easy.
I didn't realize that the Server name field when creating the database still requires the instance name even though the installation already had that embedded. It was just a matter of clicking that field and accepting the server\instance dropdown. I had the biggest face palm in a very long time.
i moved my website on a server, it have installed web application and SQL server instance (this site is only for private network), if i try to access sql instance from SSMS it connect without problem, but when i try to access data from my website or SSMS installed on another pc connected to the same network it's says me that instance name is not correct or firewall block sql server ports. Sql connection string is correct, both SQL Server and SQL Browser services are active, named pipes and TCP are enabled, and i've added rules to firewall to allow connection from port 1433 and 1434(this one is for UDP) but i've the same problem, any help?
I have got a remote server from client, and having sql server there connecting through local host.
Now I need to connect it through my local pc management studio.
What I need to do, Do I need any step up, or is there any place where I can find connection string to connect through remote.
Please advise.
To connect from your PC to a remote SQL instance, you will need the remote server's external IP plus the usual instance name and credentials
You will need to ensure that Firewalls etc are configured correctly on the remote server as per the link posted by scsimon
I created an Azure SQL Server. I have set the firewall, added my IP address to the rules. I tried to log in using SQL Server Managment Studio but got the network error every time. I am using the Server Admin Login and password created while creating the SQL server. Are there any more steps required to log into the SQL Server?
Note: I also enabled port 1433 for inbound connections on my PC.
According to the error message, we should check the server name of the database.
We can select the database here, and SQL Server Managment Studio will type the server name automatically:
Another way, we can find the information via azure portal, then type the server name manually:
It seems you are using named pipes to connect to SQL database. What happens if you specify TCP/IP protocol in advanced properties tab?
Thanks Everyone for your inputs. The only issue was, the firewall was blocking the port 1433. After opening it, I could connect to the SQL Server hosted in Azure. The link below mentions the requirement to open the said port. https://learn.microsoft.com/en-us/azure/sql-database/sql-database-develop-direct-route-ports-adonet-v12
I have a website hosted on a shared server, and I have setup on server to allow remote connection, and also turned on to allow remote connections.
Also I have turned the firewall off.
I am able to log in to my SQL Server via our static ip and port from a different computer not on our network from SQL Server Management Studio, and also when I run my website on my local host,
But when I publish our website to our hosted server it will not connect to our database and return an error :
[Win32Exception (0x80004005): An attempt was made to access a socket in a way forbidden by its access permissions][SqlException (0x80131904): 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: TCP Provider, error: 0 - An attempt was made to access a socket in a way forbidden by its access permissions.)]
This is our connection string
Data Source=000.000.00.00,12341;Integrated Security=False;
User ID=myUserNmae;password=myPassword;Initial Catalog=dBaseName;
What else could be wrong here?
you may have to open the program, not (simply) the port
http://technet.microsoft.com/en-us/library/cc646023.aspx
To add a program exception to the firewall using the Windows Firewall item in Control Panel.
On the Exceptions tab of the Windows Firewall item in Control Panel, click Add a program.
Browse to the location of the instance of SQL Server that you want to allow through the firewall, for example C:\Program Files\Microsoft SQL Server\MSSQL11.<instance_name>\MSSQL\Binn, select sqlservr.exe, and then click Open.
Click OK.
You'll want to read especially about "Dynamic Ports"
http://technet.microsoft.com/en-us/library/cc646023.aspx#BKMK_dynamic_ports
Can you try:
Data Source=127.0.0.1,12341;Integrated Security=False;
User ID=myUserNmae;password=myPassword;Initial Catalog=dBaseName;
Does the machine have an internal and external IP ? Aka, you may have to use the internal-IP (a real one, not just 127.0.0.1) for the IP address in the connection string.
to update you all if this issue might happen to you as well .
my website is hosted as shared hosting by hostgator and they claim that for security they will only allow traffic for sql to be done only via port 1433, which is the default port for sql...
hope this helps someone in the future