I really like this article. Got a lot of tips from it. I hope you will also like it.
http://toddanglin.ulitzer.com/node/1054992
Hyperlink Solutions deals in Project management, Consultation, Designing and Development of Web Applications
Thursday, August 5, 2010
optimizing ASP.NET website/application
Labels:
asp.net,
c#,
web application optimization,
web page,
web site
Wednesday, August 4, 2010
How to truncate transaction log file via sql statement
Sometimes you wish to truncate transaction log file via SQL statement. you don't want to create mess as you would have 24x7 (online) production database and recovery model would also be set to full.
Solution available before SQL SERVER 2005 was very simple. Just run below line and you have achieved your desired results.
But in SQL SERVER 2005 and above, previous statement generates syntax error as it is no more supported in SQL SERVER 2005 and above. Then what is solution for SQL SERVER 2005 and above. Solution is very simple, a regular BACKUP LOG to a backup device is sufficient. That truncates the log. Use below statements in order to get your desired output
I hope it will solve your problem
Solution available before SQL SERVER 2005 was very simple. Just run below line and you have achieved your desired results.
backup log dbname with truncate_only
But in SQL SERVER 2005 and above, previous statement generates syntax error as it is no more supported in SQL SERVER 2005 and above. Then what is solution for SQL SERVER 2005 and above. Solution is very simple, a regular BACKUP LOG to a backup device is sufficient. That truncates the log. Use below statements in order to get your desired output
use master
alter database dbname set recovery simple
go
dbcc shrinkdatabase(dbname )
go
alter database dbname set recovery full
go
I hope it will solve your problem
Labels:
2005,
2008,
Back UP,
Log file backup,
SQL SERVER 2000,
Transaction Log
Tuesday, August 3, 2010
Open Source Project Management Tools
Here is list of available project management tools which are currently available for your usage.
Find the Most Time Consuming Code in your SQL Server Database
I liked this article. I hope you will also get valuable information from it.
Viewing tempdb Size and Growth Parameters
You can view the size and file growth parameters of the tempdb data or log files by using one of the following methods
Similarly, If the version store is using a lot of space in tempdb, you must determine what is the longest running transaction. Use this query to list the active transactions in order, by longest running transaction.
SELECT
name AS FileName,
size*1.0/128 AS FileSizeinMB,
CASE max_size
WHEN 0 THEN 'Autogrowth is off.'
WHEN -1 THEN 'Autogrowth is on.'
ELSE 'Log file will grow to a maximum size of 2 TB.'
END,
growth AS 'GrowthValue',
'GrowthIncrement' =
CASE
WHEN growth = 0 THEN 'Size is fixed and will not grow.'
WHEN growth > 0 AND is_percent_growth = 0
THEN 'Growth value is in 8-KB pages.'
ELSE 'Growth value is a percentage.'
END
FROM tempdb.sys.database_files;
GO
Similarly, If the version store is using a lot of space in tempdb, you must determine what is the longest running transaction. Use this query to list the active transactions in order, by longest running transaction.
SELECT transaction_id
FROM sys.dm_tran_active_snapshot_database_transactions
ORDER BY elapsed_time_seconds DESC;
Subscribe to:
Posts (Atom)