Excel connecting to wrong instance of SQL Server - sql-server

I have SQL Server 2008 Express and SQL Server 2012 Developer Edition installed on my local machine.
The usual connection to Express looks something like this:
SERVERNAME\SQLEXPRESS
The connection to SQL Server 2012 should be this:
SERVERNAME\MSSQLSERVER,1433
The problem is that when I use the supposed connection to SQL Server 2012, Excel shows me tables that are in the Express instance.
I have ODBC connections that refer to each instance separately and successfully but for some reason this doesn't work. Could the problem be that both instances are using the same port?
Update: In case you're wondering why I was specifying the port, it's because I couldn't connect to any database with just SERVERNAME\MSSQLSERVER (but, again, using the port connected me to Express). As a test just now, I stopped all Express services and now I can connect to SQL Server 2012 using just the server name (i.e., SERVERNAME without a service name).
Still, I'm curious to know what was going on there.

Related

SQL Server Databases missing after installing SQL Server Express

I installed SQL Server 2017 Express as a named Instance alongside my default instance. After rebooting once - both were showing but the I could not connect to SQL Server Express remotely. I then followed the instructions to enable IP on SQL Express using configuration manager and rebooted. Now I can connect remotely but my default instance is showing NO databases!
Also in configuration manager, SQL Server Services does not show any of my instances so that I can check they are running (this was the care even prior to enabling the IP address on the protocol, and when I knew it definitely was running as I could connect to it)
--
Update:
I discovered if I launch SQL Server Configuration Manager 2016 rather than "SQL Server Configuration Manager" I can see all my servers.
SQL Server 2016 appears to be running as is SQL Server Express. There is also a "MSSQLServer" that is stopped - think this may be SQL Server 2012. Not sure at this stage which one had the databases.
Ok so for anyone in a similar situation / panic. Do the following.
Look to see what other SQL Server configuration mangers are showing up. If you have installed multiple versions over the years chances are you'll see more than one.
Try using one of the later ones. You can see the file path too if you need it here.
If you manage to see a list of your database servers, check which are enabled and disabled. I had to disable SQL Server (SQLExpress) first before I could enable SQL Server (MSSQLServer), which in my case referred to SQL Server 2012.
If you want to have SQL Server Express running as a named server running alongside your default server, make sure you assign it a different port number (e.g. 1435) in the SQL Server Network Configuration>Protocols for SQL Express>TCP/IPALL section in SQL Server configuration manager.

Changing Protocols affecting SQL Server connection

https://support.microsoft.com/en-us/help/3135244/tls-1.2-support-for-microsoft-sql-server
TLS1.1 and TLS1.2 are the only things I have enabled and I have disabled TSL 1.0 and SSL as seen below:
I have two instances of SQL Servers on my machine: A 2008 SQL Express R2 and a SQL 2014.
With those network settings I can still through SSMS connect to SQL 2014 but NOT to 2008 Express R2
So is that a known thing about SQL Servers? Can you explain what is happening?
The error says that the server was not found, I think you did not use the correct server name, that is, if you have 2 instances, one of them is the default(I think 2014), the other one is a named instance, and if you didn't change the name offered by istallation the instance
name is SQLExpress, so if you connect locally, you can use .\SQLExpress or localhost\SQLExpress or (local)\SQLExpress, if you connect remotely you should use yourCompName\SQLExpress and your SQL Server browser must be started (or you can use yourCompName,port_name instead and use no Browser)

Cannot connect to SQL Server 2012 (connection string issue?)

I have been searching through SO and found a connection string that seems to be what I need.
However, it does not work.
I use SQL Server 2012 Express and I need my application to connect (with no credentials). I am using the following con.string:
Server=(localdb)\\SQLEXPRESS;Database=MyDB;Trusted_Connection=Yes;
However, the server does not respond.
You need to either use the proper SQL Server Express - then use this connection string:
server=(local)\\SQLEXPRESS;Database=MyDB;Integrated Security=SSPI;
(use just (local) - not (localdb))
or you use LocalDB (which is a "run-on-demand" version of SQL Server Express), in that case, use:
server=(localdb)\\v11.0;Database=MyDB;Integrated Security=SSPI;
The difference:
SQL Server Express proper is a server-based solution, which is installed and runs as a Windows service all the time
SQL Server Express LocalDB is a run-on-demand version of SQL Server Express, which only gets started up when you need it (e.g. in debugging inside Visual Studio 2012/2013)

I can't connect to SQL Server locally

I have just installed Visual Studio 2010. It comes with SQL Server Express (if am I correct). The problem is: when I try to connect via SQL Server Management Studio Express using Servername-->BrowseForServer. There is no SQL Server Express instance just appears SERVERPC
So I can't connect this way .\SERVERPC or typing or this way .\SQLEXPRESS. I checked some protocols like TCP/IP, NamedPipes if they work properly. SQL Server is also running but I can't start SQL Server Agent and SQL Server Browser because all the buttons restart, start and stop are disabled
Start->All Programs->Sql Server _your version_->Configuration Tools->SQL Server Configuration Manager.
Go to sql server services and check if there are Sql Server at all (or is it running)

SQL Server Express usage with Pentaho (or any non-microsoft product)

I'm trying to connect a local SQL Server database to an ETL utility called Pentaho. Pentaho very easily connects to full versions of SQL server without issue.
I've set mixed mode authentication and created a sql server account for the sql server express instance that can be used to login through SSMS.
When I try to log in via Pentaho, I get errors about it not knowing what the server is, or the server not responding. I've tried {localhost, myip, localhost\SQLEXPRESS, myip\SQLEXPRESS, just SQLEXPRESS} as the server name (and SQLEXPRESS is the instance name).
I know I've had trouble connecting other programs to SQLEXPRESS databases in the past. Can someone tell me why it acts different than when using a full install of SQL Server and how I can get around these differences?
If SQL Server Express is on a different server, have you enabled TCP/IP protocol?

Resources