SQL Server 2005 DBA Learning Resource - sql

So I have some experience with Microsoft Access, building database apps for people, vba, etc for different folks at work....different divisions. And I have actually learned a lot in that realm...however,
now the need for SQL Server has arrived, and I have never really ventured into that realm...so let the questions begin:
how vastly different is what i am about to get myself into?
i know that experience is the best teacher, but i actually learned a lot through books when it came to access, vba, sql, etc....so can anyone suggest materials/resources for learning like this??
seems as though I am going to have to learn to be the dba....so i gotta get crackin on the learning so i appreciate any and all help A LOT!! thanks!

Microsoft e-learning provides a few free courses and a free ebook targeting SQL Server 2008 here (not sure why you are targeting SQL Server 2005).
Of interest: SQL Server 2005 Learning Resources
Database design skills to some extent transcend the RDBMS; a big difference when moving from Access is the use of stored procedures and the T-SQL constructs available to you.
The Microsoft Press books are excellent.
SQL Server 2005 Books Online contains almost everything you need to know, but the structure is quite daunting at first.
One thing that is really worth learning is how to use is SQL Server Profiler, not just for profiling performance problems, but also for seeing what is happening behind the scenes.

Related

Migrating a database from MS SQL to MySql - How time consuming / difficult is it?

A client wants a database converting from MS SQL to MySql.
Personally I wouldn't do this, I prefer MS SQL for larger databases and like the tools available when working with MSSQL.
However I do use MySql on smaller projects. I've never moved a database from one to the other, or made much use of sprocs when using mysql.
Is there a lot of work involved in rewriting the sprocs, considering I have no prior knowledge of the ms sql database itself, so will need to first gain an understanding of what each sproc does.
This isn't a discussion on which to use as that's already been decided by the client for a few reasons.
have you seen this?
I haven't done this before, but I can only assure you mysql is good for big projects, too.

getting started with microsoft sql products

yesterday i went for an interview to be a sql / .net developer. my experience with sql is limited to basic pl/sql with oracle. they drilled me "do you know ssrs, do you know tsql, etc" well i kept saying no because i havent worked with them.
question: what do i have to learn in order to be able to work with microsoft sql? is it really that much different than oracle?
Grab a copy of SQL Server Express (see here) and start playing with it. There are sample databases that you can download to get you started.
SQL is the same, as it's a standard. T-SQL is an add on that has some flavors that are helpful to know. The way you setup procedures, functions, etc. is also different than PL-SQL, so that would be good to read up on. Outside the SQL Server engine and the various built-in tools, there are a lot of other MS products:
SSRS - SQL Server Reporting Services features a reporting engine, which are developed in Visual Studio.
SSIS - SQL Server Integration Services is a data import/export, etc. process, it's very handy to use for data import/export and other batch processing
SSAS - Analysis Services for OLAP
And so on. I don' tknow that SSAS helps you in this regard, but SSRS is pretty big so as a developer, reporting is a key feature and that would be handy to know something about. SSIS is good to know a little bit about, but might not be that handy, depending on what the org's needs are.
HTH.
SQL is pretty much SQL. There are some engine-specific differences but for most apps they're not significant. The management tools are obviously different. The OOB tools are vastly different.
SSRS is a reporting package (think Crystal reports on double steroids and you'd be close) not a DB engine. That should be listed as a separate job requirement.
I'd say get an MSDN license OR the free trial for SQL Server and install them all and try them out. Bookstore is a fairly generic app that you can extend forever and tryout new things.
Just keep in mind that someone hiring you is still going to want actual app experience, not your trials. If you can't get it at work, volunteer at an organization.
A good place to start is reading the MSDN SQL Server resource page. You'll find good information there about the whole MS SQL Ecosystem.
Then get a trial license, a virtual machine and start playing around.
It's kinda limited to their knowledge, as if you know basic ANSI sql then you can get almost all the basics running on SQL Server as they have a common base. As for SSRS, that is specific and will require reading and playing with it to learn. The SQL2008 Express with Advanced services should help you out.
With .net developer interviews I've been to they expect you to know the basics at minimum and be able to do joins and stuff in sql. Learning how to do temp tables and stored procedures as well as updates/selects/deletes and stuff should get you a bit further.
Potentially if they want that kinda experience either they are aiming the roll too low, or you've managed to slip through the net for a higher level role (which is sometimes a good thing) :-)

Good reference site for SQL/RDBMS

One of the aspects of computer science/practical software engineering I am weaker at is actually doing significant work in database systems. That is to say, I can do simple queries on smaller datasets, no problem. However, working with complex queries on large datasets invokes a level of understanding of databases beyond me right now. For example, I built an amusing query some time ago that computed a join using a n^2 size where n=20,000- the hosting server suspended my account for blowing the CPU. Shocking.
I am interested in bringing myself up to speed on how to design schema and queries that, well, don't bring down the server. Pursuant to that end, what materials do you recommend that discuss professional database/SQL design and writing?
I would go to the bookstore and pick out some books on performance tuning for the database of your choice (it is very differnet depending onteh database backend). This will help you understand what not to do which is critical to designing databases.
Here's a site with a lot of good info
http://wiki.lessthandot.com/index.php/Category:Data_Management
For generic SQL I would go for Celko's books. For vendor specific, it depends on the platform of your choice. I know the SQL Server platform well and for that my praise go to the Inside series.
Blogs are also usefull, look at the all time SQL tag right here on SO and check the top answerers info, some have personal blogs that are very usefull. Eg. go through Quassnoi's blog, it has a LOT of useful info on MySQL, Oracle, SQL Server.

MySQL versus SQL Server Express

Did the recent purchase of MySQL by Sun and the subsequent buggy releases kill the MySQL brand?
I whole heartedly embraced MySQL when it first came out as I used to be a poor developer and all the RDBMs were too expensive. I have fond feelings for MySQL and their being able to compete with Oracle and SQL Server. I credit the original MySQL team for the existence SQL Server Express. I now use SQL Server Express instead of MySQL for just about everything. First, I do not like Sun and second, SQL Server Express is significantly more robust and 'Enterprise' than MySQL.
The only significant limitations on SQL Server Express are the 4GB db size and the lack of Agent. I find that the size limit is not a concern because by the time the db gets close to that size, the application should either be profitable (and you buy the license), or you should kill the product. The Agent issue is a nice to have, but not critical as you can work around it.
It seems that for db simpletons like me, SQL Server Express is easier to setup and use and is faster and more stable. And for gurus, they will use PostgresSQL...
Resolved:
So basically, we have a bunch of SQL Server fans (albeit open-minded) on stackoverflow. It looks like I'm in the right place. It's sad to see MySQL transform from something you cheer to something you pity. I hope the founders of the original company try a new endeavor. I absolutely do not judge them for selling to SUNW - work is naturally profit driven. I hope we get some people with FU money who don't care about profits who create some products like MySQL used to be. Othewise, MSFT might take away EXPRESS.
Having worked with both, I have to say that the limitations and/or bugs in MySQL were a big turn off for me... I don't like PHP, and while I respect the open source community for their advances with these two technologies I just can't see the elegance in the way either of them have been put together. But don't let my personal taste sway your judgement against MySQL.
I do all of my prototyping in SQL Server Express and most of my clients use full blown SQL Server 2005. The ease of transition from one to the other makes it a no brainer for me - I can take anything I wrote for SQL Server Express and put it straight in without worrying that the syntax might be different. The two limitations don't even really get in the way in a dev environment - it's only when you come to production that they would tend to be a problem.
For me, SQL Server wins the argument hands down.
So far no-one knows what Oracle is going to do to MySQL, not even Oracle.
I've done extensive testing of MySQL and would say that in terms of performance it is about at SQL Server 7.0 level. That is fine if all you need is the performance of SQL Server 7.0
At the enterprise level is simply doesn't compete. If you look at the fanfare surrounding MySQL 5.4 it says "now supports more than 4 processors".
Where MySQL scores highly is that it is so cheap that it makes a scale-out design feasible, in which case the raw power of an individual box simply doesn't matter.
There are quite a few ommissions in MySQL that will trap a SQL Server developer. No CHECK constraints, no index views, no separation of clustered indexes from primary keys. That said, it has a large number of useful features that are very useful to web developers.
The Sun/MySQL guys are remarkably honest about their product. They say exactly what the strengths and weaknesses are. If you are used to some of the big vendors sales tactics this comes as a massive shock. Ultimately this does inspire confidence in using the product because you know exactly what to expect. I would much sooner deal with a product that says "don't do this because this is beyond our limits" than one that says "our product is the cure for cancer" and it turns out it couldn't cure a simple hangover!
Having run both*, I don't think there's much question that SQL Server is overall a more full-featured product than MySQL (although I'd be interested to hear arguments to the contrary).
I wouldn't be overly concerned with MySQL bugs - just run a few releases behind.
Given that you have a Windows server, the only issue I can see is the prospect of acquiring a significant cost if you max out the resources permitted with Express and need to go to a full, licensed SQL Server 2005 (or 2008) instance. If you expect to scale to that level and can't afford the licence, then a free DBMS would seem to be the smart move now, and I'd also look at PostgreSQL, which may be a better alternative.
* and liked them both for different reasons, FWIW
This is a very old article. With MySQL 5.7.20 now, there is no reason to use MS SQL Server or any other commercial licensed database. We switched to MySQL for our high profile financial .Net app six months ago after getting tired with over $50K licensing cost for MS SQL server and this was the best decision ever. No licensing cost and MySQL is highly configurable, small foot print, performance better than MS SQL servers. So far no glitches, no issues. Replication is easy to setup and works like a charm. Did I mention, no money even when running on a 32 core server and having five replication server. MS SQL server costs $3000 per two core (in our setup this would come out to be in six figures). Pure stupidity to throw that money out for nothing. Our own benchmarks, MySQL is performing better than MS SQL server. We really like easily configurable events in MySQL in addition to it being free. Just one another point, it takes only a few minutes to install MySQL while it takes forever to install MS SQL server on a new computer. Don't know what MS SQL server needs to do for hours while MySQL zip file can be unzipped and two line command can configure it within minutes.
MySQL is still going strong, and will continue to.
Note however that SQL Server Express is limited in other ways; specifically, number of CPUs and limitation of RAM usage (1 GB).
Personally I prefer SQL Server over MySQL. It is much easier to work with. And applications properly developed for it can scale to enterprise level if you are careful.
I don't think that you liking Sun or the mySQL 'brand' should influence your choices too much - unless you feel mySQL will be run into the ground by Sun. Look at the performance, management and features.
SQL Express with advanced features looks interesting - now has reporting services. SQL Express also requires a windows license and any associated licensing you might need.
mysql could use http://jasperforge.org/ for reporting.
I like writing tsql more, but for any independent projects, I would likely use mysql due to its cost savings that could be passed on to the client - putting me above the competition. People like saving money, even if it is profit.

Can you recommend a good source for Teradata Best Practices?

Looks like my data warehouse project is moving to Teradata next year (from SQL Server 2005).
I'm looking for resources about best practices on Teradata - from limitations of its SQL dialect to idioms and conventions for getting queries to perform well - particularly if they highlight things which are significantly different from SQL Server 2005. Specifically tips similar to those found in The Art of SQL (which is more Oracle-focused).
My business processes are currently in T-SQL stored procedures and rely fairly heavily on SQL Server 2005 features like PIVOT, UNPIVOT, and Common Table Expressions to produce about 27m rows of output a month from a 4TB data warehouse.
One place to start is here: http://www.teradataforum.com/
This might be a little late, but there are a few things which I can warn you about Teradata which I have learned.
Use the most recent version as often as possible.
For V12 the optimizer was re-written and the database performs much better now.
Try to realize that SQL Server and Teradata are very different beasts, most of the concepts will not transition well.
Do not underestimate the importance of a primary index.
The locks that teradata uses are very primitive when compared to other databases.
Do NOT use TERA mode. You do not have any code which is legacy, ANSI mode is far superior and is widely encouraged.
Join indexes are very helpful tools, but they do not provide all the answers.
Parallelism, take the time to understand how FASTLOAD, MULTILOAD, and TPUMP works and find out how one can leverage it with their ETL strategy.
If you are attempting to run a query which needs to be performant, do not use any casts, the optimizer will not use statistics to generate the best execution plan.
Working with dates are going to be a pain, just a warning.
Teradata is very DDL oriented, try to understand all the syntax related when creating a table.
Compression is a wonderful tool, if you have any values which are repeated in a table, make use of it.
There are not many tools available with Teradata, be prepared to build a lot. The tools that exist are very expensive.
Unfortunately, I do not know much about SQL Server, so I cannot say what tools in SQL Server appear in Teradata.
Hope this helps
I would also look into the recently launched Teradata Developer Exchange as well as the TeradataForum and forums on Teradata's main website.
I don't know of any good references available online. Teradata has some design manuals that are available for download, but they're more instruction manuals and not "best practices" as such. check them out here: http://www.info.teradata.com/DataWarehouse/eTeradata-BrowseBy.cfm?page=Teradata%20Database
Alternatively, you need to find a friendly Teradata expert to bounce ideas off. Try Teradata themselves, or find a local consultant with Teradata experience.
Best Practices on Teradata isn't a topic that gets lots of discussions and most of the best tricks tend to be proprietary knowledge of the person/people who discovered them.
Sorry,
David Stewardson
Satyam Computer Services
Top of the list on a Google search for "Teradata Best Practices" gave me TERADATA ADVISORY GROUP SETS BEST PRACTICES FOR BUSINESS OBJECTS AND TERADATA CUSTOMERS
EDIT: Seeing as that's just advertising, as you've pointed out, see how you go with these. Please bear in mind that I don't have a clue what Teradata is and can't see myself using it any time this side of the 22nd century AD.
Teradata Discussion Forums
Best Practices for Teradata Deployments
Best Study Guides For NCR Teradata Certifications
The middle one looks promising with it's nice long link tree at the top
Oracle® Business Intelligence Applications Installation and Configuration Guide > Preinstallation and Predeployment Considerations for Oracle BI Applications > Teradata-Specific Database Guidelines for Oracle Business Analytics Warehouse >
and the first link, to the forums, should put you in touch with the right people.