Developing Managed Code and Executing Within Microsoft SQL Server 2000 - How to deploy the .NET component
(Page 3 of 5 )
In the previous section, you finished developing the component. Now you need to register the COM component and also deploy it into GAC cache. Proceed with the following steps to do this:
- If you didn’t open your Visual Studio command prompt, do it by going to Start -> Programs -> Microsoft Visual Studio.NET 2003 -> Visual Studio.NET tools -> Visual Studio.NET 2003 Command Prompt.
- Go to the “bin” folder of your project folder (which is “MySample”), using the command prompt.
- Type the following command to register the assembly as COM component
Regasm /tlb:MySample MySample.dll
- After receiving a successful message, again type the following command to get the component registered within GAC cache.
gacutil /I MySample.dll
The screen should look something like the following (Fig1):

That completes your deployment.
In case you want to unregister the component (say you may want to modify the code after successful registration), you can use the following commands (separately) to do the same (from the same bin folder):
gacutil /u MySample
regasm /unregister MySample.dll
Next: How to call .NET component from within SQL Server 2000 >>
More MS SQL Server Articles
More By Jagadish Chaterjee