Showing posts with label assembly. Show all posts
Showing posts with label assembly. Show all posts

Friday, March 23, 2012

Executing a Job in a C# SQL Server Assembly

I have a C# assembly I've created that I wish to run inside SQL Server. Since SQL Server doesn't support SMO inside of it, does anyone have any suggestions on how I might execute a SQL Server job in my assembly?

Thanks - Amos.


Using SMO in CLR:

http://sqlblogcasts.com/blogs/simons/archive/2007/03/14/Using-SMO-from-within-SQLCLR.aspx

Alternatively you can start the job using the sp_start_job procedure.


Jens K. Suessmeyer


http://www.sqlserver2005.de


sql

Friday, February 24, 2012

Execute permission cannot be acquired?

I have an assembly which uses file I/O to stream in some text based reports
into a container in a report. I have set the FileIOPermissionAttribute and
it works in the design environment but when I deploy the dll to the report
server it only works on that box. If I try to run it through the preview
window I get the following error: "Execute permission cannot be acquired"
Anybody help?Did you get this resolved? Assuming that the security policies are updated
correctly and you assert the FileIOPermission in the custom assembly, it
could be a file system permission issue. Basically, the executing user does
not have permissions to access the file. Check the NTFS permissions on the
file.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Brian" <Brian@.discussions.microsoft.com> wrote in message
news:3FA6A470-1E7D-421D-AF3E-226ADAC397D9@.microsoft.com...
> I have an assembly which uses file I/O to stream in some text based
reports
> into a container in a report. I have set the FileIOPermissionAttribute
and
> it works in the design environment but when I deploy the dll to the report
> server it only works on that box. If I try to run it through the preview
> window I get the following error: "Execute permission cannot be acquired"
> Anybody help?
>