首先確認通過TCP IP來連接連接SQLServer 2012
-
確保 Server Authentication選擇了SQL Server and Windows Authentication mode
-
打開 SQL SERVER CONFIGURATION MANAGER, 選擇數據庫實例,把Named Pipes和TCP/IP Status修改為Enabled
-
雙擊TCP/IP,選擇IP Addresses,把所有IP Enabled改為Yes, 把IPAll 的TCP Port 改為1433
通過Intellij Idea 13 來連接SQL Server 2012 配置
-
打開Intellij Idea 13,選擇Database窗口,點擊添加 - Data Source - SQL Server - Microsoft
-
輸入SQL Server 的配置信息
-
Driver files 選擇 SQL Server / Microsoft, 點擊 download,Intellij idea就會自動下載驅動。
-
點擊Test Connection, 出現如下對話框,表示已經連接成功了。