Database tutorials

SQL Server 2005: Easily Grant Select to All Tables and/or Views in a Database

contributed by Rob Rogers on April 24, 2007 under Database

Granting Select to all tables for a login can be an extremely painful and lengthy process. Utilizing the SQL Server Management Studio to perform this means going table by table and checking the Select checkbox for each individual table, this makes a real nightmare if you are working with hundreds of tables. You can do this in mere seconds versus hours by using the Query window. Here’s how:

 

MySQL: Increment an exisitng value

contributed by qmchenry on February 24, 2007 under MySQL

This slick MySQL syntax allows you to increment or decrement an existing number in a table without first having to read the value. This is a nice way to increment an access counter.

 

SQL Server 2005: The Copy Database Wizard

contributed by Rob Rogers on February 8, 2007 under Database

The Copy Database Wizard is a very valuable asset when you are wanting to copy or move a database and its objects to another server. To utilize this functionality…

 

SQL Server 2005: How To Restore a Database from a Backup

contributed by Rob Rogers on February 7, 2007 under Database

Your database is down, your users are in a panic, what do you do?. If you have been performing routine backups of your database, you can restore it to the point of the most recent backup. To restore your database, follow these steps:

 

SQL Server 2005: How To Perform a Full Backup of a Database

contributed by Rob Rogers on under Database

A full backup includes database files and locations as well as parts of the transaction log. A full backup is necessary, regardless of the backup strategy that is implemented, because all other backup types (differential and transaction log) depend on the having a full backup. To perform a full backup of your database, follow these steps:

 

SQL Server 2005: Enforce Password Policy and Expiration

contributed by Rob Rogers on February 6, 2007 under Database

Utilizing password policy and expiration can better secure your server and better protect the valuable data in your database. To enforce password policy and expiration for a login, follow these steps…

 

MySQL: Use CONCAT to include text in SELECT results

contributed by qmchenry on January 31, 2007 under MySQL

The CONCAT function in MySQL allows SELECT statements to act like printf commands by mingling text and query results together.

 

SQL Server 2005: How To Set Up Database Mail

contributed by Rob Rogers on January 24, 2007 under Database

SQL Server used to rely on SQL Mail to for email capabilities. This was a pain as it required you to install a MAPI mail client onto your server. SQL Server 2005 has done away with this and now uses Database mail which relies on using your SMTP server instead of a mail client to send out email. You can set up Database Mail by following these instructions…