I’m at it again! I’m working on some notes about how to administer a Microsoft Database Server. I’m planning on following the fundamentals you would need to cover the 70-431 (the Microsoft Database Administrator’s exam). I’m doing this to share, but I’m also doing this to help me grow a bit stronger in my Database…
Category: Microsoft SQL
The DBA’s Rules — Rules 3 and 4
In previous posts I shared with you my rules for who does and doesn’t have access to sa, and keeping your data safe by having tested backup and restore procedures. Next I’m covering two related rules. These are to protect me as much as they are to protect you. If you’ve worked in a team…
TOP PERCENT
We have a multi-threaded process that grabs it’s fair share records and then processes them. It basically looks at the total number of records to process, and takes the top 10% of the records and marks them so that no other process will grab those records. If you haven’t done a lot with TOP, then…
The DBA’s Rules — Rule #2
Rule #2: Have a tested Backup and Recovery Plan I’m sure no one out there isn’t doing a backup on their database server at some interval compatible with the nature of their data. If you’re updating your data weekly, weekly is fine; if you’re updating every minute of every day, you need to backup more…
Beginning SQL Server 2005 Programming
I was looking for a good reference book to use in creating training lessons for the site. I have to say this book is great for that. Lucky for me, it’s not as good at actually teaching you. I’d say it does a little better than the Books On Line, but not by a lot….
The DBA’s Rules
I don’t know if you’re a fan of NCIS, but for those of you who aren’t let me give you a little back story. Gibbs is the leader of an investigative team and he has a set of rules he teaches his team members in order to help make them better at their jobs. He…
Determine the Space Used by Tables
Eventually you’ll be faced with running out of space on a SQL server. Usually, before you get more drive space, you’re asked to find out if you can get rid of any information you’re holding onto in the server. You come up with a list of tables in databases that you feel you could remove…
Inter-Database Queries
I’ve had this question come up a few times now. “How do I copy data from one database to another?” It’s after getting a question like that, I explain fully qualified database object names. That’s a mouthful! Basically it’s a fancy way of saying the “full name” of a database object, like a table or…
SQL 201 — CREATE PROCEDURE
Now that you have the basics of SQL, I think it’s time to learn something a bit more involved. If you need to accomplish a task within SQL you will run a series of T-SQL statements. If you want to run those same steps over and over again, you could save them to a file,…
SQL101-Homework Assignment #6 Answer Key
Here are the answers for homework #6. Let me know if you have any questions! USE AdventureWorks GO 1. How many rows are there in Sales.SalesOrderHeader? SELECT COUNT(*) FROM Sales.SalesOrderHeader 2. How many Rows are there in Sales.SalesOrderDetail, that are also in Sales.SalesOrderHeader (SalesOrderID is the common/shared column)? SELECT COUNT(*) FROM Sales.SalesOrderDetail sod INNER JOIN…