April 14, 2009 at 9:51 am
Hi everybody!
Is there anyone who knows how does SMO connect to SQL Server? How does it retrieve data from a query?
Actually, I need to know if a natif access to SQL Server to execute queries is faster than using SMO.
Thanks.
April 14, 2009 at 2:09 pm
Not sure what you mean by "how" here, but SMO does accomplish almost all of its work by connecting to SQL Server and executing SQL commands. There are only a few exceptions to this (such as scripting), so in theory you could write all of your own code to do what SMO does and it would be at least as fast (and frequently faster).
There are several things in SMO that are annoyingly slow, and in my own SMO utilities I usually do write my own SQL code for them as a speedier alternative to SMO.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 15, 2009 at 1:09 am
Hi, thank you for your answer.
Actually I want to know the difference between using SMO and ADO.Net with Native SQL Server .Net Data Provider in terms of performance (connection and queries).
By "how", I meant if SMO uses the Native SQL Server .Net Data Provider or another provider.
Thanks
April 15, 2009 at 2:01 am
SMO stands for SQLServer Management Objects.
Meaning a layer with a number of methods and properties specifically made for managing sqlserver.
You wouldn't want to use that layer for your "normal" querying stuff.
IMO that would seem like calling the tow truck every time you want to inflate your tires at a gas station.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
April 15, 2009 at 2:24 am
Ok thanks.
In conclusion :
- for managing sqlserver : SMO
- for query : ADO.Net with .NET Framework Data Provider for SQL Server
April 15, 2009 at 3:03 am
Tasumy (4/15/2009)
Ok thanks.In conclusion :
- for managing sqlserver : SMO
- for query : ADO.Net with .NET Framework Data Provider for SQL Server
Use SQLNCLI as much as you can.
BOL topic SQL Native Client Programming http://msdn.microsoft.com/en-us/library/ms130892(SQL.90).aspx
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
April 15, 2009 at 3:10 am
Why is it better?
http://msdn.microsoft.com/en-us/library/ms130828(SQL.90).aspx
For new applications, if you're using a managed programming language such as Microsoft Visual C# .NET or Visual Basic .NET, and you need to access the new features of SQL Server 2005, you should use the .NET Framework Data Provider for SQL Server, which is part of the .NET Framework for Visual Studio 2005. This will give you the most robust data access component for working with SQL Server 2005.
April 15, 2009 at 3:42 am
You are correct.
Apparently MS is also promoting the .Net infrastructure to achieve optimal integration.
If you are developing a new application it is recommended that you consider using ADO.NET and the .NET Framework Data Provider for SQL Server instead of SQL Native Client to access all the new features of SQL Server 2005. For more information about .NET Framework Data Provider for SQL Server, please see the .NET Framework SDK documentation for ADO.NET.
info at http://msdn.microsoft.com/en-us/library/ms130978(SQL.90).aspx
I use sqlncli, but I'm not a hardcore .net dev :alien:
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
April 15, 2009 at 4:16 am
OK Thanks. Both of you.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply