-- step 2: import dll
ALTER DATABASE FlowingExampleWithTriggers SET TRUSTWORTHY ON;

IF EXISTS (
    SELECT [name] 
    FROM sys.assemblies 
    WHERE [name] = N'SqlServerDataladderIntegration')
 
    BEGIN
        DROP ASSEMBLY SqlServerDataladderIntegration
        ALTER ASSEMBLY SqlServerDataladderIntegration
        FROM 'D:\Delete\SqlServerDataladderIntegration.dll'		
        WITH PERMISSION_SET = UNSAFE ;
    END
ELSE
    BEGIN
        CREATE ASSEMBLY SqlServerDataladderIntegration
        FROM 'D:\Delete\SqlServerDataladderIntegration.dll'		
        WITH PERMISSION_SET = UNSAFE ;
    END