Solved

sql2008-- index operation

Posted on 2014-01-26
2
267 Views
Last Modified: 2014-02-12
I read one of teh document for index operation in sql server, I don't understands below point by Mcsft, does it means here when I run index operation with begin or end transaction, thsi is call explicit transaction ?

4.      Do not run the online index operation in an explicit transaction. The log will not be truncated until the explicit transaction ends.

How about if I run it  below?

exec sp_MSforeachtable
  'ALTER INDEX ALL ON ? REBUILD WITH (SORT_IN_TEMPDB = ON)'
 -- force a checkpoint to reduce transaction log space used by the rebuild
 checkpoint
0
Comment
Question by:motioneye
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Aaron Shilo earned 250 total points
ID: 39811752
hi

index operations or any OTHER type of operation can be done within an EXPLICIT TRANSACTION.


an explicit transaction is when you do any sql operation within :

Begin transaction
sql...
sql...
sql...
Commit/Rollback transaction.

readup on managing transaction within sql server : http://technet.microsoft.com/en-us/library/ms188929.aspx

Aaron.
0
 
LVL 16

Assisted Solution

by:Surendra Nath
Surendra Nath earned 250 total points
ID: 39812494
You can execute the given statement within or without explicit transaction.
But putting it in a explicit transaction will reduce the performance of the index rebuild operation.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question