Which db objects need to be re-created when the SQLCLR dll is modified?

  • I have SQLCLR assembly (EXTERNAL-ACCESS) that performs filesystem operations.

    To create the objects (sprocs, UDFs) generated from the assembly I do the following:

    (1) Create a new schema that will hold the SQLCLR objects

    (2) Create an asymmetric key from the assembly dll

    (3) Create a login from the asymmetric key

    (4) Grant EXTERNAL-ACCESS-ASSEMBLY permissions to the login

    (5) Create the assembly with permission set EXTERNAL ACCESS

    (6) Create the database objects: sprocs, UDFs

    My question is:

    If I modify the dll (modify the .NET code) and I want to redeploy it, which of the steps above need to be redone? Can some steps be skipped?

    Thanks!

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • (1) Create a new schema that will hold the SQLCLR objects

    (2) Create an asymmetric key from the assembly dll

    (3) Create a login from the asymmetric key

    (4) Grant EXTERNAL-ACCESS-ASSEMBLY permissions to the login

    (5) Create the assembly with permission set EXTERNAL ACCESS

    (6) Create the database objects: sprocs, UDFs

    You won't need to redo steps 1-4. You will need to drop all of the dependent objects from the database for the assembly, and then drop the assembly. Then you can recreate the assembly and then the dependent objects in the database.

    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[/url]

  • Jonathan Kehayias (6/27/2008)


    (1) Create a new schema that will hold the SQLCLR objects

    (2) Create an asymmetric key from the assembly dll

    (3) Create a login from the asymmetric key

    (4) Grant EXTERNAL-ACCESS-ASSEMBLY permissions to the login

    (5) Create the assembly with permission set EXTERNAL ACCESS

    (6) Create the database objects: sprocs, UDFs

    You won't need to redo steps 1-4. You will need to drop all of the dependent objects from the database for the assembly, and then drop the assembly. Then you can recreate the assembly and then the dependent objects in the database.

    Thank you! Much appreciated.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

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