Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL CLR assembly as a remotable object Expand / Collapse
Author
Message
Posted Wednesday, September 30, 2009 12:24 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 28, 2014 1:07 PM
Points: 579, Visits: 1,807
I searched for a while about this and could not get any lead. Please forgive if its already discussed. Thanks.

I am creating a dot net remoting application. I have created one SQL CLR stored procedure which is acting as a client (in remoting) and a windows service application as a remoting host.
Planning to expose one SQL CLR assembly as a remotable server object. Is it possible please?
I mean, when a client calls a method on server(remoting server) it has to be executed in sql server memory. Hence the plan for exposing sql server assembly as a remotable server.


Any help is appreciated and please let me know if you need some more information. Thanks.



---------------------------------------------------------------------------------
Post #795942
Posted Friday, October 2, 2009 2:27 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 3:10 PM
Points: 1,683, Visits: 1,797
Remoting is not allowed because it doesn't follow the restrictions published in the BOL:

CLR Integration Programming Model Restrictions


Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs
Post #797215
Posted Saturday, October 3, 2009 3:46 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 28, 2014 1:07 PM
Points: 579, Visits: 1,807
Thanks Jonathan.

Yeah it looks like I am not going to make it but I made some progress with that. I created a clr stored procedure which configures an assembly( this could be an assembly outside sqlserver) using one configuration file. Since the process which is hosting this assembly is sqlserver, it would load that assembly in sqlserver memory for execution.

I placed this configuration file in the binn folder with the name as sqlserver.exe.config file. Although this is working and its hosting my server and one of the port which I am configuring is listening to the requests. But when I make a request from client, it thorws an error saying 'could not load the assembly'. I was assuming that loading of assembly would follow the 'normal' rule and look for the assembly in binn folder only (sqlserver.exe being the host) but I dont think its looking for the assembly there. Would plumb futher to identify if there is any way out.

Thanks agian.


---------------------------------------------------------------------------------
Post #797374
Posted Monday, December 7, 2009 8:10 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, October 9, 2014 1:02 PM
Points: 6,032, Visits: 5,284
You can only access assemblies that are already added to SQL and a couple others, so basically you can't just reach out and access any DLL in the file system you want..

CEWII
Post #830379
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse