Relative Content

Tag Archive for sql-servercommand-line-interfacesqlcmdoutput-formatting

How can I both export execution plan XML and get column names in tables?

I need to get both the full text of an actual execution plan and my full table of results with column names from sqlcmd. My first requirement forces to me pass in -y 0 as documented here. However, this appears to disable column names appearing in my table’s output. I cannot find any reference to this in the documentation. So how can I both pass in -y 0 and get column names?

sqlcmd: How can I both export execution plan XML and get column names in tables?

I need to get both the full text of an actual execution plan and my full table of results with column names from sqlcmd. My first requirement forces to me pass in -y 0 as documented here. However, this appears to disable column names appearing in my table’s output. I cannot find any reference to this in the documentation. So how can I both pass in -y 0 and get column names?