Skip to content

Category Archives: mssql

working with R, postgresql + SSL, and MSSQL

I’ve been able to take a break from my regularly scheduled duties and spend some time working with R.  This is a short log of what I did to get it working. The main things I’m looking to do is regression modelling from a large dataset I have in postgresql and various stats calculations on […]

making SQL Server backups using python and pyodbc

I have a set of python scripts to help me manage a few SQL Servers at work, and one of the things I do is take database backups using BACKUP DATABASE and BACKUP LOG.  I’ve been using pymssql to connect, but today tried switching to pyodbc.  pymssql seems to be having momentum problems, so I […]

Installing VS 2008 and SQL 2008 Express on Windows 7

A new decade means time for a fresh windows install at work.  I ran into some trouble with windows 7, visual studio 2008, and SQL 2008 Express.  Here’s how I resolved them.  Contrary to most things I found on the web, I’m not using betas or release candidates. First off, installing SQL 2008 Express.  I […]

SQL Server 2005 doesn’t like bitwise comparison of large numbers

An update trigger using COLUMNS_UPDATED() was failing, and I figured out the problem: Some simple SQL: SELECT CAST(0x0200 as bigint), 0x0200 | 0 SELECT CAST(0x02000 as bigint), 0x02000 | 0 SELECT CAST(0x020000 as bigint), 0x020000 | 0 SELECT CAST(0x0200000 as bigint), 0x0200000 | 0 SELECT CAST(0x02000000 as bigint), 0x02000000 | 0 SELECT CAST(0x020000000 as bigint), […]

“manual or distributed transaction mode”, ruby, rails, mssql, ado

Spent too much damn time debugging the database layer in rails again today. This was the error: OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server Cannot create new connection because in manual or distributed transaction mode. This was getting thrown after an insert, and the problem was very non-obvious.  I found one […]