/egilh

Learning by doing

January 2008 Entries

I recently migrated a Microsoft SQL Server database from one disk drive to another using the sp_detach_db and sp_attach_db stored procedures. It was on the same machine so I was surprised when I got this half English, half Italian error message: An error occurred in the Microsoft .NET Framework while trying to load assembly id 65733. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Impossibile caricare il file o l'assembly '..., ...

Microsoft buys FAST and Oracle buys BEA. Bigger and bigger, in the end, there can be only one...

What can I say. Bill's goodbye note is better than mine.

The stored procedure below, from Michele, kills all open connections to the DB you specify. It is a great time saver when you have to take a busy db offline for maintenance. CREATE PROCEDURE usp_DBKillConn@DBname sysname = NULLAScreate table #SpidDB( spid smallint)declare @curSpid smallintdeclare @cmd varchar(64)INSERT INTO #SpidDB(spid) SELECT spid FROM master.dbo.sysprocesses WHERE dbid = DB_ID(@DBname) SELECT @curSpid = min(spid) from #SpidDBwhile @curSpid IS NOT NULLbegin PRINT @curSpid SET @cmd = 'KILL ' + convert(varchar(6),@CurSpid) /*KILL @curSpid*/ EXEC sp_sqlexec @cmd SELECT @curSpid = min(spid) from #SpidDB where spid > @curSpidendPrint @DBnameGO

I lost all the tool box controls in Visual Studio 2005 after the last Windows Update. I was able to get them back by following these steps: Go to the Tools menu Import and Export Settings Choose "Reset all settings" Select the setting you want to use

My one month sabbatical has gone fast, too fast. I was expecting to spend a lot of time in front of the computer, but I have hardly written a mail. That caught me by surprise. I have a lot of cool hobby projects going and the sabbatical would have been the perfect time to work on them. Instead I have spent as much time as possible with my family doing the things I usually do not have time for. This week has been especially good for recharging the batteries as the kids are still home from school and it is snowing :-) I start my new job next week but it will take a week or two before I am back to my normal blogging and development schedule. I guess this blog will be ...