last day (15 days later) » 

19:10
1
Q: SMO, SSMS are slow for management of SQL Server in Docker

NReilinghI am trying to learn how to use the Docker image microsoft/mssql-server-windows-developer. Per Microsoft’s documentation, this container only exposes port 1433 TCP. docker run -d -p 1433:1433 -e sa_password=Passw0rd! -e ACCEPT_EULA=Y -v C:\dockerdb:C:\dockerdb microsoft/mssql-server-windows-deve...

Yeah I was thinking about that, but query performance seems fine so it seems limited to only certain types of actions. I also need to test running the SMO stuff from INSIDE the container and verify that the issue is not present there.
Where would I find those?
@LowlyDBA Those screens don't exist (/aren't applicable?) for Windows containers, per github.com/docker/for-win/issues/754. docker info only tells me what I've got on the host machine: 2 cores, 10GB RAM.
I am sorry, but I don't understand how you can conclude it's the port that's problematic. Check this link: stackoverflow.com/a/44145184/5807980
@RandolphWest Did you miss the part where the SMO PS script runs quickly from inside the container and slowly from outside?
I did not miss that part. SQL Server uses connection pooling. I get that this is frustrating, but I also want to impress upon you to ensure that the container (or "weird Hyper-V lite VM" in this case) has enough RAM. Your PS script ran "quickly", but minutes to run through ~3000 objects is slow in a machine with enough RAM (i.e. more than 2 GB).
To be perfectly honest, you're probably better off spinning up an Ubuntu Hyper-V VM on your machine, and installing SQL Server for Linux on that.
@RandolphWest I'll be in Database Administrators Chat if you want to catch up there.
19:10
Hey
I don't have a Windows 10 host that isn't already virtualized that I can use to help you figure this out, otherwise I'd have done that an hour ago already.
19:22
If this were me, I'd either install Docker from their own site, and then install SQL Server for Docker that way, or else spin up a Hyper-V Ubuntu VM and install SQL Server for Linux on there. Either way, there's a lot more control over resource allocation.
No matter which of these you choose, the SQL Server Docker image is running on Ubuntu under the covers, so it amounts to the same thing.
19:38
Hey — thanks for all the attention on my question
There are clearly some issues with windows containers generally, so there's a lot of kinks to work out — unfortunately switching to linux defeats the purpose of my long game here so I do want to figure out what's actually happening
actually, the windows 10 host that I'm working on is virtualized
bare metal is running macOS
Unfortunately I don't have a bare metal win10 available to remove that variable
If you have a sec, could you explain a bit more what you mean about connection pooling? I'm just not getting how I can be seeing a difference between milliseconds and minutes inside and outside the container
@@RandolphWest Ping in case you left
20:40
I did leave, sorry
Huh, I'm running a MacBook here myself. How are you virtualizing now? Parallels or other?
@NReilingh ping
VMware Fusion
I just found out something super interesting — about to update the q
cliff notes: when I add a hosts file entry to alias localhost, and connect from the host using the alias, everything works
LOL I know what that is
You were half right in your supposition about the ports; what was happening is every single command was going out and then back into through your virtual network. That must have been a hellish round trip.
That's hilarious because it's so silly
the virtual network created by docker?
How would the alias be any different?
I mean, ultimately the request should still be hitting 127.0.0.1 and then hitting docker's port mapping
I assume
there's something janky in the way Hyper-V networking works though
I ran into something like that when I was setting up a lab last year
Hm, I didn't think hyper-v would be getting used for any of docker's networking
I thought it would just be hosting the server 2016 kernel
(but maybe that's the same thing?)
20:51
this virtualization within virtualization is using Hyper-V, that's why specific builds of Windows 10 / 2016 are necessary
do you think if I looked at perfmon for the right hyper-v counters I would see the difference there between "localhost" and "dockersucks"?
hahaha, that's a good name for a container. I'd expect you to see a higher ping time at any rate
(I can see in Hyper-V Virtual Switch Manager that there's one called DockerNAT)
that's just the hosts file alias for 127.0.0.1. Not sure how I would actually ping the container... but from the host, I do notice that ping dockersucks ends up hitting 127.0.0.1 and ping localhost hits ::1
maybe it's an ipv6 issue... going to test something
Is that now because the alias is bypassing all the network resolution stuff and going straight to the container, because of the hosts file?
or did you remove it again and flush your DNS?
Oh wow, that's it — when I connect to 127.0.0.1 instead of localhost or "." it's also fast
I haven't removed it — I should do that
it stopped resolving for ping immediately after saving the hosts file — not sure if I need to flush
20:58
Always blame the network, I guess?
always blame ipv6, I think
You may not have to flush DNS on Windows 10, but I do it out of habit
I'm very happy you've figured it out, but probably not as happy as you are
my Windows 10 VM is now stuck in update hell :-)
lol, I still don't understand the why, yet
you use parallels?
yes, and I pay it every year with a smile
for the demo at my SQLBits session, I'm using SQL Server for Docker (macOS), and Operations Studio. I have Windows for Visual Studio, but I'm slowly migrating to VS Code.
I started with them but switched to VMware around 2012-13. Can't remember the exact reasons, but I've been happier with Fusion.
21:02
too many layers
Fusion is good
I'm excited about ops studio — still need SSMS for my work though
you may have switched because of the repeat fee for Parallels
but ops studio is a lot easier to install for colleagues I'm teaching the db basics
Fusion does a similar thing, but I think not as regularly
sqlops is very nice, and unfortunately I couldn't include a chapter about it in the 2017 book because of NDAs and timelines
I spent the last year changing my F5 habit in SSMS to control-E since that's supposed to be the new thing, but then SQL Ops studio has ONLY the F5 shortcut
that's been my biggest takeaway so far haha
21:07
heh. You've just reminded me I owe someone an email about keyboard shortcuts in sqlops.
F5 is dead! Long live Ctrl-E!
I'm glad you figured it out. Keep well and have a great weekend.
Thanks! You too.

last day (15 days later) »