How can I obtain the connection string from sqlserver and mysql?

Source: Internet
Author: User

How can I obtain the connection string from sqlserver and mysql?

How to obtain connection strings from sqlserver and mysql

Steps:

The file type is changed to. udl.

2. open the file and find the corresponding service in data provision.

3. Select the required database in the connection and fill in relevant information.

4. Test the connection. If the connection succeeds, jump to the next step. If the connection fails, the user information is incorrect and the user information is modified again.

5. Change xxx. udl extension name to txt, and you can find the connection string.


Note: The connection string found here contains provider, which may not be supported. If not, change it to server.


What are the differences between the connection strings of SQL server and oracle and mysql in java?

Create database link database connection name connect to user name identified by password USING 'database connection string'; the DATABASE connection string can be NET8 easy config or directly modified in TNSNAMES. ORA.

When the database parameter global_name = true, the Database Link name must be the same as the remote database name.

The connection string for java connection to SQL server is Class. forName ("com. microsoft. sqlserver. jdbc. SQLServerDriver "); String url =" jdbc: sqlserver: // localhost: 1433; database = database name; user = username; password = password ";

What are the differences between the connection strings of SQL server and oracle and mysql in java?

Thin connections are basically the same in writing, while there are slightly different URLs in writing.

MySQL:
MySQL. Driver = com. mysql. jdbc. Driver
MySQL. URL = jdbc: mysql: // localhost: 3306/myDB? AutoReconnect = true
MySQL. User = xxxx
MySQL. Password = xxxx

Oracle:
Oracle. driver = oracle. jdbc. driver. OracleDriver
Oracle. url = jdbc: oracle: thin :@ localhost: 1521: OraTest
Oracle. user = xxxx
Oracle. password = xxxx

SQL Server:
. Mssql. Driver = net. sourceforge. jtds. jdbc. Driver
. Mssql. URL = jdbc: jtds: sqlserver: // localhost: 1433/myDB
. Mssql. User = xxxx
. Mssql. Password = xxxx

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.