Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Stairway to SQL PowerShell Level 7: SQL Server PowerShell and the Basics of SMO


Stairway to SQL PowerShell Level 7: SQL Server PowerShell and the Basics of SMO

Author
Message
dbaduck
dbaduck
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 268
Comments posted to this topic are about the item Stairway to SQL PowerShell Level 7: SQL Server PowerShell and the Basics of SMO



Ben Miller
Microsoft Certified Master: SQL Server, SQL MVP
@DBAduck - http://dbaduck.com
Michael Oberhardt
Michael Oberhardt
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 93
I know you mean well. At one stage I was really excited about SMO, and RMO (the replication management objects library). However, we got so bitten by it.

For starters, the coverage is very hit and miss depending on versions. You get no errors, but some classes methods etc just don't work properly depending on the SQL version (particularly 2000). You call them and no exception or errors, but the data returned is rubbish or more or less empty.

Secondly, using SMO for something that is widely deployed adds some pretty hideous installation requirements. It isn't just a matter of bundling libraries. You need to run a stack of OS and CPU dependent Microsoft SQL artefacts installers, if the target machine either doesn't have SLQ installed at all, or has an earlier version of SQL than the libraries. And with these installers, it isn't as much as install SMO version 2008 or whatever, it means get the x86, i64, etc version of this, then install the correct version of depending on the OS and CPU, then this. It was a deployment nightmare.

Thirdly, The RMO libraries were abandoned back in SQL 2008 (R1). Microsoft say they are deprecated as of 2012, but that isn't the case. They don't actually work in 2012. They didnt' say they were deprecated in 2008R2 either, but they never issued a version for R2. It did work with R2 however.

I had written a SQL version agnostic replication setup and management tool using SMO and RMO. It made production deployments easier, but the prerequisites were just messy. Then of course as soon as 2012 arrived it didn't work. So I rewrote it removing all SMO and RMO. The installation is so much cleaner, all those damned SMO and RMO references removed from the project, the error management so much cleaner, and the code so much cleaner.
dbaduck
dbaduck
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 268
Is this just a comment or is there a question you have? I know that SMO is not perfect, but it has a lot of functionality and in my earlier Levels I explain the simple nature of installing the objects. I am sorry you were so bitten by the objects. I use them every day and to some great success.



Ben Miller
Microsoft Certified Master: SQL Server, SQL MVP
@DBAduck - http://dbaduck.com
Michael Oberhardt
Michael Oberhardt
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 93
More a warning, or cautionary tale, than a question...

Using it on a solution would be fine I guess. As part of a product however I couldn't recommend it. In all though, I was initially excited, the ability to have OO libraries for performing SQL programming sounded fantastic. The reality of it though was it was very uneven, some stuff just didn't work at all (like some event callbacks, from memory), in part abandoned, and a huge overall disappointment. And that is ignoring the deployment requirements it then entailed.
dbaduck
dbaduck
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 268
OK, thanks. I have used it on SQL 2005 and above with great success so I guess mileage varies on the project and versions of SQL server.

Thanks for commenting.



Ben Miller
Microsoft Certified Master: SQL Server, SQL MVP
@DBAduck - http://dbaduck.com
Perry Whittle
Perry Whittle
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12071 Visits: 16853
Hi Ben

great stairway, very good reading

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search