Avatar of Isaiah Melendez
Isaiah Melendez
 asked on

Powershell v3 - SQLCMD

I need to build a PS script that will call upon the MSSQL db and pass through a t-sql query to backup a database, then, restore the backup into another DB on the same server.

Thanks!
PowershellMicrosoft SQL Server

Avatar of undefined
Last Comment
Vitor Montalvão

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Vitor Montalvão

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Isaiah Melendez

ASKER
I just recently started getting into powershell, and, I love the power it brings to the table. So I was curious to a backup example in powershell for SQL DB.
Vitor Montalvão

Ok but for SQL Server whenever you can, use proprietary scripts.
Check the link I've posted in my last comment to see if it helps you.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck