Category: Technology

  • Get the documents out of SharePoint database

    I recently helped a client to get the WSS 3.0 documents out, as the client’s SharePoint is broken and we couldn’t get it fixed in short time, but they really want the Word, Excel, and pdf documents out of there. WSS 3.0, Windows SharePoint Services, uses Sql Server for data storage. The Sql Server version…

  • When was the statistics last refreshed

    Working with a few clients, I’ve noticed some issues with statistics in Sql Server 2005 not being updated frequently, even if auto stats is turned on at the database level and table level. I’ve noticed this often enough for me to cook up a quick script. Initially I thought that sys.stats catalog view might have…

  • BCP In automation script

    A while ago I wrote an article on code generation using Sql. The script I gave in that article can generate BCP (in and out) scripts automatically. I helped out a friend recently, and thought I would share the WMI/VBScript I cooked up with you. This script assumes that all files within a folder need…

  • Bring back the mirror when the principal blows up and there is no witness

    Here is the script you can use to bring the mirroring database out of its “Restoring…” coma: alter database MyDb set partner off restore database MyDb with recovery This is useful when you have high performance mirroring setup, your principal blows up, and there is no witness present. At this point, you will have to…

  • Character set and collation for simplified Chinese — MySQL

    I am curious about character sets and collations, especially how they are used in databases. I got some time to play with them recently. I did some testing today on MySQL. I will do the same test on Sql Server, Oracle, and PostgreSql, time permitting. I am only dealing with simplified Chinese at this point.…