Now that you’re familiar with stored procedures, it’s time to introduce you to jobs. Jobs are like stored procedures, in that they are a set of steps performed sequentially. Jobs can run T-SQL commands, Integration Services Packages, Analysis Services commands, replication tasks, and even command prompt applications. And what’s the best part? These steps are…
Tag: SQL102
SQL 201 – Indexes
Indexes in Microsoft SQL are just like indexes in a book. They help you jump to the information you want more quickly. In Microsoft SQL you can index one or more columns in a table or view. The indexes defined can help your select statements run much more quickly… but they do have a cost,…
SQL 102 – GRANT
As an administrator, you can execute the SELECT from the Components table and the v_Components view, and execute the usp_GetBatmobileComponentsList procedure; however, your new user cannot. To grant your new user the necessary permissions, use the GRANT statement. Let’s assume for this lesson you’ve already created a SQL Server user [Lucius Fox]. Execute the following…
SQL 102 – Users
Before you got started working with SQL Server, someone had to set up a user account for you. Now that you’re learning to become a database administrator you need to learn to allow others to have access to SQL Servers. Granting a user access to a database takes three steps. First, create a login, second…
SQL 102 – Primary Keys
In SQL 101, I showed you how to create a table. I want to build on that today by introducing the concept of a primary key. A primary key is a column, or combination of columns that uniquely identify the row in the table. By doing this you can have some assurance that the row…
A Series for Database Administration
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…
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…
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…
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…