When I use Navicat client to link a SQL Server database with the sa user, there is an error "client unable to establish connection 10054" - sql-server-2012

I have enable the sa user, and can log on by using SSMS; but if I use navicat to link it, there is an error 10054.

Related

Authentication failed when querying data from linked server with SQL authentication

I have 2 SQL Servers on one machine. Lets call it Server1 and Server2. I need to access Server1 from Server2 through the linked server. And I have managed to configure it but querying the linked server works only when I am logged with windows authentication method to Server2. When I will log with SQL login 'sa' into Server2, I am getting an error when executing a query:
The OLE DB provider "..." for linked server ".." reported an error.
Authentication failed.
This is the security setting I am using in linked server configuration:
Linked server security tab
Please help.
Error Log from the remote server:
06/24/2022 09:23:33,Logon,Unknown,Login failed for user 'NT Service\MSSQL$SQLEXPRESS'. Reason: Could not find a login matching the name provided. [CLIENT: <local machine>]
06/24/2022 09:23:33,Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 5.
Error Log from remote SQL server made me think, so I have added new user NT Service\MSSQL$SQLEXPRESS to remote server. Now I am available to run queries against linked server.
I am puzzled though why linked server is using network service account despite having configured remote sql login sa in security tab. I would appreciate if someone could clarify this to me.

Create API acceess to SQL Server Express 2014

I have kind of simple issue but fail to resolve it.
Here's the issue: I have SQL Server Express 2014 installed on my PC. I have to use SQL Server authentication because it should work when network is down. As sa I created login and user e.g. user1. Then as user1 I created DB e.g. db1 and a few tables. Now I could login into db1 as user1 using SQL Server authentication. The problem is that this db1 will be used by application e.g. app1. This app1 has configuration file that has all credentials and other connection strings things. Well when I start that application it throws error "Can't connect to database". Then I look into log and see this: Error: 18456, Severity: 14, State: 8. Login failed for user 'user1'. Reason: Password did not match that for the login provided [CLIENT: .
Then I could disable credential check in configuration file of app1 and then I don't have problem to start app1 but I have to use credential check.
Then I tried to created ODBC connection and use the same credentials and I succeed to connect.
Could some give the idea what could be wrong and I can't connect to db1 from my app1?
Thanks
All set, Thanks for info. I installed client 2008 R2 and now it's working. The problem was with the type of authentication. In my case it was equal 'true' and expected exact SQL user password which I was not able to pass because it was encrypted. When I change the type to 'false' it started to use Windows authentication and that resolved my problem.
Ticket could be closed

SQL Server 2008 Express and windows authentication

I have a SQL Server 2008 Express instance running and I can access the server with the default account sqlexpress using sqlcmd.
Now I have created a new windows account on the machine where SQL Server is running and created a login for sqlexpress using windows authentication. This account would be specifically used for backups.
When I try to login using the following and run the backup script (this backup script works fine for the default account sqlexpress)
sqlcmd -S (local)\mywinusr -i TestBkup.sql
I get the error
HResult 0xFFFFFFFF, Level 16, State 1
SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired. tting login failed for the user.
What could be the problem?
sqlcmd -S specifies a server, you have specified (local)\mywinusr. this suggests that you are passing in a username as an instance. your server name for sqlexpress should be:
(local)\sqlexpress
if you are logged inas this new user, then you just specify -E for 'trusted connection'
if you need to connect as, use
-U domain\username and -P password
hope this helps

Connection via ODBC to SQL Server failing

I have a strange issue. I can connect from one Terminal server to the SQL server as an admin. I can also connect to the server via a straight SQL connection as a normal user. When I try and log on to the server using odbc I receive the following error.
07/08/2011 10:49:14,Logon,Unknown,Login failed for user ''. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: 10.0.0.25]
07/08/2011 10:49:14,Logon,Unknown,Error: 18456 Severity: 14 State: 58.
The SQL server is definitely in mixed mode and a user is definitely set up in the connection. It must be a permissions issue.
Probably the user that tries to login does not have permission to the database he/she is trying to connect.
Go to the SQL Server > Security > Select the User - Right Click > Properties > User Mapping
And there select the database that user needs to access (check box in the map column)
I'm pretty sure that error had happened to me before that that's how I fixed it. Assuming it is true that your server is setup as mixed mode already.
If your using ado.net, make sure your using the ODBC data adapter, connectors and odbcCommands instead of the SQL ones. ;)

MSSQL login authentication problems with ODBC connection and R stats package

I am trying to connect an ODBC source to the R statistical package but having log in problems.
I have set up the ODBC name eplR with an SQL server driver linking to the (local) server using windows NT authentication with the network login ID default. In the set up the data-source test is successful.
When I try and create the connection in R
library(RODBC)
channel <- odbcConnect("eplR")
I get a failed connection
Login failed for user pssguy-PC/pssguy - my local computer name
When I connect to the (local) SQL server 2005 via management studio with Windows authentication I get a similar error unless I open management studio
with the "run as administrator" option.
In management studio, if I look at the properties of the (local) server, the authentication is set to Windows authentication mode.
The permission to connect SQL grantor is sa and the Grant box is checked. There is also a connect sql permission for pssguy-PC\pssguy with an unchecked box. I check it but on restarting mssql server it has reverted to unchecked.
I had what I thought was an identical setup on another standalone machine and I have no problems connecting in R.
Any help much appreciated
Maybe with odbcConnect() you could try passing the uid and pwd arguments too?
i.e.
odbcConnect("eplR", "**USERNAME**", "**PASSWORd**")