Имеется Windows Server 2016, Microsoft SQL Server 2014 Express, Postgres 14.4, ЛЭРС 3.46.2 .
Для MSSQL включены протоколы Общей памяти, Именованных каналов, TCP/IP.
Пытались воспользоваться инструкцией для переноса Утилита для переноса данных ЛЭРС УЧЁТ с SQL Server в БД Postgres
В итоге запустили следующую команду:
Lers.Sqls2Pg.exe db --source-connection “Data Source=localhost\LERS;Initial Catalog=LERS;User ID=sa;Password=пароль” --target-connection Host=localhost;Database=LERS;Username=postgres;Password=пароль
Получаем следующий стек вызовов:
Microsoft.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - Главное конечное имя неверно.)
System.ComponentModel.Win32Exception: Главное конечное имя неверно.
:
at void Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, bool breakConnection, Action wrapCloseInAction)
at void Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, bool callerHasConnectionLock, bool asyncClose)
at void Microsoft.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning(bool callerHasConnectionLock, bool asyncClose)
at Task Microsoft.Data.SqlClient.TdsParserStateObject.SNIWritePacket(PacketHandle packet, out uint sniError, bool canAccumulate, bool callerHasConnectionLock)
at Task Microsoft.Data.SqlClient.TdsParserStateObject.WriteSni(bool canAccumulate)
at Task Microsoft.Data.SqlClient.TdsParserStateObject.WritePacket(byte flushMode, bool canAccumulate)
at void Microsoft.Data.SqlClient.TdsParser.TdsLogin(SqlLogin rec, FeatureExtension requestedFeatures, SessionData recoverySessionData, FederatedAuthenticationFeatureExtensionData fedAuthFeatureExtensionData)
at void Microsoft.Data.SqlClient.SqlInternalConnectionTds.Login(ServerInfo server, TimeoutTimer timeout, string newPassword, SecureString newSecurePassword)
at void Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, string newPassword, SecureString newSecurePassword, bool ignoreSniOpenTimeout, TimeoutTimer timeout, bool withFailover)
at void Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, string newPassword, SecureString newSecurePassword, bool redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at void Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, string newPassword, SecureString newSecurePassword, bool redirectedUserInstance)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds…ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, object providerInfo, string newPassword, SecureString newSecurePassword, bool redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData
reconnectSessionData, bool applyTransientFaultHandling, string accessToken, DbConnectionPool pool)
at DbConnectionInternal Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at DbConnectionInternal Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at DbConnectionInternal Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at DbConnectionInternal Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at bool Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, uint waitForMultipleObjectsTimeout, bool allowCreate, bool onlyOneCheckConnection, DbConnectionOptions userOptions, out DbConnectionInternal connection)
at void Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
at void Program.<>c__DisplayClass0_0.<<$>b__1>d.MoveNext()
at async Task<ParserResult> CommandLine.ParserResultExtensions.WithParsedAsync(ParserResult result, Func<T, Task> action)
at async Task Program.$(string[] args)
Подключение через консольный клиент mssql проходит нормально.
sqlcmd -S 127.0.0.1\LERS -U sa -P пароль -d LERS -Q “SELECT @@VERSION”
Microsoft SQL Server 2014 (SP3-GDR) (KB4583463) - 12.0.6164.21 (X64)
Nov 1 2020 04:25:14
Copyright (c) Microsoft Corporation
Express Edition (64-bit) on Windows NT 6.3 (Build 14393: ) (Hypervisor)
(обработано строк: 1)
Просим помочь.