Last post Oct 06, 2009 01:12 PM by FileFoundException
Participant
1792 Points
423 Posts
Oct 06, 2009 01:12 PM|FileFoundException|LINK
Using windows powershell you can generate scripts for a database and its objects
http://www.mssqltips.com/tip.asp?tip=1842&home
here is a snippet from the article
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null $s = new-object ('Microsoft.SqlServer.Management.Smo.Server') "LOCALHOST\SQL2005_1" $dbs=$s.Databases $dbs["Northwind"].Script()
generate scripts powershell
Participant
1792 Points
423 Posts
Generate Database Scripts using PowerShell
Oct 06, 2009 01:12 PM|FileFoundException|LINK
Using windows powershell you can generate scripts for a database and its objects
http://www.mssqltips.com/tip.asp?tip=1842&home
here is a snippet from the article
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null
$s = new-object ('Microsoft.SqlServer.Management.Smo.Server') "LOCALHOST\SQL2005_1"
$dbs=$s.Databases
$dbs["Northwind"].Script()
generate scripts powershell