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

Embedded PowerPC accesses SQL Server database through unixODBC/freetds (2)

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

Share

Shulou(Shulou.com)06/01 Report--

Before reading this article, please read "embedded PowerPC accesses SQL Server database through unixODBC/freetds (1)" to complete the compilation process of ODBC and Freetds.

Next, configure unixODBC and freetds:

1. Copy the compiled freetds-0.91 and unixODBC-2.34 to the PowerPC device, and link the two folders under / usr/local, as shown in the following figure.

2. Prepare the lib library required for freetds and link it to / usr/lib, as shown in the following figure.

3Dist freetds verification

Configure freetds, including SQL Server database server address, port number and tds version number, note: the tds version number needs to be specified when compiling, otherwise, the database link may fail.

3.2 use the command. / tsql-S freetds-U sa-P root to test whether the freetds is correct. For example, the data obtained in the following figure indicates that the database access is correct and the freetds executes successfully. Note: * you need to use the go statement for execution.

4, deploy and perform odbc verification

4.1 enter the unixodbc-2.3.4/bin directory.

Create the file tds.driver.template file and enter the following figure to configure the freetds driver.

4.3 execute the odbcinst-I-d-f tds.driver.template command to configure the freetds driver. After successful execution, you can find the odbcinst.ini file under unixODBC-2.3.4/etc, as shown in the following figure. * Note: this operation uses ROOT permissions, which is very important! *

Create the file tds.datasource.template and enter the following figure to configure the data source.

Execute the odbcinst-I-s-f tds.datasource.template command to configure the data source information. * Note: User users must be used in this operation, otherwise database access may fail! *

4.6 Test odbc to access the database, the commands and results are shown below.

At this point, the whole test is over!

* experience: database link failure occurred in the test, ferry previous experience, the result took a lot of detours, sweat, and finally solved through the unixODBC user manual, after setbacks, it is very important to change the way of thinking. *

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