Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

indexing online vs offline, and setting a database offline Expand / Collapse
Author
Message
Posted Tuesday, January 19, 2010 9:28 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, March 19, 2013 2:21 PM
Points: 116, Visits: 160
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
Post #849851
Posted Tuesday, January 19, 2010 9:49 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, March 14, 2014 3:15 PM
Points: 802, 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."
Post #849883
Posted Tuesday, January 19, 2010 10:09 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, March 19, 2013 2:21 PM
Points: 116, Visits: 160
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
Post #849901
Posted Tuesday, January 19, 2010 11:57 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, September 8, 2014 6:15 PM
Points: 2,278, Visits: 3,793
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.


Mohammed Moinudheen
Post #849996
Posted Tuesday, January 19, 2010 12:06 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 6:38 PM
Points: 17,628, Visits: 15,483
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #850011
Posted Tuesday, January 19, 2010 10:57 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:27 PM
Points: 35,216, Visits: 31,673
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #850239
Posted Wednesday, January 20, 2010 3:19 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, September 19, 2014 6:23 AM
Points: 1,101, Visits: 5,288
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.
Post #850336
Posted Wednesday, January 20, 2010 7:25 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, March 14, 2014 3:15 PM
Points: 802, 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."
Post #850477
Posted Wednesday, January 20, 2010 8:57 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 22, 2014 4:56 AM
Points: 1,093, Visits: 2,617
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
Post #850562
Posted Tuesday, February 2, 2010 3:06 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, May 30, 2011 6:07 AM
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.

thanks for an answer.
Post #857801
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse