CLR Assembly in MS SQL 2008
35 pts.
0
Q:
CLR Assembly in MS SQL 2008
I have a problem with COM-objects which i create in CLR-assembly in VB.NET via CreateObject.
When I compile this assembly as console project and run loging under any account on server, it works ok. But when i run this file from MS SQL, it can not create object. What may be reason for this?
ASKED: Aug 31 2009  7:29 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
35 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Last Answered: Aug 31 2009  7:29 PM GMT by Dalex   35 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

mrdenny   46795 pts.  |   Aug 31 2009  8:34PM GMT

It could be any number of things. Whats the error message you are getting?

 

Dalex   35 pts.  |   Sep 1 2009  5:07PM GMT

It just dont create Object without any messages. When i later trying to use object, I get standart .Net error - NullObjectReference.

 

mrdenny   46795 pts.  |   Sep 1 2009  7:00PM GMT

How are you trying to run the object? You can’t run a CLR object directly from T/SQL. You have to import the assembly, then create SQL CLR procedures or functions to call the sub or function from the assembly.

 

Dalex   35 pts.  |   Sep 1 2009  7:46PM GMT

I tried in 2 methos: 1-creating assembly and 2-executable via xm_cmdshell
Both of methods give me same error.

 

mrdenny   46795 pts.  |   Sep 2 2009  6:06PM GMT

And what would that error message be that it gives you?

 

Dalex   35 pts.  |   Sep 2 2009  8:16PM GMT

Activex object is not created. Guess it is related with NT service limitation

 

mrdenny   46795 pts.  |   Sep 3 2009  6:22PM GMT

Sounds like the account that the CLR assembly is running under doesn’t have the needed rights to create the ActiveX object. Why increasing the accounts rights.

 
0