An error occurred while connecting to SQLServer.
The SQL Server database automatically comes with Schneider building adopts the default windows login mode, so that we cannot remotely connect through the IP address, and now the modification method is recorded here.
1. Modify the TCP/IP protocol used by the sqlserver Service
A) Call up SQL Server Configuration Manager in all programs, such:
B) Select TCP/IP in SQL Server Configuration Manager.
C) Right-click the attribute and configure it, as shown in figure
D) restart the SQL Server service.
2. Modify the default SQLServer login Mode
After we press 1 to modify the service, we still cannot log on normally through the user password. This may be because when the SQLServer instance is installed, we set it to only allow login through windows authentication, you can change it to windows or SQL Server as follows:
A) use SQL Server Management Studio to log on to the database as authenticated, for example:
B) Right-click the connection name and select attributes.
C) Select SQL Server and Windows Authentication mode under Security to save
D) Select the "sa" user, right-click the attribute, and modify its password and accessible database.
The preceding modification allows you to connect to SQL Server using the following string in jdbc mode.
Jdbc. driverClassName = com. microsoft. jdbc. sqlserver. SQLServerDriverjdbc. url = jdbc: sqlserver: // localhost: 1433; integratedSecurity = true; DatabaseName = taclogdata