Security Permissions are mainly due to the code check
performed by the SQL Server 2005. There are certain code checks performed by
SQL Server 2005 when we build a managed stored procedure (or CLR integrated
stored procs/functions/or triggers). SQL Server performs checks on the managed
code assembly during two steps.
·
It checks at the Creation time (i.e. CREATE ASSEMBLY) when the
managed code is first registered in the database.
·
It also checks at runtime.
Create Assembly Checks
The following checks are performed when the CREATE ASSEMBLY
statement is run for each security level. If any check fails, CREATE ASSEMBLY
will fail with an error message. Global Checking for any mode:
·
The assembly should already register in the database.
·
The assembly is one of the supported assemblies.
·
All the referenced assemblies and their dependencies are
available in the given location <location>, which is given in the create
statement i.e. CREATE ASSEMBLY FROM <location>.