Login failed for user

Guillaume LILLETTE 116 Reputation points
2020-10-26T09:55:47.3+00:00

Hello,

I have a strange problem.
I have an Azure database and it has some environment where connection with sqlcmd is not possible.

for example:

  • on my Linux workstation login ok
  • on a HYPERV Windows vm ok
  • on a Linux vm KVM KO

my command:
sqlcmd -S tcp: xxx.database.windows.net,1433 -U xxx -P xx@!xx -d dbname

the mistake:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server: Login failed for user 'xxx' ..

Base base event:
select * from sys.event_log_ex order by start_time desc

database_name start_time end_time event_category event_type event_subtype event_subtype_desc severity event_count description additional_data
esma-prod 2020-10-26 08: 00: 00.0000000 2020-10-26 08: 05: 00.0000000 connectivity connection_failed 4 login_failed_for_user 2 1 Login failed for user. NULL

If anyone has any advice that would be very nice.

Sorry for my aproximative English.

Azure SQL Database
{count} votes

3 answers

Sort by: Most helpful
  1. Guillaume LILLETTE 116 Reputation points
    2020-10-28T12:11:23.663+00:00

    Thank you for your answers.

    @AnuragSharma-MSFT

    After open the port 1433

    Status: active  
    ....         
    1433                       ALLOW       Anywhere                    
    1433 (v6)                  ALLOW       Anywhere (v6)  
    

    Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
    Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x102.
    Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : 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..

    maybe open another port ?

    @Dan Guzman
    Already tested :(


  2. ChandraHundigamVenkat 11 Reputation points
    2020-10-29T16:52:22.44+00:00

    Check following steps:

    1) Check the Microsoft ODBC drivers for Windows and Linux operating systems.

    2) Check or compare ODBCINI and and LD_LIBRARY_PATH environmental variables for the driver and create the DSN entries. Add the path of the odbc.ini file to the ODBCINI environment variable.

    0 comments No comments

  3. Guillaume LILLETTE 116 Reputation points
    2020-12-18T09:14:28.423+00:00

    @AnuragSharma-MSFT @ChandraHundigamVenkat Thank you for your answers.

    this is a network problem between KVM and my host.
    I found a workaround

    Thank you for your time

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.