Попытка использовать пролет командной строки для подключения к SQL Server. Порты 1433 и 1434 открыты на брандмауэре, и tCPIP настроен для их использования в диспетчере конфигурации SQLServer.
Из файла конфигурации flyway:
flyway.url=jdbc:sqlserver:////<mymachineName>;databaseName=AdventureWorks2012
flyway.user=<username>
flyway.password=<password>
Когда я бегу
.\flyway info
Я получаю что-то вроде:
+ ~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (ERROR: :String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Unable to obtain connection from database (jdbc:sqlserver:////<myMachineName>;databaseName=AdventureWorks2012) for user '<username>': The TCP/IP connection to the host //<myMachineName>, port 1433 has failed. Error: "//<myMachineName>. Verify the connection properties. Make
sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL State : 08S01
Error Code : 0
Message : The TCP/IP connection to the host //<myMachineName>, port 1433 has failed. Error: "//<myMachineName>. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make
sure that TCP connections to the port are not blocked by a firewall.".
Я также получаю странную ошибку в журнале ошибок sql:
Source Logon
Message
Login failed for user '<domain_Name:MachineName$'. Reason: Could not find a login matching the name provided. [CLIENT: <local machine>]
В основном, похоже, я пытаюсь войти в систему с учетной записью компьютера. Любая помощь приветствуется.
Я не могу отметить это как принятый ответ pintxo. Может это потому, что это комментарий? В любом случае, вы совершенно правы. Я был уверен, что уже пробовал это, но, очевидно, нет. :) Спасибо за помощь.





Слишком много разрезов в URL-адресе? Должно быть только
jdbc:sqlserver://<mymachineName>
^^
Only two slashes here.
Слишком много разрезов в URL-адресе? Должно быть только jdbc: sqlserver: // <mymachineName> ...?