The ‘Database’ Archives
Posted May 8, 2007 by

SQL 2000 – Find version and service pack info

Run the following code in SQL Server 2000 Query Analyzer to return the Version and Service pack – useful if you’re having problems on a server and don’t know if you’re running the latest patches or not.

Category Database

Posted May 8, 2007 by

SQL Server 2000 – Find Database Language

How to find the system language of a server running SQL Server 2000 using a SQL statement.

Category Database

Posted May 8, 2007 by

SQL Server 2005: Move tempdb

By default, tempdb is placed on the same drive that SQL Server is installed on. This is probably not a desirable result, especially if you have installed SQL Server on the boot drive or on an IDE versus a SATA drive. To move tempdb to a faster drive and improve performance, follow these steps:

Category Database

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