Using SQL Server for practise on Cloud - sql-server

Is anyone offering SQL Server for free on cloud for learning purposes? I need it for running simple queries that we come across while learning SQL concepts online. If available I can run the queries in my mobile or tab

If you are looking for online sql , I would like to suggest you
http://sqlfiddle.com for practice purpose.It support MySQL, Oracle, MS SqlServer, Postgre, SQLlite (create your account and save your work)
http://www.w3schools.com/sql/default.asp is another great option to
run queries while learning it.

Another +1 to w3schools. They have various demo databases that you can both query AS WELL AS modify. You can restore the original database with the click of a button which is great if you are learning. I have put a screenshot of an example that I just did so you can see what it looks like.
Also, because this is web based and all of the queries are handled on the server side, you can use this from any device with internet access, including iPad/Phone whatever.
http://i.stack.imgur.com/1cxUp.png
SQLFiddle is another great option, especially because you can select specifically which language you are using (MySQL, Oracle, MSSQL, etc) but it is a bit more advanced if you are just starting out because you will have to create a database/schema and insert data instead of simply manipulating existing data like you can with w3schools.

Related

Automated SQL Server slow query report?

I am a developer and performance tester but not a DBA. My team is working on a performance testing tool that is specific to our software. One of the features we want it to have is the ability to generate a database report immediately after the test. Our software is database agnostic. For Oracle, I can easily create a snapshot id before and after the test and programmatically create an AWR report for those snapshots, write to a file and save with other artifacts we gather. Works great.
For SQL Server, however, there is no AWR equivalent (that I know of). I know the MDW as part of the SSMS has a UI for getting things like top 10 slow SQL and things like that. But, I have not yet found a way to programmatically create and extract a SQL performance report (preferably similar to Oracle's AWR) for SQL Server.
I am even willing to create the report myself if I can find a way to extract the raw data.
Any ideas would be greatly appreciated because searching online is not getting me anywhere.
P.S. I'm trying to do this in Java, by the way, but will accept help in any language. Thanks again!
Good news! In SQL Server 2016, you can use Query Store. This is like your flight recorder blackbox.. finding long running queries and waits. Capture baseline built in to SQL Server. You can compare before and after hardware changes and/or upgrades on queries. Maybe this similar to Oracle AWR.
Only available SQL Server 2016 and up.

FluentNHibernate SQL Server 2005/2008 Setup Tutorial

Does anybody know of any good tutorials that show how to configure FluentNhibernate for SQL Server 2005/2008. The ones I have found usually just use SQLite, but I would like to see one that specifically targets SQL Server 2005/2008.
I really liked the sample tutorial on the FluentNhibernate website (http://wiki.fluentnhibernate.org/Getting_started#Your_first_project), but it looks like most tutorials I have found seem to only deal with SQLite. It would be great to see a working tutorial that deals with the more common databases in real world applications like SQL Server 2005/2008, MySQL, etc
Thanks!
Tutorials use SQLite not because it's "quick & dirty" but because it's embedded, small, and free. Anyone can download System.Data.SQLite and start working in about 60 seconds, and later switch (or not) to another database with minimum impact. That's one of the major benefits of using an ORM.
Just in case, I want to clarify that SQLite is not a toy database, for many applications it's enough and even necessary since the characteristics I mentioned above aren't too common for a relational databse.
In the case of fluent-nhibernate, the only difference is that instead of:
Fluently.Configure()
.Database(
SQLiteConfiguration.Standard
.UsingFile("firstProject.db"))...
you'll have:
Fluently.Configure()
.Database(
MsSqlConfiguration.MsSql2005
.ConnectionString("a raw string"))...
Each database engine config has its own specific optional settings.
More information about configuring different databases in the fluent-nhibernate wiki.

SQL Server Building Software

What are the option in terms of applications that help build SQL statements against a SQL Server database?
We have some users that need to build SQL statements, preferably through drag and dropping or linking up tables etc.., against a SQL Server databse who don't have any experience in this area.
Any Ideas?
Visual Studio 2008 / 2010 have this featue and works well. I mean LINQ to SQL or Entity Framework, but in bigger projects I dont prefer Entity Framework.
The Sql Query editor in sql server 2005 and above is very good for that sort of operation. I found that the combination of drag and drop columns with the sql instructions below helps non-sql developers learn a little about sql and tends to wean them off of the editor.
I actually just ran into this problem in my own project.
One option is to purchase a tool that does precisely what you're looking for. If you do something like that, you're more likely to get something that's full-featured, well-supported, and has a lot of nice bells and whistles to make your job easier.
However, as both Svisstack and george9170 pointed out, there are already tools within the Visual Studio development environment. Here is how I'm proceeding:
I use Microsoft SQL Server Management Studio's Diagram editor to perform the dragging and dropping of tables. This works fairly well, although it's a bit more cumbersome to work with than some of the tools I investigated. (For the record, the reason I didn't use the tools I investigated was the cost.)
Once I develop the tables in the diagram, I tell MSSMS to generate the tables.
I then use the Database Publisher (it comes with VS2008 and VS2010) and I connect with the database. Using LINQ to SQL, I let the magic work behind the scenes so that I can utilize the various objects which will interact with the database.
If I'm not explaining this well, check out the two links below. It should make things more clear.
Using Database Projects for Visual Studio
NerdDinner - An ASP.NET MVC tutorial, but with good information on LINQ to SQL.
By using LINQ to SQL (as described in the second link), your users should be able to build queries against the database fairly easily. It's not drag and drop, but it's very simple and straightforward.
First, I hope they are not doing their queries against a production database!
For regular non developers, try using excel, for these reasons:
1) most generic users might have it on their PC already.
2) drag and link tables. There is a little GUI for simple drag and link tables in there.
3) Support. When they get into trouble, they can e-mail me the file and I can see what they have so far. I'll end up writing views or procedures for them to use.
4) They can use the results data using familiar excel interface and functions, which helps since their SQL ability is so limited.
For developers these GUI tools are extremely limited in what you can do with your queries. I've never found one that can do UNIONs, derived tables, or CTEs. I'm not sure if any can even do OUTER JOINs. For simple tasks, they might be ok, but to switch back and forth all day would be a pain, so I just type them up.
You can use Access databases as well. They let you form your own queries by dragging and dropping in Access 2010. However, if you are looking for easy to access data without the worries of SQL syntax, you might want to look at using Ruby ActionViews. If you are talking about live editing of the entire database if the database is of any importance (you can easily delete or clear an entire database on accident), I would do it in pure SQL, or better yet, not do this at all. If you are using MySQL, you should look at the possibility of using phpmyadmin for maintaining your database. It is a web based tool that makes database administration easy and can help you form your queries.

What is The Best Local DataBase Managment Software?

I Want Implement a Software by C#.net.I want Use a DataBase Manager Software like Access or SqlLite or etc.My Program Saved Many Data in Local Machine.
I Do Not Want Publish or Move Data to Other Pcs
What DataBase Manager Software Must be Choose?
Not Different DataBase is Free or have a price.
what is the Best DataBase Manager Software to Save many Data in Local Machine?
For sure you are looking for a free database so for that you can use many databases like mysql ,postgresql , and sql server msde or access
but we still have other scenario, if you are going to distribute this application to other pcs so you have to think about deployment and in this case you can eliminate the mysql , postgresql because they depend on servers but msde (it's also server ) is much easier and you can found alot of tutorials how to deploy it with your project
It depends on how much you are expert in database and for what reason you are using it? are you going to need complex queries or it just a storage place for the data ?
if it's complex query i will go for msde for sql server if it's only for saving information may be i will go for access or even xml
Well if you are developing in C# consider using the MSSql Compact Edition. This allows you to create a local database and use it much like SqlLight. However, the support is much better, especially when you using Visual Studio. There you can find it as LocalDatabase under Data when you adding a new item. (Not 100% sure whether it is present on all versions of VS though).
Firefox has an SQLite Manager add-on.
I think the best choice depends on your needs, for example if you must synchronize data with sql server for me the best choise was sql express.
I would vote for SQL Express. You get essentially a scaled down SQL Server that is capable of working with quite a bit of data. SQL Express plays well with Visual Studio and you will be able to take advantage of the System.Data.SqlClient and related namespaces which come with the .NET framework out of the box. They are also better than the Odbc namespaces. Finally, there is a LOT of online support for SQL Express and, as far as I know, SQL Express's flavor of SQL (T-SQL) is the same as that of SQL Server. So should you one day need the flexibility of running with either or (local database, or server database) you will have it. Also, SQL Express is fairly commonly used in the microsoft world so you should be able to find lots of examples, if need by.
TurboDB for .NET from dataweb is a good solution, if you want a powerful engine with stored procedures and professional support from the manufacturer:
http://www.dataweb.de/en/products/dotnet_database.html

Browsing SQL Server

Are there any tools for just browsing SQL Server? I ask because sometimes SSMS is a little heavy weight when I just want to look through the database and find one record, and SQLCMD doesn't really seem like a good choice when browsing through a lot of different records or a lot of large records.
Yes, QueryExpress is a great, lightweight tool (which also can be used from a USB stick) for browsing and querying SQL Server databases.
I'm using and I really like LINQPad
You could try following heterogenous sql clients
Heidi
It's light weight it can manage both MySql as well as Sql server
Click here to know more.
SqlDbx
SqlDbx is a fast and easy to use database SQL development IDE for database administrators, application and database developers working in heterogeneous database environments.
It can manage MySql,SqlServer,Oracle,Sybase,Microsoft azure and IBM DB2.
Click here to know more.

Resources