Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion 'Troubleshooting Performance Problems in SQL Server 2005" white paper.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Charles Wang[MSFT]  
View profile  
 More options Aug 23 2006, 10:20 am
Newsgroups: microsoft.public.sqlserver.server
From: chang...@online.microsoft.com (Charles Wang[MSFT])
Date: Wed, 23 Aug 2006 14:20:33 GMT
Local: Wed, Aug 23 2006 10:20 am
Subject: Re: 'Troubleshooting Performance Problems in SQL Server 2005" white paper.
Hi Olivier,
My steps are as following:
1. Create the sp_addcolumn stored procedure:
    create proc dbo.add_column (
            @add_stmt varchar(500) output,
            @find varchar(100)=NULL,
            @cols_containing varchar(500)=NULL,    
            @col_stmt varchar(max))
as
--
-- This stored procedure is provided "AS IS" with no warranties, and  
-- confers no rights.  
-- Use of included script samples are subject to the terms specified at
-- http://www.microsoft.com/info/cpyright.htm
--
-- T. Davidson
-- @add_stmt is the result passed back to the caller
-- @find is a keyword from @cols_containing
-- @cols_containing is the list of keywords to include in the report
-- @col_stmt is the statement that will be compared with @find.  
--            If @col_stmt contains @find, include this statement.  
--            set @add_stmt = @col_stmt
--  
declare @length int, @strindex int, @EOS bit
if @cols_containing is NULL  
    begin
        select @add_stmt=@col_stmt
        return
    end
select @add_stmt = '', @EOS = 0

while @add_stmt is not null and @EOS = 0
begin  -- I add a begin here
 --           @dbid=-1,  -- I comment this line due to no @dbid parameter
    select @strindex = charindex(',',@cols_containing)
    if @strindex = 0
            select @find = @cols_containing, @EOS = 1
    else
    begin
        select @find = substring(@cols_containing,1,@strindex-1)
        select @cols_containing =      
            substring(@cols_containing,
                      @strindex+1,
                      datalength(@cols_containing) - @strindex)
    end
    select @add_stmt=case
--when @cols_containing is NULL then NULL
    when charindex(@find,@col_stmt) > 0 then NULL
    else ''
    end
end
--- NULL indicates this statement is to be passed back through out parm  
--@add_stmt
if @add_stmt is NULL
select @add_stmt=@col_stmt
go

2. Create the stored procedure dbo.get_indexstats without modification.
3. Create the stored procedure dbo.init_index_operational_stats
4. Execute the stored procedure:
     exec dbo.init_index_operational_stats
5. Execute the stored procedure dbo.get_indexstats.

You can try my steps and see whether or not the issue will occur.
If you have any other questions or concerns, please feel free to let me
know. It's my pleasure to be of assistance.

Sincerely,
Charles Wang
Microsoft Online Community Support


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.