Tuesday, September 30, 2014

National Palace Museum,Taipei

This is part of the fun Taiwan travel series. View the full itinerary here.

Finally, I have more spare time to continue my notes on my trip to Taiwan.
One of the highlights of my Taiwan trip was (gasp) a visit to the National Palace Museum!


It was said that the best of China artifacts were actually secreted away during the Chinese Civil war - it hosts one of the largest collections of Chinese antiques in the world. Must be the reason why I see a lot of tourists from China.

Tuesday, September 16, 2014

SharePoint powershell to cancel workflows

I got stuck into a situation where the workflows in SharePoint were stuck during the "In Progress" stage, and there was no way to cancel the workflow from the UI.

After googling around, I found a simple powershell solution and adapted it slightly to suit my needs.

The concept is very simple - Load the site, load the library, and either traverse all items, or retrieve a single item based on the ID. For that item, loop through the workflows and cancel it!

Tuesday, September 9, 2014

Alter schema owner for SQL Server 2008R2 in batches

Recently I encountered a situation where after installing some enterprise software, the schema owners of all tables became something other than dbo. After googling around, here is a quick solution to batch update the owner:
First execute this query in Query Analyzer:
SELECT 'ALTER SCHEMA dbo TRANSFER ' + TABLE_SCHEMA + '.' + TABLE_NAME 
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'toreplace'
Copy the results and run the statements.
Related Posts Plugin for WordPress, Blogger...