|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 1:44 AM
Points: 34,
Visits: 211
|
|
Hi All, I am rebuilding/reorganizing indexes and I am trying to locate the activity via server logs However I can't find it. My database is in Full recovery mode (As simple or bulk logged mode will minimally log the process) and I am not specifing for the rebuild to take place online (as this would also minimally log the process) Can someone please point me in the right direction or are all rebuilding/reorganizing processes minimally logged regardless Thanks
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 2:46 AM
Points: 385,
Visits: 1,418
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 1:44 AM
Points: 34,
Visits: 211
|
|
So How to I locate the activity. ie for example when a database is backed up, one can see the activity logged in the activity log. How come I can see the rebuild/reorg activity in the activity log
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 4:09 AM
Points: 38,074,
Visits: 30,368
|
|
What do you mean by 'activity log'?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 1:44 AM
Points: 34,
Visits: 211
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 1:44 AM
Points: 34,
Visits: 211
|
|
Ok, let me start again. you know when you check the sql server logs, you can see things that happened in the database e.g alter recovery mode, database backup, database restore, sql server start up e.t.c How can I find an entry for an index rebuild/reorg
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Yesterday @ 4:28 PM
Points: 335,
Visits: 844
|
|
Reorgs should look something like this:
USE [DatabaseName] GO ALTER INDEX [IndexName] ON [dbo].[TableName] REORGANIZE WITH ( LOB_COMPACTION = ON ) GO Rebuilds would look something like this:
USE [DatabaseName] GO ALTER INDEX [IndexName] ON [dbo].[TableName] REBUILD WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, ONLINE = OFF, SORT_IN_TEMPDB = OFF ) GO
The WITH section of each will vary. Check out the ALTER INDEX pages in BOL for the various options.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 4:09 AM
Points: 38,074,
Visits: 30,368
|
|
Index rebuilds don't get written into the SQL Server error log. You could add a piece to your maintenance tasks to log that a rebuild was done if you like, or run a trace or set up an extended events session.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 1:44 AM
Points: 34,
Visits: 211
|
|
GilaMonster (10/9/2012) Index rebuilds don't get written into the SQL Server error log. You could add a piece to your maintenance tasks to log that a rebuild was done if you like, or run a trace or set up an extended events session.
Ok, so it doesn't get written into the sql server log. Nice to know Thank you very much!!
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 4:09 AM
Points: 38,074,
Visits: 30,368
|
|
Not into the SQL Server error log (text file).
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|