The DBA Blog by Tomer Lev

SQL information, scripts, tricks and more…

Defragmenting Indexes in SQL Server 2005

http://weblogs.sqlteam.com/tarad/archive/2008/09/03/Defragmenting-Indexes-in-SQL-Server-2005.aspx

I think this may come in handy…

June 26, 2009 Posted by | General, SQL SERVER, Tips | , , | Leave a comment

Tweet-SQL

Integrate your application in super quick time using Tweet-SQL. Tweet-SQL promises to allow fast and easy Twitter Integration through the use of CLR stored procedures on Microsoft SQL Server. A quick summary of Tweet-SQL…

http://sqlclrnews.blogspot.com/2008/09/easy-twitter-integration-with-tweet-sql_3653.html

June 26, 2009 Posted by | General, Scripts, SQL SERVER | , , | Leave a comment

Useful bit of code

create table #temp (spid int, status nvarchar(max), login nvarchar(max), hostname nvarchar(max), blkby nvarchar(max), dbname nvarchar(max), command nvarchar(max), cputime int, diskio int, lastbatch nvarchar(max), programname nvarchar(max), spid2 int, requestid int)

insert #temp exec sp_who2

select hostname, count(*)
from #temp
where hostname != ‘ .’ AND login = ‘your login’
group by hostname
order by hostname

drop table #temp

This way you can filter sp_who2.

enjoy 🙂

June 26, 2009 Posted by | Scripts, SQL SERVER | | Leave a comment

Sql server 2008 tools

find it here:

http://www.microsoft.com/downloads/details.aspx?FamilyId=228DE03F-3B5A-428A-923F-58A033D316E1&displaylang=en

June 26, 2009 Posted by | General, SQL SERVER | | Leave a comment

Craig Freedman’s SQL Server Blog

http://blogs.msdn.com/craigfr/

It seems like a very interesting blog. You might find it useful…

June 26, 2009 Posted by | General, Tips | , , | Leave a comment

Data Warehouse Query Performance

sql server 2008
Data Warehouse Query Performance:

http://technet.microsoft.com/en-us/magazine/2008.04.dwperformance.aspx

June 26, 2009 Posted by | Administration, General, SQL SERVER, Tips | , | Leave a comment

Internals Viewer for SQL Server

http://www.codeplex.com/InternalsViewer

Useful for extreme optimizations 🙂

June 26, 2009 Posted by | General, Scripts | Leave a comment

SQL Server 2005 SP3

check it out over here:

http://sqlblog.com/blogs/aaron_bertrand/archive/2009/01/18/my-latest-sp3-experiences-two-thumbs-acting-like-divining-rods.aspx

June 26, 2009 Posted by | General | Leave a comment

Microsoft SQL Server 2005 Integration Services Step by Step (Free E-Book)

check it out over here:

http://csna01.libredigital.com/?urrs4gt63d

enjoy 🙂

June 26, 2009 Posted by | SQL SERVER | Leave a comment

Clean Cache

Lets say you have a query and you need to check performance for this one.
Somtimes you will need to clean the cache – it is quite rare, but still there…
In order to clean the cache from any data, use the following:
dbcc dropcleanbuffers;
to clean any execution plan use:
dbcc freeproccache;
you need to take under considuration that these kind of operations influence on the all system. The SQL will need to read disk pages phisically and recompile all exeution plans – so be carefull when doing it on production servers…

June 26, 2009 Posted by | Administration, SQL SERVER, Tips | , | Leave a comment