SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL CLR assembly as a remotable object


SQL CLR assembly as a remotable object

Author
Message
Nabha
Nabha
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1889 Visits: 1815
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.

---------------------------------------------------------------------------------
Jonathan Kehayias
Jonathan Kehayias
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6443 Visits: 1818
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
Nabha
Nabha
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1889 Visits: 1815
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. :-)

---------------------------------------------------------------------------------
Elliott Whitlow
Elliott Whitlow
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23772 Visits: 5314
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search