Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


indexing online vs offline, and setting a database offline


indexing online vs offline, and setting a database offline

Author
Message
klineandking
klineandking
SSC-Enthusiastic
SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)

Group: General Forum Members
Points: 118 Visits: 164
Good morning people, my questions is about reorganizing or rebuilding indexes online vs offline, i do not know what this actually means or how its done. and my next question is what would be the reasons for taking a database offline
The_SQL_DBA
The_SQL_DBA
SSC Eights!
SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)

Group: General Forum Members
Points: 808 Visits: 935
klineandking (1/19/2010)
Good morning people


Very good morning ;-)


my questions is about reorganizing or rebuilding indexes online vs offline, i do not know what this actually means or how its done


1.Index rebuild works by re-creating the index internally again and when that has been achieved, it drops the existing index where as index reorganize is the process of physically re-organizing the leaf nodes of the index.

2.During the index rebuild process, the statistics are also re-computed – same as when a new index gets created. Reorganize on the other hand does not update the statistics. Reorganize essentially just swaps one page with another and thus does not require free space for this operation like rebuild does. Infact, reorganize can free up some pages as it does the reorg in two phases – compaction and defrag.

3. Online Rebuilds of Indexes are supported in Enterprise Edition only..


and my next question is what would be the reasons for taking a database offline


Depends on what you are trying to do?

HTH...

The_SQL_DBA
MCTS

"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."
klineandking
klineandking
SSC-Enthusiastic
SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)

Group: General Forum Members
Points: 118 Visits: 164
Thank you for the reply i appreciate it i would like to know what does the online option on/off do, and what are the possible reasons for taking a database offline and when would i need to do that thanks
M&M
M&M
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2597 Visits: 3898
There was once when I had to restore a database.

Due to some reason, connections continued to persist on this database because of which I couldn't restore.

To overcome this, took the database offline and then performed the restore. :-)

M&M
SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21153 Visits: 18259
klineandking (1/19/2010)
Thank you for the reply i appreciate it i would like to know what does the online option on/off do, and what are the possible reasons for taking a database offline and when would i need to do that thanks


Here is something that may help to explain it:
http://blogs.techrepublic.com.com/datacenter/?p=249


Online and offline index rebuilds are not related to the database being offline. Rebuilding online allows for less intrusive behavior by the rebuild process so that users may continue to use the database. Rebuilding the index otherwise can cause heavy blocking on the tables while the indexes are rebuilt.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45448 Visits: 39946
And just so you know, rebuilding indexes using the "Online" option is only an option in the Enterprise and Developer's (Enterprise with very limited licensing) Editions.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Suresh B.
Suresh B.
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1128 Visits: 5326
klineandking (1/19/2010)
Thank you for the reply i appreciate it i would like to know what does the online option on/off do, and what are the possible reasons for taking a database offline and when would i need to do that thanks


If you want to move database files from one drive to another, you need to take the database offline.
The_SQL_DBA
The_SQL_DBA
SSC Eights!
SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)

Group: General Forum Members
Points: 808 Visits: 935
mohammed moinudheen (1/19/2010)
There was once when I had to restore a database.

Due to some reason, connections continued to persist on this database because of which I couldn't restore.

To overcome this, took the database offline and then performed the restore. :-)


Also,you could have gone with the option of putting the database in Single_User mode-->end your own connection --> put the database back to multi_user mode. This is to ensure no connections are active and you can do your restore.

The_SQL_DBA
MCTS

"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."
Richard M.
Richard M.
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1116 Visits: 2669
Jeff Moden (1/19/2010)
And just so you know, rebuilding indexes using the "Online" option is only an option in the Enterprise and Developer's (Enterprise with very limited licensing) Editions.


..... and in order to be bale to do the online indexing, the tables cannot contain: XML index, Spatial index, Large object data type columns (image, text, ntext, varchar(max), nvarchar(max), varbinary(max), and xml) in which case you need to do an offline reindexing (which does not mean taking the database off-line...)

_______________________________________________________________________
For better assistance in answering your questions, click here
g.graetz
g.graetz
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 59
Richard M. (1/20/2010)
Jeff Moden (1/19/2010)
And just so you know, rebuilding indexes using the "Online" option is only an option in the Enterprise and Developer's (Enterprise with very limited licensing) Editions.


..... and in order to be bale to do the online indexing, the tables cannot contain: XML index, Spatial index, Large object data type columns (image, text, ntext, varchar(max), nvarchar(max), varbinary(max), and xml) in which case you need to do an offline reindexing (which does not mean taking the database off-line...)

..and what we can do instead ?
we have navision 4.0 sp3 with many tables who have clustered indexes
and columns with data typ image etc.
we must accomplish an 24x7 manufacturing plant, there is no offline possible.w00t

thanks for an answer.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search