Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
CLR Integration and Programming.
»
CLR Integration with Third Party DLL
14 posts, Page 1 of 2
1
2
»»
CLR Integration with Third Party DLL
Rate Topic
Display Mode
Topic Options
Author
Message
Satheesh Mohan
Satheesh Mohan
Posted Thursday, December 11, 2008 3:32 AM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, June 09, 2009 4:35 AM
Points: 7,
Visits: 22
Hi,
Help me to solve the issue.
I created wrapper class that used Microsoft Enterprise Library - Cryptography dll
and when i try to create assembly in sql server, it asks that supported assembly is not in the same location, then I copied cryptography library to the current bin folder and tried once again.
there was an error saying that 'system.management' assembly is not in the current database. [I have included it in my assembly]
at last there was an problem with 'system.runtime.serialization.formatter.soap' has nameCache as a static member, and that has to be in readonly
thanks in advance.
---
Satheesh Mohan
http://www.satheeshmohan.com
Post #617715
Jonathan Kehayias
Jonathan Kehayias
Posted Thursday, December 11, 2008 11:18 AM
SSCommitted
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
To even attempt to get it working, you would have to set trustworthy on, grant unsafe assembly to the database owner, and then try manually registering the DLL's as assemblies with UNSAFE access. Even then, certain CAS and HPA's can prevent SQL from loading the assemblies.
My question is why are you not using SQL Servers native encryption and decryption?
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 #618121
Satheesh Mohan
Satheesh Mohan
Posted Friday, December 12, 2008 7:40 AM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, June 09, 2009 4:35 AM
Points: 7,
Visits: 22
Thanks Jonathan
Issue has been solved.
Have a new issue.
In my assembly i have used Enterprise library - cryptography, that required app config.
when I run my function it throws an error that app configuration is not found.
I have copy my configuration to sqlservr.exe.config in \Binn folder under the root path of the SQL Instance(C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn) but still i have problem.
I already used enterprise library encryption to encrypt data that stored in my db. so not interested to use sql server native encryption.
Thanks in advance
---
Satheesh Mohan
http://www.satheeshmohan.com
Post #618603
RBarryYoung
RBarryYoung
Posted Friday, December 12, 2008 9:59 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
How was it solved?
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #618730
Jonathan Kehayias
Jonathan Kehayias
Posted Friday, December 12, 2008 10:09 AM
SSCommitted
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
Satheesh Mohan (12/12/2008)
Thanks Jonathan
Issue has been solved.
Have a new issue.
In my assembly i have used Enterprise library - cryptography, that required app config.
when I run my function it throws an error that app configuration is not found.
I have copy my configuration to sqlservr.exe.config in \Binn folder under the root path of the SQL Instance(C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn) but still i have problem.
I already used enterprise library encryption to encrypt data that stored in my db. so not interested to use sql server native encryption.
Thanks in advance
SQL Server is not like a standard .NET application. To add a .config file, or for changes in an existing one to be picked up, you have to restart the SQL Server Service. This is why it is often better to store the information in a configuration table, that the CLR assemblies can read from over using an app.config file.
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 #618742
Satheesh Mohan
Satheesh Mohan
Posted Sunday, December 14, 2008 6:12 PM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, June 09, 2009 4:35 AM
Points: 7,
Visits: 22
I solved this problem by
1. setting set trustworthy on and
2. signing my assembly a strong name (adding snk key).
---
Satheesh Mohan
http://www.satheeshmohan.com
Post #619361
Satheesh Mohan
Satheesh Mohan
Posted Sunday, December 14, 2008 6:34 PM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, June 09, 2009 4:35 AM
Points: 7,
Visits: 22
In which name I should have app.config file?(app.config or sqlservr.exe.config),
in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn path
or any other path?
---
Satheesh Mohan
http://www.satheeshmohan.com
Post #619363
Jonathan Kehayias
Jonathan Kehayias
Posted Sunday, December 14, 2008 6:38 PM
SSCommitted
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
It should be sqlservr.exe.config, and it should be under the \Binn folder for the root path of the SQL Instance.
http://www.sqlclr.net/Articles/tabid/54/articleType/ArticleView/articleId/33/Default.aspx
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 #619364
Satheesh Mohan
Satheesh Mohan
Posted Sunday, December 14, 2008 6:53 PM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, June 09, 2009 4:35 AM
Points: 7,
Visits: 22
My config setting is not picking up from that location even I restarted by sql server
what could be the problem?
---
Satheesh Mohan
http://www.satheeshmohan.com
Post #619367
Jonathan Kehayias
Jonathan Kehayias
Posted Sunday, December 14, 2008 6:56 PM
SSCommitted
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
Without seeing your code, I couldn't begin to say. Try creating the simple configuration file and function from the article I linked to above, and see if it will pull the demo setting.
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 #619368
« Prev Topic
|
Next Topic »
14 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.