views:

385

answers:

6

Is is possible to write MS SQL Server add-in? I'm thinking of some application integrated with database server available form SQL Server Enterprise Manager.

A: 

You can include a lot into MS SQL server 2005 and 2008 database. Including .Net code. But there is no real way to extend (create plugin for) the Management Studio. (Formerly Enterprise Manager.)

However there are database management addins for Visual Studio (especially in Team System). Maybe there you can implement what you need.

Tomas Tintera
A: 

Nothing directly that I know of. In SQL Server Management Studio (for 2005 and later) at least there's a pretty simple system for adding external tools to the menu. Enterprise Manager probably has something similar. So you could build an application that does whatever you want and add it to your menu.

The trick is deployment. There's almost certainly a way to add your app to the menu as part of an install package, but I haven't had to mess with it myself. Additionally, it sounds like what you really want to do is have the system deployed into the database itsefl, and have Enterprise Manager automatically detect it. I'm pretty sure you can't do that.

Joel Coehoorn
A: 

SQL Server Enterprise Manager is just an instance of Microsoft Management Console. If you look at the shorcut its command line is this:

C:\WINDOWS\system32\mmc.exe /32 "C:\WINDOWS\system32\SQLServerManager.msc"

You should be able to create a new Snap In that sits beside SQL Server in the tree hierachy.

Take a look at http://msdn.microsoft.com/en-us/library/ms692755(VS.85).aspx to see how this is done.

Martin Brown
+2  A: 

Have you looked into using extended stored procedures to provide add-in like functionality?

The only hang up would be to see it in the Enterprise Manager, but you can probably use Martin's post as a way to do that.

http://support.microsoft.com/kb/190987

Chris Roland
+1  A: 

You might consider researching extended stored procedures. They are a way to integrated C++ logic into SQLServer. It appears that they are being phased out in favor of CLR integration but there might be some really good ideas to be found is seeing what people have done with them.

The one thing that always scared me off of extended stored procedures is that if your code crashed the entire database goes down. They run in the SQL Server process and there is limited protection.

MSDN link: Database Engine Extended Stored Procedure Programming

John Dyer