Login failed for user '***' (.Net SqlClient Data Provider) - sql-server

I am trying to connect in SQL Server Management Studio 2008 R2. I tried everything I could think of, but no matter what I get this error:
Login failed for user
Server type : Database Engine
Server Name : .\SQLEXPRESS
Authentication : Windows Authentication
I've already tried Server names like (local), ., USERNAME\SQLEXPRESS, USERNAME, and SQLEXPRESS, but none of them worked :(
Details:
Server Name: .\SQLEXPRESS
Error Number: 18456
Severity: 14
State: 1
My SQL Server(SQLEXPRESS) is running as well as SQL Server Browser also.

Related

sqlcmd - problem to connect with sql credentials

I have a SQL database service in Azure with a server name dummyserver.database.windows.net.
I have also a database dummyDB with user dummyuser.
I can connect there providing above parameters and credentials with Azure Data Studio and other DB tools.
But when I try to do the same tith sqlcmd i get an error:
sqlcmd -S dummyserver.database.windows.net
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : MAX_PROVS: The system cannot contact a domain controller to service the authentication request. Please try again later.
.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Cannot generate SSPI context.
I went through https://learn.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver16
but haven't found any way to connect using login/password
In my case it is not even login issue because I don't get to this point yet.
My error is earlier.
Any hint what is wrong?

IIS cannot connect to SQL Server 2012 database ; Login failed for user .. Native Error Code:18456: Message:

I upgraded SQLServer 2000 database to SQLServer2012. After that IIS started throwing error:
Error: ERROR#1: return code:0, State:28000, Native Error Code:18456:
Message:[Microsoft][SQL Server][SQL Server]Login failed for user
''. ERROR#2: return code:100, State:00000, Native Error
Code:18456: Message:
I can connect to the remote SQLServer 2012 database via ODBC 64 bit and 32 bit tool from IIS server with same user . No issues. is migrated from SQL Server 2000 to SQL Server 2012.
Able to connect remotely using the same user via sqlcmd.
Connected via Excel to the database using all connection tests works
except IIS.
I created new user in SQLServer 2012 database and got the same error.
IIS configuration info below:
<CfgSpecDataSource>
<Connection>
DRIVER=SQL Server; SERVER=Server_IP; DATABASE=DB_NAME; UID=<db_user>; PWD=passed;</Connection>
</CfgSpecDataSource>
I have mixed mode authentication (windows/sql server) defined on the sql instance.
Tried changing DRIVER=SQL Server Native Client 11.0
and got stuck with 18456 error;
Thanks to Vijunav Vastivch and sepupic for your suggestions.
1) This is a unique problem.
(Dropped the user and created again, tried with another new user ; no luck)
2) sepupic suggestion helped; I looked into the SQL Server Log and it displayed "Password did not match that for login provided"
Password was in UPPER case in the IIS configuration file. I narrowed down the possibilities of didn't match error and tried with lowercase password in configuration file. It worked.

Microsoft ODBC Driver 13 for SQL Server : Login failed for user 'sa'

Im installing the MDM of Informatica.
MDM 10.2 - Jboss 6.4 EAP - SQL Server 11 - Windows Server 2008 R2.
During the creation of the schema 'sip_ant.bat create_bpm' i got this error
Microsoft ODBC Driver 13 for SQL Server : Login failed for user 'sa'.
(Same eeror with another user)
I already tried to use the Auth Mixed Mode and restarted the instance of the DB.
Error received is
D:\informatica\database\bin\common.xml:248: The following error occurred while executing this line:
D:\informatica\database\bin\mssql\database.xml:1214: Launched command return error code 1.
And that's the line of database.xml:1214 that refers:
collation_name="${activevos.collation}" param2=""${dbpath_short}"" param1="${activevos.password}">
Im able to login via SQLCMD on CMD with user 'sa' and other users.
MDM and SQL Server are on different Machine.
Any suggestion?
By default SQL Server will track failed logins and register it in the server log along with the reason. So check out your errorlog and look for errors 18456.
You can read the log by using SQL Server Management Studio by going to server, Management, SQL Server Logs, Current. Or any other way you prefer.
You'll find something like this:
2018-02-27 13:51:26.120 Logon Error: 18456, Severity: 14, State: 5.
2018-02-27 13:51:26.120 Logon Login failed for user 'fasd'. Reason: Could not find a login matching the name provided. [CLIENT: 10.80.62.89]
server=Yourservername,portnumber
You can put the above in your connection string
Problem was due to Customer configured another Default SQL port to use on SQL Management.

Login failed for user domain\MachineName$ error in Session Task

I have Informatica PowerCenter installed on my local machine and am able to successfully connect to the local SQL Server Database instance. However when I try to connect to a remote server I am getting 'Login failed for user domain\MachineName$'.
Here is the full Error -
Error connecting to database [
Windows authentication is used to access the Microsoft SQL Server database
Microsoft SQL Server Native Client 11.0: Login failed for user '<>\<>$'.
SQL State: 28000 Native Error: 18456
State: 1 Severity: 14
SQL Server Message: Login failed for user '<>\<>$'.
Database driver error...
Function Name : Connect
Database Error: Failed to connect to database using user [] and connection string [<>].].
Can someone throw light on how to get over this?

DBI - connect to MSSQL - unexpected login incorrect

I'm using DBI 1.624... and trying to connect SQL Server 2012. I wrote perl script to get data from db, and tested it on test server. It works fine. I repeated everything for other server and now I can not connect to db with error: Login Incorrect.
I created new login with SQL Authentication and I can login with it via SQL Server Management Studio, but when I try to connect via DBI:
DBI->connect('dbi:Sybase:server=SERVERNAME.domain.com:3180;database=master', 'user', 'pass')
I always get error:
DBI connect('server=SERVERNAME.domain.com:3180;database=master','user',...) failed: OpenCilent message:
LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (36)
Server SERVERNAME.domain.com:3180, database
Message String: Login incorrect.
User settings:
SQL Server authentication
Server Roles: public, sysadmin
Securables: Connect SQL
Status: Permission to connect to database engine: Grant / Login: Enabled
Server settings:
Connections: Allow remote connections to this server
My second server has all databases encrypted... So I use ODBC driver.

Resources