Changing Protocols affecting SQL Server connection - sql-server

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)

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.

How to control which SQL Server instance localhost points to

I have 2 instances of SQL Server on my PC, one is SQL Server 2008 R2, the other SQL Server 2012.
If I use LOCALHOST when connecting to SQL Server, it goes to the SQL Server 2008 R2 instance.
I want it to point to the SQL Server 2012 instance.
Does anyone know how I can achieve this?
It is very easy using Aliases:
1. Go to SQL Server Configuration.
2. Click on Aliases and setup localhost => localhost\name of your instance
3. do the same thing under 64bit aliases as well
If you have more than once instance localhost might get confused, therefore go to protocols for you name instance and change IP address to 127.0.0.1 which is localhost
you should specify the sql server instance name,
for example if the instance name is sql2012
localhost\sql2012
you will need to uninstall / reinstall in order to do this. I wish it was easier to modify an instance.

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?

Can't see *all* databases in a remote SQL Server instance

I can connect to a remote SQL 2008 Server instance, but I cannot see all the databases in the instance using SQL Server 2008 Management Studio.
I suspect that my problem has something to do with not all database in the remote instance having the same version. For example, I "upgraded" a 2005 database to 2008 by doing a backup from 2005 and importing it into 2008.
When I realized that this was not one of the database that I could see from my other PC, I noticed that the compatibility level of the imported was still 2005, so I changed it to 2008. Still I could not see the database.
On that remote server, the instance node is named "sql2008", and is "Version 10".
When I connect to the sql2008 remote instance from my local PC, the connection is shown locally as being a "SQL Server Version 8.0" instance.
I suspect that locally, I am only being shown databases that are somehow in the remote 2008 instance but have not been upgraded.
I guess I don't know what constitutes an upgraded database and I don't know how to connect to see all the databases, even if this requires multiple connections from the source PC.
The local machine is Windows 7 Ultimate. The remote host is Windows XP Pro.
Related -not being able to see the SQL Server 2008 instance.
Update:
This is what I see on the remote server using Mgt Studio, namely, a SQL 2008 instance and a 2000 instance.
When I log onto the SQL 2008 instance and perform the following query
SELECT
##VERSION As Version,
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') as ComputerNamePhysicalNetBIOS,
SERVERPROPERTY('ServerName') As ServerName,
SERVERPROPERTY('MachineName') As MachineName
The result re-confirms that the 2008b instance shown above with a version of 10 is a 2008 instance:
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (Intel X86) Mar 29 2009 10:27:29 Copyright (c) 1988-2008 Microsoft Corporation Developer Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)
USPL-DOKMANC2 USPL-DOKMANC2\SQL2008B USPL-DOKMANC2
OK, now from my LOCAL box, I used SQL Mgt Studio to try and connect to USPL-DOKMANC2 (the remote box.)
alt text http://content.screencast.com/users/Dokmanc/folders/Jing/media/ec146f56-5651-4968-9286-82508dc5d3b2/2010-05-22_1426.png
...I connect to the remote w/o the port I get this error:
alt text http://content.screencast.com/users/Dokmanc/folders/Jing/media/d3c5bc46-c286-4708-a2f5-282fc76124cb/2010-05-22_1427.png
But if I enter the DEFAULT port, I am able to connect. Note that the SQL2008 connection that I just added appears as being version "8" (SQL 2000).
alt text http://content.screencast.com/users/Dokmanc/folders/Jing/media/ea80af5e-4a1f-4417-9327-0b76476b4d14/2010-05-22_1426.png
I seem to be connecting to my SQL2000 instance again even though I specified in my connection params to connect to SQL2008b, a 2008 instance.
I can't seem to see my remote 2008 instance on uspl-dokmanc2. I keep getting my 2000 default instance databases showing up under sql2008b.
2nd Update:
Based on excellenf feedback below that SQL is most likely disregarding the name of the instance when tryingt o connect and determining the instance from the port specified. Now I just need to know the port that the SQL2008b instance is running on. I expected that SQL Mgt Config would tell me. The port is blank. Does this imply a default port? What would it be for 2008, not ethat I already have another 2008 instance, so if they all have to have separate ports, the normal 2008 default is probably not it.
Here's what I see in SQL Mgt Config for the 2008b instance. No port mentioned:
The remote instance (8.0) is a SQL Server 2000 instance
There is no such concept as "database version" that relates to visibility or permissions: every DB on a given server (version, SP and hotfix included) is at some internal version. This is why you can't restore or attach a SQL Server 2008 DB onto SQL Server 2005
I would run this to get the full details
SELECT
##VERSION,
SERVERPROPERTY('ComputerNamePhysicalNetBIOS'),
SERVERPROPERTY('ServerName'),
SERVERPROPERTY('MachineName')
For example, you may have a client alias that means you're connecting to the wrong server.
Also, you have to explicitly DENY ANY VIEW DATABASE TO public to "hide" databases
Are you sure your 2008 instance uses 1433 port? MS SQL seem to disregard a name of a instance and connect with the given port in most cases. Use the Configuration Manager to check the port.
Also, check if the SQL Browser is available from the remote machine - you'll have to add 1434 on UDP to your firewall settings. Remember to make sure that the SQL Browser is running on your server of course. See: http://support.microsoft.com/kb/914277

Error while connecting remotely

i m using sql server 2005 with service pack-2.
When I connect sql server with by registering the remote server with IP, username and password. I have done all the neccessary setting for connecting remotely "SQL Server 2005 Surface Area Configuration".
i got following error while connection:
This version of Microsoft SQL Server Management Studio can only be used to connect to SQL Server 2000 and SQL Server 2005 servers. (ConnectionDlg)
Can you please provide me possible reasons for the above mentioned error.
Thanks,
Saurabh
I would also add that this can also happen if you are trying to connect to a lower version too!
I would also suggest checking which version of SQL 2005 you are attempting to connect to and make sure it is a RTM or higher, and not an older CTP release.
The other possibility is that there is another SQL Server instance (not 2000, or 2005) running on the IP that you are connecting to. Try connecting via server or instance name if possible.
Kev
Only reason for this can be if you are trying to connect to higher version of SQL Server. Please check again if it is SQL Server 2005 or 2008 you are trying to connect.
Here is similar problem and solution for it at sql-server-performance site
edit:- also if you have installed some version of SQL Server 2008 it may also break Management Studio.
Right - to get to the bottom of this I would check the version from the command prompt, from the machine experiencing the problem:
sqlcmd -Q "SELECT ##VERSION" -S myserver\myInstance -U myUserName -P myPassword
This will give you the version of SQL Server you are connecting to. 'sqlcmd' will run against old and new versions of SQL Server.
You can use the same technique, with different SQL to identify which server you are really connecting to, etc.

Resources