View Single Post
Old 09-20-2007   #2 (permalink)
Shay Levi


 
 

Re: Implementing SMO in Powershell

Try

http://www.databasejournal.com/featu...le.php/3691566


Shay
http://scriptolog.blogspot.com


Quote:

> Hello,
>
> I am fairly new to Powershell and certainly not to familiar with SMO,
> so really need some help with this problem I’ve encountered.
>
> I’m essentially trying to script the creation of a SQL Server 2005
> database with the applicable entities using SMO. I have successfully
> created a database using SMO, but not too sure on how to script the
> creation of new entities and add them to a particular database. I have
> searched high and low but can’t find any relevant information on the
> subject.
>
> I have found a useful add-on called PowerSMO but this can only be used
> for test purposes whereas I will be implementing my work into
> production.
>
> I guess I’ll have to use something like
> ‘Microsoft.SqlServer.Management.Smo.Table’ but I’m not entirely sure
> of the syntax or how to implement this object.
>
> If anyone can answer my question or point me in the right direction
> (any direction) I’d really appreciate it.
>
> Thanks,
>

My System SpecsSystem Spec