August 28, 2007 at 2:51 pm
I have a Sql Server 2005 Database that has it's compatibility set to 2000. I'm trying to create a stored procedure that references a vb.net assembly. I've gotten to the point where I'm creating my stored procedure and trying to have it include the code:
External Name ....
where I reference the assembly ( which was created successfully )
I'm getting the message:
'Incorrect syntax near 'external'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the stored procedure sp_dbcmptlevel.'
If I can't change the compatibility level to 2005 am I out of luck?
Any help would be appreciated,
Aaron
August 28, 2007 at 2:59 pm
Yes, you are out of luck. CLR is a new feature in 2005, it was not in 2000.
But why can't you change compatibility level ? Security issues? You want to preserve some 2000-specific features ?
August 28, 2007 at 3:04 pm
I'm going to need to find out. It's another development companies database design and applications that I'm having to do some work in. They have compatibility set to 2000. I'll have to find out what can be done to change this.
I'm not sure if anybody here can answer this, but this is what I'm trying to do:
Call a webservice that expects some xml. I want to do this from SQL Server. I'm not at all experienced with Visual Studio( I had developed this process in Powerbuilder, but all our applications are being replaced by this other development companies stuff ) so I'm not even sure what kind of process to create in VS to get the right kind of dll for CLR.
Is what I want to do possible?
Can someone point me in the right direction?
Thank you!
Aaron
August 28, 2007 at 3:19 pm
You want to run a .exe or .dll on a web-server, and want to initiate this call from within SQL Server ? If that is correct, you can do it even with compatibility level 8.0 (2000).
1. Do you need to execute .exe or .dll ?
2. In case of latter can you create a exe shell around it ?
3. Test it by calling exe from DOS command line.
4. In case of success you can use xp_cmdshell extended procedure from within master database. This is unreliable and unsecure method, CLR is actually much better to use. However if you can't switch to 2005 this is the only way I can see so far.
BTW, do you need to send XML document along the way ?
August 28, 2007 at 3:24 pm
We have a webserver that has a webservice. I need to call this webservice ( it requires some xml to be sent to it ). As for the question of .exe or .dll, i'm not sure, I just know that to use CLR in 2005 I needed to use Visual Studios to create a .dll.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply