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

 All Forums
 SQL Server 2012 Forums
 Replication (2012)
 Due to CLR Posting on Replication Server - Error

Author  Topic 

satyasaip
Starting Member

2 Posts

Posted - 2015-05-04 : 03:51:09
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
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2015-05-04 : 13:34:13
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
   

- Advertisement -