Code Monkey home page Code Monkey logo

Comments (4)

shueybubbles avatar shueybubbles commented on August 26, 2024

Do you have any example applications that talk to Azure SQL DB through this same proxy?
The TDS protocol uses tcp but not http so I'm not sure what the expectation is here.
I am not a networking expert at all, though.

from go-sqlcmd.

e-bits avatar e-bits commented on August 26, 2024

Do you have any example applications that talk to Azure SQL DB through this same proxy? The TDS protocol uses tcp but not http so I'm not sure what the expectation is here. I am not a networking expert at all, though.

No I did not found any application talking to Azure SQL DB through this proxy.
If for example I would like to connect to an SSH Server from this same environment (behind proxy) I need to configure this:
"ProxyCommand nc -X connect -x $PROXY_IP:$PROXY_PORT %h %p" >> ~/.ssh/config

You're probably pointing me into right direction. How to check if our proxy is also handling tcp traffic?

from go-sqlcmd.

shueybubbles avatar shueybubbles commented on August 26, 2024

afaik you have to get your proxy owner to let port 1433 requests through instead of being redirected by the proxy.
The server requires the name in the connection string match the DNS name of the server too.

from go-sqlcmd.

e-bits avatar e-bits commented on August 26, 2024

Hi @shueybubbles,

thanks for your help. I finally got it working with help of this comment: dbeaver/dbeaver#4741 (comment)

It looks like if you're going through a tunnel you need to specify the username like this: export SQLCMDUSER=user@serverFQDN

If someone else finds this issue because of tunneling go-sqlcmd through a proxy this is the ncat command I used:
ncat --sh-exec "ncat --ssl $SQLCMDSERVER 1433 --proxy-type http --proxy $PROXY_IP:$PROXY_PORT" -l 14333 --keep-open &

Afterwards you should be able to connect like this:
./sqlcmd -S tcp:localhost:14333 -d $SQLCMDDATABASE -i query.sql

Envrionments Variables which need to be set:

  • SQLCMDSERVER
  • SQLCMDDATABASE
  • SQLCMDUSER
  • SQLCMDPASSWORD

from go-sqlcmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.