how to connect sql server over the internet - sql-server-2008

I am using Windows server 2012 r2. I have installed sql server 2008 r2 on that server. I am trying to access that sql database form my PC. Using Ip address of the server and port no 1433 to access but it is showing me network related instance specific error.
I am also trying to login on server in sql server 2008 database using Ip address of server and default port no example: 192.160.45.345,1433 but I am not able to login. It is also showing me network related instance specific errorenter image description here. Please suggest me any solution
Thank you in advance...

As it said in the error message, the SQL Server might haven't been configured to allow remote connections, that's the reason you cannot connect to it over the internet.
Try this link: https://msdn.microsoft.com/en-us/library/ms191464(v=sql.110).aspx

Related

I am unable to connect with my online phpmyadmin mysql database which i created for testing my windows forms application

error message from microsoft sql server management studioI set up a free phpmyadmin mysql database (online) and would like to use it for testing purposes on my windows forms application. I've been trying to connect to it from Microsoft server management studio and from visual studio but it always gives me the following error:
title: Connect to Server
Cannot connect to xxx.xx.xxx.xx(purposely ex'd out)
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
BUTTONS:
OK
------------------------------[connection error message][1]
If anyone can give me detailed steps on how to resolve this, I'll really appreciate.
welcome to Stack Overflow.
phpMyAdmin is a graphical interface for administrators to manage a MySQL or MariaDB installation. It's not an API that your Windows Forms application can access. You'll have to connect directly to the database (over the standard port 3306) or use some sort of API that's hosted alongside the database.
Most hosting providers block incoming connections on 3306, certainly I would expect a free MySQL hosting provider to do that as well. You'll have to ask the hosting provider if you're able to connect from your local machine to the database machine; you may need to add your IP address to a list of allowed hosts, for instance. Often, it's a bad idea to expose your MySQL installation directly to the internet (for security and performance reasons).
Your error message mentions named pipes. Named pipes are a Windows method for inter-process communication that is usually meant to be accessed from the same local machine (I believe Windows technically allows using a named pipe through a local network connection, but you're certainly not on the same local network segment and your chances of the free hosting provider allowing you a way to access a named pipe from across the network are less than them opening up MySQL's port 3306). Somehow you'll have to adjust your connection string to connect via IP address or host name instead of named pipe.
And finally, your error message refers to SQL Server. Microsoft SQL Server is a very different database product from MySQL/MariaDB. If your code is expecting to connect to SQL Server, you won't be able to use a MySQL or MariaDB backend instead. The two products are different enough and even use different ports, so the code won't be able to connect.

Web server conncetion status

I am new to Windows server and SQL servers.
I have this situation I have two virtual servers one for IIS and one for SQL. I want to connect my IIS site to my SQL server who is on the different virtual server. I have set connectionString with my own SQL server parameters. But it seems like something is wrong it won't connect.
I can connect to SQL server with SSMS and everything works well.
Is there any way to see why web server (IIS site) can't connect to SQL server. Any logs maybe on the web server? For example, wrong address, don't have permission.

SQL Server 2014 not accessible from network

I have setup a SQL Server 2014 instance on my local drive/computer and everything is working fine. I can login and access the data inside. I have the role admin on both the SQL server and my local computer. The computer is in an AD of a network. However, if I go to a different computer in the network, (I can ping to and from machine in the network no problem) and attempt to login my SQL server 2014 under the same credentials using Windows Authentication, I got the error below:
I have checked the configuration on my local machine where the SQL server 2014 resides and have all protocol enabled.
I also have SQL Server service set to automatic:
What else do I need to look into to make sure my SQL Server can be accessible from the network? My local computer OS is Windows 8.1.
Please help as the SQL Server is pretty useless if only my local machine can access the data in the SQL Server.

Connecting SQL Server through Network

I have developed an App using Delphi Xe3 and SQL Server 2008. Now the app is finished and compiled. I would like to run the app on another machine that is connected to the main Machine(running SQL Server) via Wifi. However when I run the app on another machine, I get the error " Server does not exist or access denied". I have enabled the SQL server for remote access enabled TCP/IP. Someone told me I would have to be running SQL server client on the other machine to access the server database. what am I missing to be able to run my app on machine B to share the database running on machine A.
I think sql server has remote connections off by default.
Run SQL Server management studio.
Right click on the server.
Properties
Connections
Under "Remote server connections", check on "Allow remote connections to this server"
For a default SQL instance don't add the name of the instance in the connection string Data Source. It somehow works when you test the connection from udl but does not work when you use the instance name in the Delphi app.

SSIS 2005 running in SQL Server Agent on local PC connecting to database on remote server produces error

I'm trying to run an SSIS 2005 package from a SQL Server Agent job on my local PC. This package is attempting to connect to a SQL Server 2005 database on a remote server, but it gets the error message, Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. What is the problem and how can I solve it?
you can create a SQL job to run the start_execution command and then the process will run under the user running the job.
the approach is explained here.
The problem is that the SSIS package is being executed under the NT credentials of the account running the SQL Server Agent service (likely to be either your local PC's "local system" or "network service" account), and is attempting to connect to the remote SQL instance with windows integrated security. This fails because the remote SQL server cannot authenticate the service account as permitted to connect.
When you developed it, the package was connecting to the remote SQL server using your NT credentials (a domain account which the remote SQL server could authenticate).
The quickest fix will be to change the service account under which your SQL Server Agent service runs to a domain account with rights to connect to the remote SQL server. To prove that this is the issue you could use your own domain account for this, although this isn't really a long term solution.
Another thing to consider if above fails is "hop count". If I try to run a SP from a local machine that is connected to remote DB that is trying to connect to another remote DB. I will get the error above. However, if I remote connect to the primary server first, then run the SP with the remote connection, it works fine.