Sqlserver
 sql >> Baza danych >  >> RDS >> Sqlserver

Jak zainstalować freetds w Linuksie?

Stworzyłem pudełko Vagrant, które ma pełny przykład instalacji tutaj:https://github .com/FlipperPA/django-python3-vagrant/

...ale oto podstawowe kroki.

# Install pre-requesite packages
sudo apt-get install unixodbc unixodbc-dev freetds-dev freetds-bin tdsodbc

Wskaż odbcinst.ini sterownik w /etc/odbcinst.ini:

[FreeTDS]
Description = v0.91 with protocol v7.2
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so

Utwórz swoje DSN w odbc.ini:

[dbserverdsn]
Driver = FreeTDS
Server = dbserver.domain.com
Port = 1433
TDS_Version = 7.2

...i Twoje DSN w freetds.conf:

[global]
    # TDS protocol version, use:
    # 7.3 for SQL Server 2008 or greater (tested through 2014)
    # 7.2 for SQL Server 2005
    # 7.1 for SQL Server 2000
    # 7.0 for SQL Server 7
    tds version = 7.2
    port = 1433

    # Whether to write a TDSDUMP file for diagnostic purposes
    # (setting this to /tmp is insecure on a multi-user system)
;   dump file = /tmp/freetds.log
;   debug flags = 0xffff

    # Command and connection timeouts
;   timeout = 10
;   connect timeout = 10

    # If you get out-of-memory errors, it may mean that your client
    # is trying to allocate a huge buffer for a TEXT field.  
    # Try setting 'text size' to a more reasonable limit 
    text size = 64512

# A typical Microsoft server
[dbserverdsn]
    host = dbserver.domain.com
    port = 1433
    tds version = 7.2

Po wykonaniu tej czynności możesz przetestować swoje połączenie, próbując połączyć się za pomocą tsql (aby przetestować warstwę FreeTDS) i isql (dla unixODBC przez stos FreeTDS).



  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. Jak skonfigurować SQL Server do zarządzania sesjami ASP.NET?

  2. Dlaczego konwersja z DATETIME na DATETIME2 wydaje się zmieniać wartość?

  3. CLR Strict Security w SQL Server 2017

  4. Jak zapisać wideo w bazie danych za pomocą c#?

  5. SQL Server Management Studio 2008 Runas użytkownik w innej domenie przez VPN