Archive for July 2010

Creating a sqlserverpedia list with Tweet-SQL

Warning: count(): Parameter must be an array or an object that implements Countable in /home/fbsqlcom/public_html/ on line 31

Many moons ago I posted an article illustrating how to befriend twitter users on the sqlserverpedia list with Tweet-SQL. Since Twitter have added various list methods to their API I thought it would be fun to rehash this post to create a list with Tweet-SQL. First copy the list of users from the sqlserverpedia page. […]

Can’t reopen table: ‘t1’

I’m quite often jumping between MySQL and SQL Server so remembering the quirks and limitations of each system can be difficult. With MySQL, if you attempt to reference a temporary table more than once in the same query, you will encounter the following error; Error Code : 1137 Can’t reopen table: ‘t1’ The following provides […]

Rename MySQL Stored Procedures

I’ve previously blogged about the limitations of MySQL Alter Procedure Syntax and I came across a thread on the MySQL forums with a possible solution. I thought it might be handy to wrap this up into a stored procedure akin to SQL Server’s sp_rename. This procedure will allow you to easily rename MySQL Stored Procedures […]

Purge MySQL Binary Logs

From time-to-time you may need to manually purge binary logs on your MySQL slaves to free up a bit of disk space. We can achieve this by using the PURGE BINARY LOGS command from the MySQL command line client. MySQL advises the following procedure when purging these logs To safely purge binary log files, follow […]

For RANGE partitions each partition must be defined

If you encounter the following error when trying to create a partitioned table in MySQL Error Code : 1492 For RANGE partitions each partition must be defined Assuming you have defined your partitions then you probably have a syntax error. Take the following incorrect example. ?View Code MYSQLCREATE TABLE People ( PersonId INTEGER NOT NULL […]