Home Forums Programming Powershell invoke-sqlcmd and stolen single user session RE: invoke-sqlcmd and stolen single user session

  • Not sure, but when you say it appears some other operations gets your connection, that's what I think about. I've seen issues w/ connections not being closed (http://sqlblog.com/blogs/allen_white/archive/2009/08/14/a-couple-of-invoke-sqlcmd-issues.aspx), but that's not what's happening here.

    Can you post the  PoSh code you use?  It seems strange what you're doing here  to lose the single connection. I'm guessing that somewhere you're closing connections in the way the code is structured.