This is an error to do with a syncing issue as described here Sp_changedbowner will return message ‘the proposed new database owner is already a user in the database’ if the sysdatabases/sysusers mapping is out of sync and the sysusers dbo SID is already mapped to the login. All you need to do is execute sp_changedbowner twice, once to change...
Read MoreViews accessing other databases
The default behaviour of SQL Server 2000 post servicepack 3 is for databases not to be able to access other databases through views. This is a really, really stupid thing – when I first approached this, I got really stumped about how to allow a view to access a table in another database with the same database owner. The trick is a thing called...
Read MoreParsing the same line multiple times in ActiveX
For work, it was neccessary to split out a single line that was separated by “ý” characters into a single column with multiple rows. I found that you could do this using ActiveX and a nifty little command that forces DTS to reprocess the same row over and over again. Here is the...
Read MoreSQL activeX file concatenation
Believe it or not, vbscript doesn’t seem to have a filesystem object that allows file concatenation. This here is an article on creating a file concatenation script in ActiveX (original source: http://www.codecomments.com/archive300-2004-3-158880.html). I have written this to call the copy command in DOS, I originally wrote this by opening the file,...
Read MoreSQL activeX script failure
Sometimes, when using activeX scripts written in basic (aka activeX), the failure of a portion of the script doesn’t trigger a failure trigger. The reason behind seems to be the use of many individual ‘If’ statements seems to break the functionality behind Micro$oft’s premium product If you write a simple script...
Read MoreReturn values from an ‘Execute SQL Task’
A lot of the time all that you want is to be able to run a quick query and from that be able to determine whether or not to run a DTS package. This article tries to explain that. The main points of this come from the site http://www.devguru.com/features/tutorials/DTS/DTS2.asp. The idea is to run a query, then to put the results into something that activeX...
Read More