Is is possible to write MS SQL Server add-in? - sql-server

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.

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

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

I'm not sure if this is too late but here are some links that I've used to get started in writing SSMS plug-ins.
http://jcooney.net/archive/2007/11/26/55358.aspx
http://www.karpach.com/ViewArticle.aspx?ArticleFileName=SQL-Server-Managment-Studio-Object-Explorer-Search-Add-In.htm
http://sqlblogcasts.com/blogs/jonsayce/archive/2008/01/15/building-a-sql-server-management-studio-addin.aspx
http://aspalliance.com/1374_Extend_Functionality_in_SQL_Server_2005_Management_Studio_with_Addins.all
I hope this helps

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.

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.

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.

Related

Can't find Microsoft SQL Server even if it is installed?

Regarding the following images, I have obviously installed the Microsoft SQL Server, but I can't find the exe-file or anything named Microsoft SQL Server in the start menu.
Anyone who knows what to do to solve this, or do I need to install something more?
SQL Server runs as a service. You can start and stop it from windows services. SSMS is a gui tool for managing ddl (creating and altering tables and index's for example) and dml (writing queries to inquire, update or add data to databases).SSMS comes free with every edition of SQL server - perhaps you didn't tick a box when installing? You can also do this stuff the old fashioned way using sqlcmd from command line(DBAs love this for some reason) but for us mortals SSMS is much less of a struggle. As an aside there are other guis such as Toad (expensive) and Heidisql (free) amongst others which will do the job.
Looks like you have the engine. What you've got to do now is install SQL Server Management Studio: https://msdn.microsoft.com/hr-hr/library/mt238290.aspx
Looks like you have the various SQL Server components that are installed by Visual Studio (recent version) or SQL Server Data Tools (as used by VS).

Manage Azure SQL Databases

For some reason the SQL Management Tool doesnt work with Azure SQL Databases. This is nothing short of painful if you use the designers and diagrams to design your database.
I'm sure I'm not the only one who has stumbled at this point and would like to know what tool I can use to visual design and maintain the database.
SQL Server Management Studio supports Azure SQL DB. Step-by-step docs are here: http://azure.microsoft.com/en-us/documentation/articles/sql-database-manage-azure-ssms/
You will have problems if you have not configured firewall rules for your database to include your client IP range. What sort of errors are you experiencing?
The latest update to SSMS supports full design and edit with a few minor things missing.

Can Visual Studio replace MS Sql Server Manager?

I've been using Dreamweaver and MS SQL Server Management tool. I've recently got Visual Studio 12. I would like to only use Visual Studio.
When I right click on a table in the db I don't get the Script Table As options.
No, and it's not intended to. SSMS has a lot of functionality which Visual Studio's Server Explorer doesn't, and shouldn't, attempt to reproduce.
For certain use cases, you may only need the functionality exposed within Visual Studio. But I wouldn't want to be without SSMS and all of the tools it includes. Trying to limit your usage to only VS sounds like cutting off your nose to spite your face.
If you want to have a complete administration of your database I would recommend you to use MS SQL Server Management tool, because you can to do tasks like:
Administrator privileges
Security
Maintenance plans
(Only mentioning a couple of tasks. There are more.)
If you want to create a fast DB with the basic tasks with VStudio will be enough.
I will write a couple of links that you can visit, I hope this can help you more:
SQL Server- video tutorials
MsSQL - Tutorials

Best way to browse an mdf file from a local computer?

I'm working on an ASP.NET MVC site which will have a database. While I'm in this very early testing/concept phase I'm not hosting the database anywhere, just inside the local mdf file. What are some tools I can use to connect to the local test server so I can browse the tables and run test queries against the information in them without having to implement my own code/views? I'm interested in something like Sequel Pro for the Mac or phpmyadmin for linux (OS doesn't really matter since I'm working on a Mac developing inside a win 7 virtual machine).
Thanks!
(NOTE: I realize it is possible to get the table info dumped via Visual Studio, but it seems slow and not too useful... unless I'm missing a good way to use VS2010 the way I'd use one of the tools mentioned above?)
You can use SQL Server Management Studio Express to browse it, and do several other useful things as well, including table design and the like.
Consider using the built in tools right within Visual Studio. You'll need SQL Express installed, but you won't necessarily need Management Studio.
Go back to the Visual Studio installer (Repair or resintall features), and ensure that's selected as a feature.
Open Server Explorer, and create a new Data Connection.
Choose Microsoft SQL Server Database File
find your .mdf
Server Explorer then gives you a drill down of your Tables, Views, Stored Procedures, etc.

Can Visual Studio 2008 provide any of the functionality that Query Analyzer and Enterprise Manager provide?

I'm currently using MSSQL Server 2000 and to design tables, create and alter stored procedures as well as manage users and permissions I'm using Query Analyzer and Enterprise Manager. I also spend an awful lot of time in Visual Studio 2008 and rather jump out to other applications I was wondering if Visual Studio could help me do at least some of the things that Query Analyzer and Enterprise Manager let me do. And if so, what specifically?
Mainly I'm looking to:
Check the database schema
Edit stored procedures (with Intellisense available)
Change object permissions
Look at the Server Explorer in Visual Studio. Server Explorer allows you to create/modify/drop/whatever procedures, tables, views, etc, though I can't see any way to modify security settings (users, roles, etc) through the UI. I recommend SQL Management Studio before using the integrated Server Explorer.
I've also just noticed a feature in the context menu for a data connection in Server Explorer called "allow sql/clr debugging." Haven't tried that but sounds like it may allow breakpoints, etc in SQL code. How cool would that be?
Edit: It seems that the Server Explorer may only be available in Pro or better versions of Visual Studio - ie, not in Express editions. Yet another reason to get the full version.
Can you install SQL Server Management Studio? This is far more useful than VS, I think.
I don't like the VS interface and it's not good for query plans, results and tuning. However, some folk I work with appear happy with VS but mostly the c# guys. The SQL heads use SQL tools.

Resources