1. This article explains how to track SQL Server 2005 deadlocks using Profiler tool.
2. An open source project at coldeplex to compare two SQL Server 2005 databases.
June 30, 2008
1. This article explains how to track SQL Server 2005 deadlocks using Profiler tool.
2. An open source project at coldeplex to compare two SQL Server 2005 databases.
June 29, 2008
Researchers have said that North Pole will be completely ice-free this summer. This is going to happen first time in recorded human history. This is shocking and too quick I was tracking a similar story published on Dec ‘07, which quoted that North Pole could be ice-free in 5-6 years. I think this is the most visible effect of global warming so far.
Hope not to see more such disturbing effects.
June 26, 2008
To be noted, Microsoft is not going to release 64-bit version of .Net framework 1.1. So installing it on Windows 2003 64-bit OS will require it to run in “32-bit mode”. Normally this is done easily when you try to install FW 1.1 on OS it will ask you to run a command during installation and that enables IIS to run FW 1.1 in 32-bit mode.
Asp.Net Tab in IIS MMC will be missing so assigning different FW version to different websites should be done using command line tool : aspnet_regiis.exe (it is separate for each FW version and can be found in framework directory e.g. C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322)
Examples:
aspnet_regiis.exe -s W3SVC/1/ROOT/<yourappname> (for recursive update)
aspnet_regiis.exe -sn W3SVC/1/ROOT/<yourappname> (for non-recursive update)
For more details visit here.
June 22, 2008
SQL Server 2005 has a feature called “Copy Database” (you can right click on any database or server instance to find it). The function copies database from target sql server 2000 to the sql server 2005 while still keeping it online for target database users.
In my case, I ran through the migration wizard and in the last step which it actually runs the package which migrates database, it failed. It did not shown any proper error message so that I can find out what went wrong. I did it again and this time making sure I exactly follow the process but result was same.
So it did not go smooth. So I opted to do it crude way, by detaching and reattaching the database mdf file in sql server 2005. That worked. Then I had to migrate all dependent sql jobs and DTS packages manually as well.
June 22, 2008
Web applications which send out email notifications as part of their user interaction process normally works fine, but as they grow in terms of number of users it tends to feel slower in parts where email is sending out in background. Reason is obvious, your smtp server has to handle more request then before and it takes time to process each email request, so your main application thread has to wait (and so does user).
Solution is simple, just isolate your email sending functions by creating separate thread (and also set it on low priority). This way your main application thread (and thus your users) does not have to wait them processed.
I have seen simple functions to take around 30 seconds to process just because email sending function is waiting in background just to get an time out error from smtp server.
June 16, 2008
This msdn blog post compiles important links on SQL server scaling and performance.
June 12, 2008
Firefox 3.0 is slated to be released on coming Tuesday. I am using it since they have released first beta. It freaking cool browser, but are you ready to migrate from your FF 2.0?
There are number of popular add-ons not compatible with FF 3.0.
Check compatibility report online here.
June 12, 2008
One of my client application having performance issues and I found out that it is because of very large number of data in some of the tables, any application pages rendering data by referring those tables are bound to be slow. We could fix the issue by archiving unnecessary data. But I was wondering how can I keep an eye on such tables.
Solution: I made an sql script which run periodically (through sql agent) and populate a table with all table names and their row count info.
Script:
declare @query nvarchar(100)
declare @declare nvarchar(50)
declare @tablename varchar(50)
declare @rowcount int
declare table_cur cursor for SELECT name
FROM sysobjects WITH (NOLOCK)
WHERE xtype = ‘U’
open table_cur fetch next from table_cur into @tablename while @@fetch_status = 0
begin
set @declare = ‘@rowcount int output’
set @query = ’set @rowcount = (select count(*) from ‘+@tablename + ‘)’
exec sp_executesql @query, @declare, @rowcount OUTPUT
insert into tablerowcount values (@tablename,@rowcount)
fetch next from table_cur into @tablename
end
close table_cur
deallocate table_cur
Once you have that table you can do virtually anthing to get yourself notified.
Hope this helps someone.
June 6, 2008
If you have above error displayed as soon as you do post back on your page while rest of your app is still working then you might have huge viewstate data in your page.
Normally it happens when you are loading a page displaying several hundreds records, that may generate very big viewstate value inside your page. The loading will work fine but as soon as you post back the page it will throw that error. Reason is your page becomes too bulky to be accepted by server.
To solve the problem you obviously have to reduce the side of the viewstate by either disabling viewstate on your page or disable on selected controls where it is not needed, if both of these is not possible then simply reduce the number of records displayed at a time.
Ok, that’s a generic solution but in Asp.Net framework 2.0 you can handle it by using an in-built feature called “Viewstate chunking”, this will chunk out the viewstate data so that not a single large element is generated.
Update: If you are using framework 1.1 then there is an option of in-memory viewstate compression. Check this link for more details ( I have implemented it using vb.net so you can ask me for help).
June 4, 2008
I am using both windows Live Messenger and Google Talk client but over the time I got frustrated with Windows Live Messenger.
Live Messenger exists long before Google Talk came but it is still lacking very useful feature of saving the chat history centrally on the web (just like Google Talk saves it in Gmail). This can be a frustrating experience in case you are using different PCs to chat, so either your chat history is scattered across the PCs (for no use) or you would choose not to store them (again for no use).
Another, When someone sends you messages when you are offline you receive them when come online next time (that’s good) but as soon as you close the chat window your Messages are gone and they are not saved in history (so if sender is offline by that time you have to wait until he/she comes online next time just to ask what he/she sent).
I hope Live Messenger team is working on it and we will see this feature soon.