Calling COM From T-SQL

  • Dinesh Asanka

    SSChampion

    Points: 11058

    Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/dasanka/callingcomfromtsql.asp




    My Blog: http://dineshasanka.spaces.live.com/

  • TheMOTU

    SSC Enthusiast

    Points: 158

    Conceptually, databases are to store and retrieve data - that what they do best.

    Having "ability" doesn't mean you have to use it. As a DBA and developer, I strongly discourage people to use applications inside SQL Server, or any other database... Because I generally don't trust such applications to properly manage system resources. Using COM from T-SQL will slow down your SQL Server (at best). In most cases it will crash it eventually - fact.

    Instead of "smart assing" with T-SQL, you (and your installation) will be better off by having a dedicated server to run application(s) which connect to database server for data.

  • James Luetkehoelter

    SSCommitted

    Points: 1733

    First off -- very well written article!  While as a practice I agree with the above post that this generally isn't a good idea, there are instances where I've seen it used effectively as a stop-gap measure to re-writing an entire application.

    It certainly is a security risk (many recommend removing the OA procedures althogether), and there is a visible performance depending on how often the COM object is instantiated.

    With all the risks and performance hits, it is a handy feature to be aware of, but NEVER make it your primary plan of action. However, there are circumstances where it might be the only viable option. The realities of most companies place financial and temporal constraints on projects that cause us to consider options we would normally avoid at all costs.

    Have I used the OA procedures in production work- no.  Would I use them? Not on something I was building for a client.  Would I tell a client that they absolutely should be removed if already used for an existing application? Not necessarily.  I would point out the risks and costs involved, and stress to them that they should consider eliminating them in the future.

    I think they are very useful to know about (and this was a well-written article introducing them), but should considered as a last resort or temporary work-around.

  • Dinesh Asanka

    SSChampion

    Points: 11058

    yes it should be used as final "Trump", I should have mention these in the article. Sorry About it!!




    My Blog: http://dineshasanka.spaces.live.com/

  • James Luetkehoelter

    SSCommitted

    Points: 1733

    Actually I like the article just as is.  It's a great reference for someone in that "trump" situation.  I didn't get the impression you advocating it's usage rather than exploring what it can do and how to use it. Sometimes I think it's good to separate information from recommended practice...

    Again, Kudos. Well written an organized and will probably help somebody who has hit that "trump" situation

  • poornachander

    Grasshopper

    Points: 19

    he he he ......Stop copying from MSDN

    http://msdn.microsoft.com/en-us/library/aa238863(SQL.80).aspx

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply