February 22, 2013

Subscribe

Transfer Tables to a Different Schema via Powershell

by Scott Newman

Quick script to script out the transfer of tables belonging to on schema to the dbo schema. This does no checking to see if the object exists in the dbo schema already, nor does it actually transfer the object. It simply generates the script to do so. I’m working on a more thorough version that will do all this, but I had a need for a quick-one off today. This uses SQLPSX.