Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - SQL Server 2005/Yukon
 SMO vs SQL-DMO

Author  Topic 

kasper
Starting Member

7 Posts

Posted - 2006-11-16 : 16:03:39
Hi,
Did anybody compare the performance of scripting operations with SQL-DMO vs SMO? What other reasons should be considered, to choose between two solutions?
Thanks.

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-11-16 : 16:21:19
http://blogs.msdn.com/mwories/archive/2005/04/22/smoperf1.aspx

And - it's not really a vs question is it? Just a case of when should you move, because sooner or later you're going to want a SQL Server 2005 feature that isn't in SQL-DMO. And SMO is compatible to 7.0 and 2000 so why wait.
Go to Top of Page

kasper
Starting Member

7 Posts

Posted - 2006-11-17 : 17:46:31
SMO clients require: SQL Server Native Client, which ships with SQL Server 2005 and .NET Framework 2.0.
SQL-DMO is a dual interface COM in-process server implemented as a dynamic-link library (DLL). When creating a SQL-DMO application, you can use any OLE Automation controller or COM client development platform using C or C++.
I suspect that managed code will execute much slower, and the second question is that such application will consume more resources.
Thanks.


Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-11-18 : 00:21:46
quote:
I suspect that managed code will execute much slower

Do you have any basis for that whatsoever?
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2006-11-18 : 00:25:17
SMO maybe slower, but not because it's managed code. The real difference is how many server calls it makes to do an operation.

Try this:
turn on profiler, then start EM (which uses DMO) and click around a little. Then start SSMS (which uses SMO) and do the same thing. Compare how many queries are issued by each. I think you'll find SMO likes to talk to the server more :)

On the other hand, you can direct SMO to cut down on the server calls by following the instructions at the link that snSQL posted. You can't do this with DMO.

I use use SMO because it's more powerful, and also DMO is deprecated. also most of the code I write is managed as well and I hate COM interop :)



SqlSpec - a fast, cheap, and comprehensive data dictionary generator for
SQL Server 2000/2005 and Analysis Server 2005 - http://www.elsasoft.org
Go to Top of Page
   

- Advertisement -