Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Posted in Uncategorized | 1 Comment

Microsoft SQL Server 2008 Service Pack 2

Microsoft finally release Microsoft SQL Server 2008 Service Pack 2 after long CTP testing…
Key improvements in Microsoft SQL Server 2008 Service Pack 2 are:


  • Reporting Services in SharePoint Integrated Mode. SQL Server 2008 SP2 provides updates for Reporting Services integration with SharePoint products.   SQL Server 2008 SP2 report servers can integrate with SharePoint 2010 products. SQL Server 2008 SP2 also provides a new add-in to support the integration of SQL Server 2008 R2 report servers with SharePoint 2007 products. This now enables SharePoint Server 2007 to be used with SQL Server 2008 R2 Report Server. For more information see the “What’s New in SharePoint Integration and SQL Server 2008 Service Pack 2 (SP2)” section in What’s New (Reporting Services).


  • SQL Server 2008 R2 Application and Multi-Server Management Compatibility with SQL Server 2008.  
    • SQL Server 2008 Instance Management With SP2 applied, an instance of the SQL Server 2008 Database Engine can be enrolled with a SQL Server 2008 R2 Utility Control Point as a managed instance of SQL Server. SQL Server 2008 SP2 enables organizations to extend the value of the Utility Control Point to instances of SQL Server 2008 SP2 without having to upgrade those servers to SQL Server 2008 R2. For more information, see Overview of SQL Server Utility in SQL Server 2008 R2 Books Online.
    • Data-tier Application (DAC) Support. Instances of the SQL Server 2008 Database Engine support all DAC operations delivered in SQL Server 2008 R2 after SP2 has been applied. You can deploy, upgrade, register, extract, and delete DACs. SP2 does not upgrade the SQL Server 2008 client tools to support DACs. You must use the SQL Server 2008 R2 client tools, such as SQL Server Management Studio, to perform DAC operations. A data-tier application is an entity that contains all of the database objects and instance objects used by an application. A DAC provides a single unit for authoring, deploying, and managing the data-tier objects. For more information, see Designing and Implementing Data-tier Applications.
You can download SQL 2008 SP2 from the following link…
Posted in SQL Server 2008 | Leave a comment

SQL Server 2008 R2 RTM

SQL Server 2008 R2 is available today (May 3rd 2010) to TechNet and MSDN subscribers….
and available for download worldwide on May 13 as per the following blog…
Posted in SQL Server 2008 | 11 Comments

Best Practices Analyzer (BPA)

Posted in SQL Server 2008 | Leave a comment

Parameter Sniffing trace flag 4136

Microsoft has released Cumulative Update Package 7 for SQL2008 SP1 (KB797065).
In this update there is a new feature (trace flag 4136) that let us control the Query Optimizer should do parameter sniffing (KB980653) or NOT.
Improve Performance on query execution – control Parameter Sniffing


Posted in SQL server | 11 Comments

SQL Server 2008 R2 Update for Developers Training Kit

SQL Server 2008 R2 Update for Developers Training Kit is available as a free download from the Microsoft Download center…



SQL Server 2008 R2 offers an impressive array of capabilities for developers that build upon key innovations introduced in SQL Server 2008. The SQL Server 2008 R2 Update for Developers Training Kit is ideal for developers who want to understand how to take advantage of the key improvements introduced in SQL Server 2008 and SQL Server 2008 R2 in their applications, as well as for developers who are new to SQL Server. The training kit is brought to you by Microsoft Developer and Platform Evangelism.

Overview and Benefits
The training kit offers the following benefits:

  • Learn how to build applications that exploit the unique features and capabilities of SQL Server 2008 and SQL Server 2008 R2.
  • Provides a comprehensive set of videos, presentations, demos and hands-on labs
  • Contains new content for developers who are new to SQL Server.
  • Contains new content for SQL Server 2008 R2.
  • Contains all of the existing content from the SQL Server 2008 Developer Training Kit.
  • Easy to download and install.

Posted in SQL Server 2008 | 46 Comments

Table size in all DBs

create Procedure Mu_TableSize
if object_id(‘TableStorage’) is  null 
–drop table TableStorage
CREATE TABLE  TableStorage(
 [ServerName] [nvarchar](128) NOT NULL,
 [DatabaseName] [nvarchar](128) NOT NULL,
 [TableName] [nvarchar](128) NOT NULL,
 [RowCount] [bigint] NULL,
 [TotalSpace] [bigint] NULL,
 [DataSpace] [bigint] NULL,
 [IndexSpace] [bigint] NULL,
 [UnusedSpace] [bigint] NULL,
 [DateInfoCollected] [datetime] NULL
declare @command1 varchar(500)
, @command2 varchar(500)
, @command3 varchar(500)
, @replacechar varchar(500)
, @postcommand varchar(500)
, @precommand varchar(500)
select @command1 = ‘if ”@” <> ”tempdb” insert into ##TableStorage exec [@]..sp_MSforeachtable ”Exec sp_SpaceUsed ””?””” ‘
,  @command2 = ‘Update ##TableStorage set
     [TotalSpace]  = cast(replace([TotalSpace], ” KB”, ””)/1024 as bigint),  
     [DataSpace]   = cast(replace([DataSpace], ” KB”, ””)/1024 as bigint),
     [IndexSpace]  = cast(replace([IndexSpace], ” KB”, ””)/1024 as bigint),
     [UnusedSpace] = cast(replace([UnusedSpace], ” KB”, ””)/1024 as bigint)’
,  @command3 = ‘insert into TableStorage select CONVERT(char(20), SERVERPROPERTY(”servername”)), ”@”,*,getdate() from ##TableStorage ‘
,  @replacechar = ‘@’
,  @postcommand = ‘select * from TableStorage ‘
,  @precommand = ‘if object_id(”Tempdb..##TableStorage”) is not null drop table ##TableStorage
      CREATE TABLE [##TableStorage](
       [TableName] [nvarchar](128) NOT NULL,
       [RowCount] [nvarchar](128) NULL,
       [TotalSpace] [nvarchar](128)  NULL,
       [DataSpace] [nvarchar](128) NULL,
       [IndexSpace] [nvarchar](128) NULL,
       [UnusedSpace] [nvarchar](128) NULL,
      ) ‘
exec sp_MSforeachdb @command1=@command1,
Posted in SQL Server 2005 Scripts | 100 Comments

Burn an ISO-image to CD or DVD

Many people asked me how to burn the cd or dvd from ISO files downloaded from MS site for software installations….


"Windows Server 2003 Resource Kit Tools"




Download rktools.exe and install it.


Steps to burn an ISO-image

To burn a CD/DVD from an image file when a drive letter is assigned to the CD/DVD burner type the following at the command line:

cdburn.exe d: c:\your_iso_file.iso for CD ; use Dvdburn.exe  For DVD.

Press ENTER.

Output similar to the following is displayed:

Number of blocks in ISO image is 2a4e2 – 100.0% done

Finished Writing Synchronizing Cache: burn successful!


Notes: The drive letter assigned to the burner in this example is D and the image file being written is located at c:\iso_2003.iso The default burn speed for this tool is 4x with the maximum burn speed being determined by the speed of the burner. Use the speed parameter to set the burn speed. The max parameter sets the burn speed of the CD/DVD burner to maximum.




Posted in Computers and Internet | 63 Comments

Step by Step Procedure to Implement SQL Server Transactional Replication with Oracle as Publisher

I come across interesting article which provides the step by step details to create Transactional Replication with Oracle as Publisher by Gurwinderjit Singh
SE, Microsoft SQL Server…
Posted in SQL Server Replication | 59 Comments

Parallelism bugs in SQL 2008

I believe parallelism was introduced in SQL Server 7.0 but since then we encountered many issues with it.
Still there are bugs/issues with parallalism, please check the post by Aaron Bertrand

Six reasons you should be nervous about parallelism

Don’t get me wrong; parallel processing is great.  And with SQL Server in particular, there are many benefits to taking advantage of the power of multiple CPUs.  However, we have all had cases where what looked like parallelism was actually hurting us (you remember turning off hyperthreading on SQL Server boxes, right?), and cases where long CXPACKET waits completely defeated the purpose of speeding up the query with parallelism in the first place … often making the query take longer than it would with a MAXDOP 1 query hint, or in some cases run away completely, never to be seen again.


Posted in SQL Server 2008 | 42 Comments