Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to connect to sql server database in jdbc

2025-04-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

It is believed that many inexperienced people have no idea about how to connect to sql server database in jdbc. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

1. Drive problems:

JDBC2005 and JDBC2008 must be seated on the right number, or they will report an error! (I use 2008)

two。 Service startup questions:

In fact, in many cases, it is not possible to connect because your service is not started!

Run-> enter services.msc- to find SQL Server's service and start it.

If you don't rest assured, just start all the services related to SQL Server!

3. Login account and password problem

The root cause of the problem: many people install without settings and log in only with Windows authentication.

3.1 set password

After login: create a new query connection, enter: exec sp_password null,'sa','sa'-- to change the sa password to sa, the first is the password, the latter is the user name.

3.2 set up SQL Server authentication login (if not set, it will report an error sql server user 'sa' login failure)

1. Open the database and log in to the database as Windows

2. Login name-double-click sa (open properties)

3. General-- set password-- confirm (as described earlier, here are visual settings)

4. Status-login: enable-confirm

5. Right-click the server name-- Properties.

6. Security-- check SQL Server and Windows authentication modes-- determine

7. Right-click the server name-- restart-- close the database connection, exit the program-- log in to database 4 with sa. All connections are successful under OK,Eclipse.

After reading the above, have you mastered how to connect to the sql server database in jdbc? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report