Friday, April 23, 2010
SQL Transaction logs
You can shrink the log by right clicking on the database in the enterprise manager and Shrink Files. I was using the dialog box but it was not working. I copied the script to the following error:
"Cannot shrink log file because all logical log files are in use" in the Messages
If you recieve error, follow these steps (by xangelx1985):
1. open enterprise manager.
2. right click on the database u wanna shrink it.
3. click on properties.
4. from the data properties go to options.
5. in the middle u will see recovery model make it "simple" then click on "ok" and try to shrink the database.
http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/ae4db890-c15e-44de-a2af-e85c04260331
I yet need to study this what caused the log to grow so big. I came across some MS articles blaming that if transactions are executed without rolling back or finishing the transaction log can grow big however I need to read it in depth.
Friday, December 25, 2009
Polling data/performing analysis continuously at regular intervals
Summary:
In .net, I have discovered two methods for polling data/performing some kind of continuous analysis at regular intervals.
First approach is to use Global.asax file and start a timer in it when the application starts. However, it stops doing the job when thread is idle for some time i.e. there are no requests. This will be performing task at regular intervals only when users are continuously using the information.
Second approach is to use WindowServices. Using an installer, the windows service can be installed to the Windows Services. This service can be configured to run continuously.
I preferred the second approach as the websites are meant for UI only so it is better to perform regular interval tasks in a separate application, and also due to the problem I stated above.
Details:
Coming soon….