A little something about everything

internet marketing and website development made simple..

Moving database from MS SQL 2000 to 2005 or 2008 | Error / User / Roles / Delete

In order to fix this bug you can simply run this command on the effected database after you have used the backup (sql2000) / restore sql2005/2008) or detach attach methods.

command to run:

 

Replace "dbusername" with the problem user account. both should be the same.

This will remove the ghost user from the sql 2000 server and replace it with the new user on your sql 2005 / 2008 server. Be sure to have the user created before running this command.

Errors associated with this are as follows:

"login name must be specified Database user"

"The database principal owns a schema in the database, and cannot be dropped"

"user group or role already exists in the current database"

"can't delete sql user in database"

The network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mappings to this network share.

To disconnect from a ghost or rogue network path do the following:

  • (Open cmd.exe)
  • net use /delete \\(computername)\(sharename)

To disconnect from a ghost or rogue network drive do the following:

  • (open cmd.exe)
  • net use (diveletter): /delete

Asp.net C# script for Permanent 301 Redirect

Here is the code, add this to your global.asax file: