Link MSSQL with MSQL Express between two different servers - sql-server

So this in the challenge. I have two servers in two different places (so they have two different static IP addresses). One of them is supposed to be a host (windows server 2012 with MSSQL Server 2014). I need to link this datebase with another server - mssql express.
I was trying to use MSSQL Management Studio -> Server Objects -> Linked Servers. Of course with all the hints I found in google. Still no luck. The best respond I got was "connection was established but login fail". And of course I was trying all the posibilities with 'Security' tab and 'be made using this security context'
Has anybody had such problem? Should I open sql port in router configuration?
enter image description here

Related

IIS web site can't connect SQL Server, but the server that hosts IIS can

Here is the architecture :
One server A with a SQL 2014 database
One other server B with IIS hosting Silverlight apps
From server B, I can ping server A, and I can connect SQL using a small testing program.
The problem is : The web sites on server B can't connect SQL on A.
Very strange, considering that all connection strings used are the same, and with a specified SQL user (not integrated security) :
data source=ServerA;initial catalog=TestDB;user id=userid;password=password;multipleactiveresultsets=True;App=EntityFramework
Moreover, the exact same sites used to work on another IIS server.
I wish I could provide you some error information, but I can't have it... It's like the data loading and connection fail silently despite my efforts to bring errors to the surface. All I can see is that my data doesn't load (empty grids in the interface)
What can be the cause of such behavior ?
OK I had this working.
There was 2 steps :
Enable the 'HTTP Activation' role on the IIS server
Local copy = True on all the server project references
Thanks all

SQL Server Login Error when connecting to server with multiple instances

I have a new dedicated SQL Server with 3 different instances installed.
SQL Server 2008 STANDARD
SQL Server 2008 EXPRESS R2
SQL Server 2012 EXPRESS
I am able to bring up all three in SSMS and can attach databases etc no problems.
I am able to connect to each of the different instances from different remote web sites (as I have defined different ports for each instance).
However, no matter which user I try and connect with its giving me this error.
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'USERNAME_HERE'.
The last 6 hours, I have checked absolutely everything including trying different usernames, simple usernames and passwords, verifying firewalls, changing ports, switching each data base on one at a time etc etc...a long list of things.
So is definitely not a username and password issue and I am stumped now as to what it can possibly be.
Could it be something to do with actual NT permissions?
PLEASE HELP ME!!! I AM GOING INSANE!!!

Install Team Foundation Server with Remote SQL Server Database

I am in the process of evaluating TFS 2010. I am trying to install onto our application server which sits in a domain and runs Windows 2008 R2 Standard.
We already have a SQL Server in place on a separate Windows 2008 box that I want to use - this is in the same domain.
After installing TFS, I am using the Advanced Configuration Wizard to try and complete the setup. There are 3 bits that are reporting errors : "Database" and "Reporting".
When I enter the SQL Server details, TFS gives me this error :
TF255049: A connection cannot be made to the server that is running SQL Server. Verify that you have entered the correct name for the server, including the instance name, that the server you attempting to connect to is online, and that you have required permissions to connect... (it goes on a bit more)
The server I have installed TFS on is a web server that runs several .Net websites - all of which can connect to the SQL Server with no problem.
I have tried IP Address, machine name, instance name - all report the same error.
Has anybody been in this situation before?
EDIT : Strangely if I go to the "Reporting Server" page in the wizard and enter the SQL Server name, it connects correctly in order to get the Report Server URL and Report Manager URL. So it seems this maybe user account related?
Two things spring to mind:
You'll need to make sure the TFS service accounts have permissions on the DB server.
If Windows Firewall is on on the TFS box, switch it off for a minute or two and try again.
If that solves it, turn it back on and open the SQL ports.
HTH

SQL Server 2008 R2 First-Time Connection Issues

We've been experiencing a strange issue with SQL 2008 R2 (10.50.1600) installed as a named instance. In order for any external clients to connect, we have a certain procedure we have to follow, but should not have to. Now I did in fact open the TCP/IP and Named Pipes protocols on the SQL server and restarted it, this isn't the problem. We're on an Active Directory Domain (running from Server 2003). The problem exists no matter what OS the server or client is (XP, 2003, 2008, Vista, 7, 64bit, 32bit, etc.). The problem also persists from anything which can connect, for example, SQL Management Studio, ADO (from our applications), etc.
The problem is that before any client can connect to this server, each client machine must first connect to this server through ODBC (and we don't use ODBC). Any attempt to connect to a 10.5 SQL server before doing this results in "Server does not exist or access denied". But once we can connect in the ODBC (through Named Pipes), then everything else starts to work. The same issue occurs both when using the Computer Name and IP Address. In fact, if we want to connect with computer name \ instance name, then we have to do so first in the ODBC, and then if we want to connect via the IP address \ instance name, then we have to do the same also for that.
We've been having to do this on every single client computer. Again, once the ODBC is able to connect to this SQL server through Named Pipes, then all future attempts from that client work.
What could be causing this to occur? How to avoid it? I should not have to do this "ODBC Trick" as we've been calling it. I've never had this issue on any other version of SQL.
The issue might be related to the SQL Browser service. Each sql instance will have a different port number - try connecting from the client as IP Address,Port (e.g. 123.123.123.1,1433) - this will exclude DNS and Browser from the equation
Edit: now knowing that it is browser related, try see why clients can't access SQL Browser (usually Port 1434). Service not started? Possibly firewall blocking?
Microsoft have tied down everything security wise now by default, so any new configuration now generally requires quite a bit of detailed security planning, policy configuration, permissions etc. Welcome to the age of non-trust ;)
You could easily test your connection by creating a simple file. Follow the steps here at "How to test an SQL Server connection": http://teusje.wordpress.com/2012/02/21/how-to-test-an-sql-server-connection/

IP Access to SQL Server

We have a Windows VPS server using SQL Server 2005 for our e-commerce site.
A while back we were suffering from attempts to access the database remotely so someone made changes so that only the IP of the server itself could access data. That was about 18 months ago and everything has been fine since.
However, we now have a second site (hosted on another VPS) that needs to access the same database and I can't get in contact with the person who made the original changes.
I know he was working in the SQL Server Management tool when he made the changes, can anyone point me in the correct direction.
Thanks.
SQL Server 2005 came locked down by default. Rather than SSMS, it also installs the SQL Server 2005 Surface Area Configuration tool, which has a Remote Connections setting where you can limit it to Local connections only.
You may also like to check any firewall on the server, which will have to allow Port 1433 (or different if changed from the default) TCP access from whichever machines you want to access it.
He might have turned the TCP/IP protocol off. In this case only the localhost can access the database. This link describes the procedure for sql server express, but the idea is the same

Resources