Prev: Backup issue
Next: I: ODBC error
From: Dan Holmes on 13 Apr 2010 08:52 On 4/13/2010 7:17 AM, nzrdb6 wrote: > Hi, I'm a PS newbie. How do i use it to update an SP on every DB? I've > got 100 DBs on my instance and I need to make a small tweak to an SP > on all the DBs. > > Thanks Install SQLPSX (http://sqlpsx.codeplex.com/). Then from a PS cmd use something like: PS > $instance = Get-sqlserver "server\instance" PS > $instance.databases | % { set-sqldata -sqlserver $instance.name -dbname $_.name -qry "CREATE PROC asdf AS BEGIN SELECT 1 END;" }
|
Pages: 1 Prev: Backup issue Next: I: ODBC error |