views:

40

answers:

2

Can I delete the DLL-File C:\PATH\TO\DLL\FILE.DLL after creating an assembly with

CREATE ASSEMBLY MyAssemblyName FROM 'C:\PATH\TO\DLL\FILE.DLL'

?

Everything seems to work fine after deleting the file. But

SELECT * FROM sys.assembly_files

shows the path of the file in the name column. Can this cause problems? (or is the content of the DLL stored in the database)

+2  A: 

The assembly bits are transfered into the database, the original DLL location is irelevant. The idea is that an SQL loaded assembly should continue to work after a backup and restore on a different machine, it has to be entirely contained inside the database.

Remus Rusanu
+1  A: 

It's actually stored in sys.assembly_files so can be deleted

This means it's an integral part of the database through backuo/restore, attach/detach etc

gbn