Kết nối SQL Server với Java IntelliJ
The Database Tools and SQL plugin must be installed and enabled Microsoft SQL Server 2019 (Express Edition) –
download link from the Microsoft site Microsoft SQL Server Management Studio 18.8 - download link from the Microsoft site IntelliJ IDEA 2019.1 and later – download link from the JetBrains site This topic gives you an example of how you can configure Microsoft SQL Server and create a connection to it from IntelliJ IDEA. If you already have Microsoft SQL Server installed and configured, consider jumping to the section
that describes a creation of a database connection in IntelliJ IDEA. To open SQL Server Configuration
Manager, open the Search dialog on Windows and type If you use other versions of Microsoft SQL Server, change the second digit before SQL Server 2019: C:\Windows\SysWOW64\SQLServerManager15.msc SQL Server 2017:
C:\Windows\SysWOW64\SQLServerManager14.msc SQL Server 2016: C:\Windows\SysWOW64\SQLServerManager13.msc SQL Server 2014 (12.x): C:\Windows\SysWOW64\SQLServerManager12.msc SQL Server 2012 (11.x): C:\Windows\SysWOW64\SQLServerManager11.msc SQL Server Browser listens for incoming requests and provides information about Microsoft SQL Server instances on the
computer. For more information about SQL Server Browser, see SQL Server Browser in the Microsoft documentation. If the SQL Server Browser menu items are disabled, try to
enable the SQL Server Agent service. In the SQL Server Configuration Manager, click SQL Server Services. In the right pane that lists server services, right-click SQL Server Browser and select
Start. SQL Server Agent is a Microsoft Windows service that executes scheduled administrative tasks. For more information about the
service, see SQL Server Agent in the official Microsoft documentation. Ensure that SQL Server Agent is running and starts automatically. After the change, a restart might be required. Navigate to . In the Services window, right-click
SQL Server Agent( From the Startup type list, select Automatic and click Start. In the SQL Server Configuration Manager, expand SQL Server Network Configuration and click
Protocols for MSSQLSERVER, where MSSQLSERVER is a name of the Microsoft SQL Server instance. In the list of protocol names, right-click TCP/IP and select Properties. On the Protocol tab, from the Enabled list, select Yes. On the IP Addresses tab, find the interface that your workstation uses and see the connection port. By default, the port is 1433. Verify that other running applications do not use the same port. Step 2. Configure SQL Server Management Studio (SSMS)Create a user
Configure user roles
Step 3. Connect to Microsoft SQL Server with IntelliJ IDEAThe following section describes configuration of IntelliJ IDEA on Windows, macOS, and Linux. Note that the Use Windows domain authentication checkbox is available only on Windows. To configure Windows domain authentication on macOS and Linux, see Connect by using Windows domain authentication. WindowsConnect by using SQL Server authentication
Connect by using single sign-on for Microsoft SQL ServerIf you run IntelliJ IDEA on Windows in the same domain as the Microsoft SQL Server database, you can use the Single-Sign On (SSO).
Connect by using Windows domain authentication
macOS and LinuxConnect by using SQL Server authentication
Connect by using Windows domain authentication
Last modified: 17 March 2022 |