SQL
PG Day 2010 Presentation
Submitted by TimBruce on Sun, 2010-07-18 08:32My 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
Submitted by TimBruce on Fri, 2010-04-16 18:38I 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
Submitted by TimBruce on Wed, 2010-01-27 13:03When 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
Submitted by TimBruce on Wed, 2010-01-27 13:02Sometimes 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
Submitted by TimBruce on Tue, 2009-10-06 16:25If 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
