Fixing up usernames after SQL Server Database Restore

The problem is that if you restore a sql server database on a different computer than the backup was created, you can have the problem that the usernames and permissions are somewhat lost.

Each username has an associated SID.  So even though you might have a user named ‘Bill’ and the restore database might have a user named ‘Bill’, they will have different SIDs and so the permissions will not be applied to the correct user.

To fix this problem you can follow the following steps:

1) run this TSQL:

sp_change_users_login 'report'

2) This will produce a table showing you Users that having issues.

3) run the following TSQL:

sp_change_users_login 'update_one', 'UserNameFromStep2Table','NameOfUserToUse'

In many cases the 2nd and 3rd parameters will be the same string.

More about this SP can be found here: http://doc.ddart.net/mssql/sql70/sp_ca-cz_4.htm

 

Activate Flash, Movies, and other ActiveX controls

Recently Microsoft lost a patent judgement, which resulted in them pushing down an “update” to IE that forces you to click on any embedded object to “activate” it.

Embedded objects can be flash movies, video clips, audio, etc.

This is really bad for sites that use flash.  Things like navigation and rollovers don’t work until you first click on them.

This article talks about the work around, and how you can incorporate this into your ASP.NET projects.

http://www.codeproject.com/aspnet/IEActiveXActivation.asp

 

5 Rarely used XHTML elements

This article is pretty interesting, as it discusses 5 xhtml elements that most people don’t know about or use.

1) OptGroup

County
  Surrey Kent   Orkney 

Languages
  C# C++ Java   ASP.NET PHP 
 

2) label (click the “Full Name”)

Full Name Gender:  Male Female

 

3) fieldset/legend

CommentsCP is a good place to publish XHTML related articles.
www.google.com can search
Personal InformationFull Name Gender:  Male Female

4) col/colgroup (notice the control over col widths)

1   2
3   4

 

5) Acronym (mouse over xhtml)

CP is a good place to publish XHTML related articles.

 

These are not widely known but very useful.

iDont.com

Almost all of my friends have IPods, but I have held off. 

There are a number of reasons why:

1) ITunes:  It sucks.  I hate it.  My current MP3 player simply allows you to drag and drop the files you want onto your MP3 player.  No syncing, no problems.

2) User interface.  I know a lot of people think the wheel is really cool, but I think it overly involves the user.  Tell me what is wrong with up/down buttons before you redesign the interface to use a wheel.

3) Batteries.  As noted at http://www.ipodsdirtysecret.com/.  The battery in an IPod can not be removed, and some say they start to fail after 18 months.

Well I came across a site called http://www.idont.com/, which went live today (before today it had some anti-ipod message up there). 

Turns out it is a site for the new SanDisk MP3 player.

The e200 (really catchy name… not) looks pretty cool, and might be worth me looking into more: http://www.anythingbutipod.com/archives/2006/03/sandisk-sansa-e200-series-review.php

 

Secret Machines

This weekend I went to see a band called Secret Machines, or The Secret Machines.  They seem to split the naming thing about 50/50 between using the “The” and not using it.

Anyway, they were playing a show at midnight at the Metro, which was kinda cool.  There was no opening band, so we got in around midnight and they came on around 12:20 or so.  I hate waiting hours for a band to come on stage, so that was as big plus.

It was crowded in there, but not too croweded.  When I saw 311 in the same place it was insane.  They couldn’t have packed more people in there if they wanted to.

Secret Machines played most of the songs I know: they only have 3 CDs.  And, they did this cool thing at the end of the show they setup their guitar in some kind of loop and left it on stage with the strobe lights and fog machines going full blast as they exited the stage.  The loop continued for another 20 seconds or so before snapping off and the lights for the venue came on.  Pretty cool!