Educational Materials like Computer, engineering, software and Property , Entertainment: re-indexes all the tables using DBCC BREINDEX command
Custom Search

Subscribe Now: Feed Icon

Addthis Sharing Gadget

January 13, 2012

re-indexes all the tables using DBCC BREINDEX command

Axapta Code solutions   Education and Entertainments  Earn Money its Real  Experience of knowledge  Imortant Weblink collections   Fun and Entertainment   God thoughts   Get Ways to Invest your money   Products overview and details

Summary:
re-indexes all the tables using DBCC BREINDEX command.
This goes and re-indexes all the tables and takes about 7 minutes and make an improvement of 10%

Details:

USE DbName_1 --Enter the name of the database you want to reindex totally
DECLARE @TableName varchar(255) 
DECLARE TableCursor CURSOR FOR 
SELECT YourTableName FROM information_schema.tables 
WHERE table_type = 'base table' 
OPEN TableCursor 
FETCH NEXT FROM TableCursor INTO @TableName 
WHILE @@FETCH_STATUS = 0 
BEGIN 
DBCC DBREINDEX(@TableName,' ',100) 
FETCH NEXT FROM TableCursor INTO @TableName 
END 
CLOSE TableCursor 
DEALLOCATE TableCursor

0 comments:

Post a Comment

Follow by Email

Video Bar

Loading...

Followers

Educational Materials like Computer, engineering, software and Property , Entertainment

Recent Visitors

Active Search Results
Wink Bingo | Slots Tips | Football manager 2010 | blackjack free | Poker Stars
Submitdomainname.com Free Search Engine SubmissionLink Building Service