REM This file installs the CLR demo files for the article "How to Share REM Data Between Stored Procedures" in the selected server and database. REM NOTE! This file is only for SQL 2008 and later. REM If you don't have a Visual Studio installed, uncomment this line: REM PATH=%PATH%;C:\Windows\Microsoft.NET\Framework\v2.0.50727 ECHO OFF SET SERVER=. SET DATABASE=tempdb REM Variable for SQLCMD. Add -U -P for SQL authentication if needed. SET SQLCMD=SQLCMD -S %SERVER% -d %DATABASE% -I REM First generate a key for the assemblies. Comment out this line, if you REM don't have Visual Studio to use the key in the download. SN -k keypair.snk REM Then build the DLL. csc /target:library /keyfile:keypair.snk helpdb.cs csc /target:library /keyfile:keypair.snk ExecAndInsert.cs REM Load the SQL files. %SQLCMD% -i load_clr_demo.sql -v CD="%CD%"