Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Replication (2012)
 Due to CLR Posting on Replication Server - Error
 Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

satyasaip
Starting Member

India
2 Posts

Posted - 05/04/2015 :  03:51:09  Show Profile  Reply with Quote
After doing the CLR Publishing on a local server which has replication, replication has error due to this:
ALTER DATABASE [DATABASENAME] SET TRUSTWORTHY ON

If it made OFF replication was working. But I want both to work simultaneously. Any help on this. please

Thanks in Advance



satya

TG
Flowing Fount of Yak Knowledge

USA
6065 Posts

Posted - 05/04/2015 :  13:34:13  Show Profile  Reply with Quote
Sounds like your CLR needs to access external resources like perhaps the file system? Best practice is NOT to have the database set to TRUSTWORTHY.

Assuming the CLR code needs to access external rescources the following steps bust be taken to satisfy security restrictions:
- The compiled assembly is "signed".
- The compiled assembly has the database permission level set to "External".
- An asymmetric key for the assembly has been created in the [master] database.
- A login from this key is created and to it “external access assembly” has been granted.

The assembly, certificate, and login provides the CLR routines access to resources outside sql server. The security context under which the code executes at runtime is the Sql Server service account. For instance if a call to CLR_FilesDelete specifies a folder path on the sql server machine then if the Sql Server service account is a local administrator the call will be successful. If the account is not a local admin then specific access writes must be granted to that account. If the folder path is on another machine then the Sql Server service account must be a domain account with access to that target.

Check out the topics under CLR Integration Security

Be One with the Optimizer
TG
Go to Top of Page
   Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000