on 03-30-2011 4:50 PM
Hi all,
I would like to do a RFC-call using the .NET-connector 3.0 from a SQLServer stored procedure.
I created a program to do the call in C# and this is working. Then I started to "convert" this to a project to create a dll containing a stored procedure to be used in SQLServer. Without references to sapnco and sapnco_utils it is working. But when I add the references, build the project and try to create the assembly in SQLServer I get the following error:
Msg 6544, Level 16, State 1, Line 2
CREATE ASSEMBLY for assembly 'FS SAPCalls' failed because assembly 'sapnco_utils' is malformed or not a pure .NET assembly.
Unverifiable PE Header/native stub.
When I leave out the reference to sapnco_utils in the .NET-project, I get the same error.
Is there any way to get this working?
Regards,
Maurice.
Hi,
Did you get any solution to your problem? As I'm also facing a similar kind of issue where it's not allowing me to deploy the SAPNCO.DLL and SAPNCO_UTILS.DLL into the SQL server. I did even try to create a Dot Net Dll which incorporates the SAP DLLs and then I deployed the Dot Net DLL into Sql Server. But no success. It saying me below error:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Create failed for SqlAssembly 'SAPConnectorDLL'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.3000.0+((SQL11_PCU_Main).1...
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Assembly 'sapnco, version=3.0.0.42, culture=neutral, publickeytoken=50436dca5c7f7d23.' was not found in the SQL catalog. (Microsoft SQL Server, Error: 6503)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3128&EvtSrc=MSSQLServ...
------------------------------
BUTTONS:
OK
------------------------------
Any help is appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
Im having the same problem.
Someone have solved it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried GACing sapnco and sapnco_utils ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alan,
I dragged the sapnco.dll and sapnco_utils.dll into the c:\windows\assembly folder, without problems.
Is this what you mean by GACing the dll's?
However I still get the same error with the CREATE ASSEMBLY for my 'FS SAPCalls.dll'.
I also tried the following commands to load the sapnco and sapnco_utils into the SQLServer CLR:
CREATE ASSEMBLY sapnco
FROM 'C:\FS Application\FS SAPCalls\sapnco.dll'
WITH PERMISSION_SET = UNSAFE
GO
This fails with the same error as with loading my "FS SAPCalls.dll"
Next I tried:
CREATE ASSEMBLY sapnco_utils
FROM 'C:\FS Application\FS SAPCalls\sapnco_utils.dll'
WITH PERMISSION_SET = UNSAFE
GO
This fails with the following error:
Msg 6218, Level 16, State 3, Line 2
CREATE ASSEMBLY for assembly 'sapnco_utils' failed because assembly 'sapnco_utils' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message
Any help will be appreciated.
Regards,
Maurice.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.