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

  • i am under the impression that each Invoke-sql command opens a connection, does the work, and closes the connection.
    so you need all the commands in a single script, and not individual, multiple invoke-sql statments.

    can you change it so that it is a single script instead?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!