Skip navigation.
Home
Computer Information for the non-computer literate.....

SQL

Data related to SQL queries

PG Day 2010 Presentation

My slide presentation from PDX PG Day 2010 in Portland, Oregon.

The presentation was created in Open Office (the .ODP file - Postgresql (OSCON).odp), but I've also created a PPT version (Postgresql (OSCON).ppt) exported from Open Office.

PostgreSQL on Windows - Presentation

I just completed a presentation for my local PostgreSQL User Group (the Portland PUG) and gave it last Thursday.  I need to add some updates to clarify things and round out some of it, but here it is as I gave it.

Hopefully there are others who will find it useful.

As a side note, there are NOTES on some of the slides to go along with the material being presented.

Shrink / Delete a SQL Server Log File

When you want to delete a transaction log file (when you have more than one), you need to do the following steps:

ALTER DATABASE dbname SET RECOVERY SIMPLE
ALTER DATABASE dbname SET RECOVERY FULL

or

USE TimsDatabase
BACKUP LOG FileName WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE ( 'TimsDB_log1' )
GO
DBCC SHRINKFILE ( 'TimsDB_log2' )

GO

Table Size in Microsoft SQL Server

Sometimes I want to find out how many rows are in each user table in a SQL Server 2000 database. The following SQL helps me determine this.

select
'SELECT COUNT(*) AS ' ''' +
RTRIM ( name ) + '''' +
' FROM ' + RTRIM ( name )
from
sysobjects
where
type = 'U'
order by
name

How to move your MySQL database directory

If you have a dedicated database server and the partition with the MySQL database fills up (or starts getting low), you can move your MySQL databases to a different location.

 

Let’s say you want to move the database to /home/mysql

 

Syndicate content