sql server - Is it possible to inventory MSSQL-Linux running within Docker? -


part of job involves data collection size workloads transferred cloud. element of being able enumerate sql instances within client's environment insights such "hey have out of support legacy sql here supposed decommed years ago, what's deal."

with release of sql server 2017, i've created instance of sql server enterprise 2017 on linux container (using this image) i'm running locally on windows 10. can connect instance via ssms , select @@version confirm it's legit, question if possible inventory device , find sql instance without knowing connection string.

things i've tried:

-running on windows 10 believe supported via hyper-v, when try go through hyper-v manager connect vm docker spun up, can't interface there (which figured, since docker emulates apps rather full vms)

-tried sqlcmd -l win10 host device , don't see instance (don't have sql installed on windows 10 device i'm running from)

-i can find docker image via docker ps, exec -it bash, , use sqlcmd there, sqlcmd -l isn't listed option within linux.

-ipconfig host device shows docker ip address, wouldn't give me port information have scan through ports feels dirty.

i'm kind of @ loss @ point. if didn't explicitly know docker container running mssql-linux, there way identify inventorying host device? (sorry long post)

after banging head on bit i've found painful workaround of:

connect container's bash using: docker exec -it <container_name> "bash" using ps aux | grep sql list of sql processes. ms image shows /opt/mssql/bin/sqlservr local testing. once sql has been identified can attempt connect using docker ip ipconfig , port docker ps

it's not elegant, should possible automate steps use across set of unknown devices.

leaving open bit better alternatives.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -