DEBIAN PRO

DEBIAN PRO
DEBIAN

miércoles, 29 de junio de 2016

SQL Server en Linux


Estoy leyendo como avanza este proyecto, veremos que pasa y "como" pasa...
http://www.wired.com/2016/06/microsofts-open-source-love-affair-reaches-new-heights/

Drivers aqui
https://www.microsoft.com/en-us/download/confirmation.aspx?id=50419&cffa64c5-a636-96fc-e97a-0e907fcc4c04=True


Se deben instalar unos paquetes adicionales en Ubuntu

apt-get install libgss3


Nunca me imaginé que tendría una carpeta llamada "MICROSOFT" en mi servidor Linux.
https://msdn.microsoft.com/es-es/library/hh568454(v=sql.110).aspx

$ odbcinst -q -d -n "ODBC Driver 13 for SQL Server"
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
Threading=1
UsageCount=1



INSTALLING THE MICROSOFT ODBC Driver 13 (Preview) FOR SQL SERVER ON LINUX


To install the driver:
Make sure that you have root permissions.
Change to the directory where the ODBC Driver on Linux placed the file called msodbcsql-13.0.0.0.tar.gz. Make sure that you have the *.tar.gz file that matches your version of Linux. To extract the files, execute the following command, tar xvzf msodbcsql-13.0.0.0.tar.gz.
Change to the msodbcsql-13.0.0.0 directory and there you should see a file called install.sh.
To see a list of the available installation options, execute the following command: ./install.sh.
Make a backup of odbcinst.ini. The driver installation updates odbcinst.ini. odbcinst.ini contains the list of drivers that are registered with the unixODBC Driver Manager. To discover the location of odbcinst.ini on your computer, execute the following command: odbc_config --odbcinstini.
Before you install the driver, execute the following command: ./install.sh verify. The output of ./install.sh verify reports if your computer has the required software to support the ODBC Driver on Linux.
When you are ready to install the ODBC Driver on Linux, execute the command: ./install.sh install. If you need to specify an install command (bin-dir or lib-dir), specify the command after the install option.
After reviewing the license agreement, type YES to continue with the installation.

Installation puts the driver in /opt/microsoft/msodbcsql/13.0.0.0. The driver and its support files must be in /opt/microsoft/msodbcsql/13.0.0.0.



Y esto parece que FUNCIONA
./sqlcmd-13.0.0.0 -S 192.168.10.3 -U test -P test

22:35:18.326142 IP 192.168.10.2.60012 > 192.168.10.3.1433: Flags [S], seq 3518823063, win 29200, options [mss 1460,sackOK,TS val 63035222 ecr 0,nop,wscale 7], length 0
22:35:19.325318 IP 192.168.10.2.60012 > 192.168.10.3.1433: Flags [S], seq 3518823063, win 29200, options [mss 1460,sackOK,TS val 63035472 ecr 0,nop,wscale 7], length 0
22:35:21.329322 IP 192.168.10.2.60012 > 192.168.10.3.1433: Flags [S], seq 3518823063, win 29200, options [mss 1460,sackOK,TS val 63035973 ecr 0,nop,wscale 7], length 0
22:35:25.341312 IP 192.168.10.2.60012 > 192.168.10.3.1433: Flags [S], seq 3518823063, win 29200, options [mss 1460,sackOK,TS val 63036976 ecr 0,nop,wscale 7], length 0
22:35:33.357304 IP 192.168.10.2.60012 > 192.168.10.3.1433: Flags [S], seq 3518823063, win 29200, options [mss 1460,sackOK,TS val 63038980 ecr 0,nop,wscale 7], length 0





NO SE SI PONERME CONTENTO o NO....

./sqlcmd-13.0.0.0 -S 10.0.0.1 -U usersql -P"claveaqui"

1> select @@version
2> go

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)
Jun 17 2011 00:54:03
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)

(1 rows affected)



No hay comentarios:

Publicar un comentario