The ‘Database’ Archives
Posted April 24, 2007 by

SQL Server 2005: Easily Grant Select to All Tables and/or Views in a 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 […]

Category Database

Posted February 24, 2007 by

MySQL: Increment an exisitng value

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.

Category MySQL

Posted February 8, 2007 by

SQL Server 2005: The Copy Database Wizard

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…

Category Database

Posted February 7, 2007 by

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

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:

Category Database

Posted February 7, 2007 by

SQL Server 2005: How To Perform a Full Backup of a 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 […]

Category Database

Posted February 6, 2007 by

SQL Server 2005: Enforce Password Policy and Expiration

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…

Category Database

Posted January 31, 2007 by

MySQL: Use CONCAT to include text in SELECT results

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

Category MySQL

Posted January 24, 2007 by

SQL Server 2005: How To Set Up Database Mail

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 […]

Category Database

Posted January 24, 2007 by

SQL Server 2005: How To Enable xp_cmdshell

As a security safeguard, Microsoft has turned off the use of xp_cmdshell by default in the latest version of SQL Server. This built-in extended stored procedure can come in quite handy as it gives you the ability to run any command line process from a stored procedure or job. To enable xp_cmdshell, do the following…

Category Database

Posted January 24, 2007 by

SQL Server 2005: Include Column Headers When Copying Grid Query Results

Previous versions of SQL Server have featured the ability to create grid result sets from queries so that one can easily copy and paste the data into another application. Unfortunately, the column headers were not copied, so you then would have to go into the application and add the header by hand. SQL Server 2005 […]

Category Database

Posted January 24, 2007 by

SQL Server 2005: Return a Comma Delimited Result Set from Queries

One almost always runs into a situation that requires a comma delimited result set from a query so that the data can be utilized by other software. Luckily, this is a native feature in the Query Editor.

Category Database

Posted January 24, 2007 by

SQL Server 2005: Configure Max Number of Characters Displayed in Each Column

It is sometimes necessary to modify the number of characters displayed in a query result set, especially when you are dealing with results containing a large number of columns. To configure the maximum number of characters displayed, do the following…

Category Database