Field sqlserver database connection string format concept explained

Sqlserver database to connect illustratively: "Provider = SQLOLEDB.1; Password = ******; Persist Security Info = True; User ID = sa; Initial Catalog = AdventureWorks; Data Source = ****** - PC "

Case-insensitive string, but as consistent format, easy to read;

1.Provider = SQLOLEDB.1 This is the sqlserver oledb drive, basically we open the driver under windows, can be found, after all, Microsoft microsoft sqlserver own, ha ha.

If oracleoledb you need to install the corresponding version of the oracle client client; of course if directly installed this driver, do not need this anymore, after all, the fundamental goal is to find the corresponding drive;

Driver sometimes represented by the connected driver, such as driver = {mysql odbc 8.0 driver};

2. password and user id are the database login user name and password for instance, this simple, not explained, mentioning the value is oralce connection, using a shorthand way uid and pwd, and it is quite interesting;

3.Persist Security info = True translated into the vernacular that we can understand the need to save the password, the next time you connect, you do not need the extra characters to fill in password and user id;

4.Initial Catalog = AdventureWorks refers to the name of the database instance, the oracle connection, use datatabase;

5.Data Source is the server computer name or IP address of the database is located, some database connection will use Server = / localhost / ip.;

Other: Sometimes the connection string we will see intergrated security = SSPI / true / false, literally, after all, easy to understand: integrated windows authentication mode,

I do not understand windows authentication friend, you can look at access to information, not repeat them, and some will use trusted_connection, the same effect;

 

Common Database Connection OLEDB and ODBC drivers, including drivers, which is why we should connect the drive before being installed in the windows system, as to how to install, you can refer to online resources strategy is relatively simple;

The future will be specifically looking for articles describes the ODBC driver configuration and to complete the connection to the database through ODBC;

 

Guess you like

Origin www.cnblogs.com/cherenshuishou4451/p/11200122.html