Solved

sql2008-- index operation

Posted on 2014-01-26
2
272 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 eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

691 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