Create Assembly

  • In other for a user or login to be able to create an assemly in SQL Server 2005, what role or permission does the login has to belong to, and have?

    This is the error I am getting

    When executing the TSQL statement

    create assembly ReportLib

    from '\\dvmx5996\Shares$\CLR_Assembly\AdminReport.dll' with PERMISSiON_SET=EXTERNAL_ACCESS from the laptop in SQL Management studio, we receive the following error msg.

    CREATE ASSEMBLY failed because it could not open the physical file "\\dvmx5996\Shares$\CLR_Assembly\AdminReport.dll": 5(Access is denied.).

  • From BOL (bolding added by me):

    Permissions

    Requires CREATE ASSEMBLY permission.

    If PERMISSION_SET = EXTERNAL_ACCESS is specified, the SQL Server login must have EXTERNAL ACCESS ASSEMBLY permission on the server. If PERMISSION_SET = UNSAFE is specified, membership in the sysadmin fixed server role is required.

    User must be the owner of any assemblies that are referenced by the assembly that are to be uploaded if the assemblies already exist in the database. To upload an assembly by using a file path, the current user must be a Windows authenticated login or a member of the sysadmin fixed server role. The Windows login of the user that executes CREATE ASSEMBLY must have read permission on the share and the files being loaded in the statement.

    For more information about assembly permission sets, see Designing Assemblies.

    I think your error means that the user executing the statement does not have rights on the location the assembly is located. See bolded section above.

  • Thank you very much.

    How do I set or grant EXTERNAL ACCESS ASSEMBLY permission on the SQL server?

  • GRANT EXTERNAL ACCESS ASSEMBLY TO

  • When I login using SQL Server authentication or Window authentication on the server where SQL Server 2005 is installed, I can create Assembly using the file on a share drive. However, if I login using window authentication on my laptop using the management studio to connect to the server, I received an error message.

    If I use SQL Server authentication on the laptop, no error.

    Msg 6501, Level 16, State 7, Line 1

    CREATE ASSEMBLY failed because it could not open the physical file "\\dvmx5996\Shares$\CLR_Assembly\AdminReport.dlL": 5(Access is denied.).

    My Window Id have every permission on the Share and the actual file. What do I need to do to solve this issue? Most user connect to the server using Management studio on their laptop.

  • I have exactly the same problem.

    Does anyone have any ideas?

  • In had the same problem to create an assembly on a remote server using an unc-path from my local SQL Management Studio (2008). I then used terminql services and started Management Studio on the remote server and executed the same code that included the same unc-path and it worked. Now I can use an sp to open a query session on each remote server to create assemblies and it works.


    Kindest Regards,

    Lennart Gerdvall
    payex.com

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply