terça-feira, 26 de setembro de 2017

HOW TO USE SQLCMD ON UBUNTU FOR QUERY MICROSOFT SQL

First
apt-get install  -y libgss3
After   download the mssodbc
execute download  https://mega.nz/#!zM9x3DLZ

key for download:

!jFEs2CIynSBWLDMwmctXJsMM35DeIPn24EQj1rbQzWM


tar -zxvf msodbcsql-13.0.0.0.tar.gz

access the folder msodbcsql-13.0.0.0 for check if there are some library missing for start the instalation. execute this command:

ldd /lib64/libmsodbcsql-13.0.so.0.0



If there is no missing lib execute:


Accept the terms and waiting the installation.

After installation finish eheck if there is a lib msql installed:


For execute the test follow the command syntax:

detail syntax:

sqlcmd -S <yourserver>\\<yourdatabase>,<yourportsql> -U <youruser> -P <yourpassword> -i <yourscriptsql>.sql

Normaly the script sql is your query sql





Nenhum comentário:

Postar um comentário