segunda-feira, 10 de outubro de 2016

Erro: what(): locale::facet::_S_create_c_locale name not valid

Após instalar o Driver de SQL para Linux no Debian 8.3 fui testar a conexão ODBC e me deparei com o erro abaixo:

# sqlcmd -S localhost
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Abortado



Mesmo adicionando o pt_br no locales não funcionou, pesquisando encontrei que é um falha e a condição está setada pra EN.



# locale-gen pt_BR pt_BR.UTF-8 en_US en_US.UTF-8
Generating locales (this might take a while)...
  en_US.ISO-8859-1... done
  pt_BR.ISO-8859-1... done
  pt_BR.UTF-8... done
Generation complete.
 


# dpkg-reconfigure locales
//Coloque EN_US.UTF-8 como padrão
Generating locales (this might take a while)...
  en_US.ISO-8859-1... done
  en_US.UTF-8... done
  pt_BR.ISO-8859-1... done
  pt_BR.UTF-8... done
Generation complete.




Execute o teste novamente e agora irá conseguir conexão validar.
 

#sqlcmd -S localhost
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x274D.
Sqlcmd: Error: Microsoft ODBC Driver 13 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..



Nenhum comentário:

Postar um comentário