--
Andrew J. Kelly SQL MVP
"Bill H" <anon...@discussions.microsoft.com> wrote in message
news:87B09D93-9FE1-4B78...@microsoft.com...
> I was trying to write an extended stored procedure for SQL Server 2000
using C#. I was hoping that there was a reference I could add for the ODS
naespace.
>
> Bill
"Andrew J. Kelly" <sqlmvpn...@shadhawk.com> wrote in message news:#eWOv47S...@TK2MSFTNGP11.phx.gbl...
--
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
"Andrew J. Kelly" <sqlmvpn...@shadhawk.com> wrote in message
news:%23eWOv47...@TK2MSFTNGP11.phx.gbl...
I don't know what CCW is, but below KB article is rather clear the calling CLR code from SQL Server through an
xp or sp_OACreate is *not* supported...
http://support.microsoft.com/default.aspx?scid=kb;en-us;322884
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Vinodk" <vinodk_sct@NO_SPAM_hotmail.com> wrote in message news:exxNOfG...@tk2msftngp13.phx.gbl...
Well, this is documented that you cannot call a CLR code directly :). But
you can call it using a "com callable wrapper" (CCW) you can invoke a CLR
code indirectly. This is a dirty trick but it works for sure. Here is a code
snippet that Srinivas Sampath had posted on the same:
http://www32.brinkster.com/srisamp/sqlArticles/article_33.htm
You can also create a .NET component written as a extended stored proc and
called from SQL Server 2000. This article was by Kumar Gaurav Khanna (MVP,
.NET) written sometime back. This is even more interesting. Look at the
implementation at :
http://www.wintoolzone.com/showpage.aspx?url=dotnet.aspx?show=sourcecode.
Your comments are welcome ...
--
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
"Tibor Karaszi" <tibor_please.n...@hotmail.nomail.com> wrote in
message news:eeWf7VHT...@TK2MSFTNGP11.phx.gbl...
From the KB:
"This limitation for support pertains directly to the use of extended stored procedures and the use of OLE
Automation for any loading of the libraries that you must load to run in the SQL Server memory space."
In Proc COM objects will certainly be in-memory, right? Or does the wrapper handling make it an executable,
out-proc?
As for extended stored procedures, they will be in-proc, unless you use something like xp_cmdshell or similar
to spawn your own process
I have a feeling that the solutions you mentioned seems to work, but they are still in-process and hence not
supported and might/will cause problems under load etc. However, If the solutions are out-proc, then they very
well might work...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Vinodk" <vinodk_sct@NO_SPAM_hotmail.com> wrote in message news:%23vCyO%23HTEH...@TK2MSFTNGP10.phx.gbl...
The first solution using sp_OA* will be inproc and so is the case with using
xp's.
> In Proc COM objects will certainly be in-memory, right? Or does the
wrapper handling make it an executable,
> out-proc?
AFAIK, You are 100% correct here. The CCW is just a COM interface to calling
the .NET assembly. Hence the invocation is as normal COM component. It will
*not* work as out-proc.
> I have a feeling that the solutions you mentioned seems to work, but they
are still in-process and hence not
> supported and might/will cause problems under load etc.
You are correct. It is not *supported*. I see it is as, not supported by MS.
Doesnt say it will not work ... There are potential risks involved in using
the same :).
The extract from the KB article is "Microsoft *does not support* the use of
Microsoft Common Language Runtime (included with .NET Framework) for any COM
Callable Wrapper or Managed Extensions for C++ in either Microsoft SQL
Server 7.0 or Microsoft SQL Server 2000."
--
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
"Tibor Karaszi" <tibor_please.n...@hotmail.nomail.com> wrote in
message news:%23YqMAUI...@TK2MSFTNGP10.phx.gbl...