简体   繁体   中英

Deploy a CLR Trigger/Stored Procedure using WiX

As the founder's of stackoverflow talk so much about being able to deploy changes easy, I'm trying to come up with a solution to solve my issue. A quick background is that a client contacted me and needed something done on the database that is quite not so trivial, but isn't horribly difficult to do (took me about a day to get the procedure to work). Unfortunately, the client needs to be able to deploy this "fix" about 20 times, and without my input, as he isn't going to pay for it.

I have written a CLR trigger that does some work that would otherwise be very difficult using TSQL (xml document transformations.. I'm better at it using CLR vs. TSQL). Deployment is typically a few lines SQL and dumping the dll to a directory from what I can fish out (I've only ever deployed from VS.Net so far).

What I need to be able to do is to provide an MSI installer that will drop the file to a folder, and prompt the user for the database information that is required to connect the CLR procedure to the correct database/table.

Has anyone done this in the past, and if so, are you willing to school someone on how this is done, so I can get this project to bed?

Thanks

If you want to avoid the trickiness of placing the file, you can use the alternate form of the CREATE ASSEMBLY statement that specifies the assembly in byte form. eg

CREATE ASSEMBY MyAssembly FROM 0xFFFF....;

Obviously, you would have the actual assembly bytes where I've put 0xFFFF.... .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM