.NET coding setup with needed to install SQL Server ? (VS2010 + Linqpad) - sql-server

I was thinking of the minimum software I can install on my new dev machine. Has anyone tried codeing with just VS2010/Linqpad?
The SQL Server is on another machine so then I would only need SSMS.. but then I think linqpad could replace that + help me with Linq queries..
But the problem seems to be I won't be able to CREATE SQL USERS with SSMS and I may need to do thatfrom time to time..
Any thoughts ?

Personally I'd always install SQL Management Studio as it's the defacto tool for managing SQL Server.
AFAIK you can't issue arbitary SQL commands using VS2010 and thus you can't create users - that is unless you use VS2010 to write an app to issue the commands which is trivial but I'd say ultimately pointless.

LINQPad lets you run SQL queries as well as LINQ queries - so you can manage without SSMS if you're happy to do things purely via SQL.
Of course, for some things SSMS is easier than writing SQL. And on a dev box you'll probably want SQL Profiler, too (for this reason, it's a good idea to install the management tools that come with the full edition of SQL Server rather than relying on the SQL Express tools).

I would install SQL Server client tools - you would at least then get SSMS and SQLCMD. No need for SQL Server itself (or even SSIS - you can still use BIDS to write packages, but you have to run them interactively).

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).

Doing clean install of SQL Server Express

I installed VS 2008, VS 2012 and the community version 2013 along with the matching SQL Servers but never needed the SQL Servers and never checked if they were properly installed.
I recently picked up SQL Server Management Studio and tried to connect to a server.
Unfortunately, it does not detect any local server, even though I have about twenty different entries in programs & apps for SQL Server related stuff including SQL Server 2012 and 2014 Express Localdb, an installation of SQL Server 2008, data-tier app frameworks, native clients, transact SQL, a couple "compact" versions, tools and what's not.
One would think that something in this mess would be recognized as a server, but apparently not so. I had an entry for SQL Server in the start menu with a nice GUI with an install DB option... that requested a server media folder (lord knows which). I tried starting manually one of the many SQL Servers (sqlservr.exe) from the program files folders to no avail (I get a message about a corrupt installation)
My DB experience is pretty much exclusively with MySQL and I am lost with all these applications that look like they should do something but don't.
I would like to have a bare bones installation that works for the following use:
Coding Winform apps with local databases (compatible with Entity Framework)
Allows to distribute the apps with local databases for free (commercial use, small data volume)
Running SQL queries from SQL Server Management Studio
What is the minimum I need for this purpose?
Should I uninstall all the existing SQL Server related programs and make a clean install from a single install file (for instance, would installing the 1.1gb SQL Server 2014 Management Studio Express 64 Bit.exe give me all I need)?
Or if not, is there any way to install a recent version and ignore the underlying mess? (I don't really care for the disk space, I just want this thing to work).
I apologize if this question is a mess but I am pretty confused with this, and I could really use a hand figuring out what's what.

SQL Server parser for Azure

We have migrated our production environment to Azure (using SQL Azure instead of SQL Server)
Our local development environment uses SQL Server. We write change scripts when database changes need to occur during a release.
PROBLEM
The issue now is that some T-SQL commands/statements/keywords don't work when run on SQL Azure. This is constantly disrupting our release process.
Educating everyone to use a subset of T-SQL is happening, but these problems continue to crop up.
Is it not possible for us to parse our SQL scripts as 'Azure SQL compatible' in SQL Server using the parser before running them:
Thanks
If you use the new "SQL Server Database Project", there is a feature in Visual Studio that allows you to select the "Target Platform" to SQL Azure. This will allow you to build all your t-sql scripts and check them for SQL Azure compatibility. Any compatibility errors will throw errors and it can create a bacdac/dacpac/t-sql script that is compatible with SQL Azure.
In order to take advantage of this, you have to manage your code using the "SQL Server Database Project" projects in Visual Studio.
You are not going to like this answer .. but the best bet is to move your development environment to SQL Azure. We started in the same process but you will just have the constant battle. We used Redgates SQL Compare tools but I don't believe they will solve your problems, but maybe worth a shot as they are constantly getting better.
Even if you have multiple devs and they each need a SQL Database I would still recommend getting everyone to signed up with Azure and pay the cost under it. Thankfully the database are not that expensive to run, and you might get under the free tier structure. It is still cheaper for us to run the cost of the SQL Azure Dev boxes than it is to have the pain and waste of time at release.

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

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.

Should I install SQL Server 2008 on my DEV machine?

I'm wondering if I'll have trouble installing SQL Server 2008 on my development machine whilst our production server is 2005? E.g. is something change so that my 2005 databases/sps/functions/views will not work correctly or other issues I should think about?
Would like to do this just to test drive the new SQL Server but still be able to develop the old product and preferring not to install both...
I am using only SQL server 2008 on my dev machine against production SQL server 2005 systems, and have not encountered any problem yet.
Personally I wouldn't. I prefer to keep my dev machine as close to a replica of the live environment as possible (in terms of software at least; physical separation is somewhat harder!).
In many ways the two versions are very similar, and SQL Server 2008 does support compatibility modes, but no matter what you do it isn't actually SQL Server 2005. If your production server isn't using 2008 then you can't take advantage of its capabilities anyway so all you're doing is increasing the chance of something working not quite the same without gaining any benefit.
Presumably the reason you want to do this is to play around with 2008 and see what its new capabilities are? In this case I'd recommend building a virtual machine with SQL Server 2008 and then you can play around as much as you like without jeopardizing the environment you need to get on with your normal work.
Just be aware that some tools may not connect to SQL2008 properly just yet.
Example is VS-DBPro2008. You can't use most of the useful features without installing the GDR-RC, which is still flakey.
Also, if you build something on 2008, you won't be able to detach/attach or backup/restore from the 2008 -> 2005.
I've done this without too much trouble. When you create a database, you can choose a compatibility mode such as 2005, or 2000.
You may also find this helpful: Breaking Changes to Database Engine Features in SQL Server 2008
http://msdn.microsoft.com/en-us/library/ms143179.aspx
Yes. We do exactly this even though our production systems are 2005, and have run into very few issues. While there are some compatibility issues you'll want to know about there are also a few benefits:
Sql Management Studio is based off VS 2008 so if you are using VS 2008 you don't get VS 2005 installed
Sql Management Studio is faster and supports some nice new features such as intellisense
Our build machines have Sql 2005 which runs all our unit and integration tests. Our development and production test virtual machines that mimic our production systems also run Sql 2005. This way we ensure our SQL and DDL are compatible with production.
There is no way you can have a development environment that duplicates your production environment. We just install too much stuff on our machines to do our jobs or for downtime.

Resources