SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


how to Create index online?


how to Create index online?

Author
Message
anzz
anzz
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3459 Visits: 719
Below is the script for creating index and how can I change the script to create index onlie?

what are benfits and disadvangates of online and offile?

CREATE NONCLUSTERED INDEX [_dta_index_dClientCode_16_437576597__K7_K3_1] ON [dbo].[dClientCode]
(
[ClientGenericId] ASC,
[Code] ASC
)
INCLUDE ( [ClientCodeId]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [Data_Data]
Ninja's_RGR'us
Ninja's_RGR'us
SSC Guru
SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)

Group: General Forum Members
Points: 154354 Visits: 9672
ONLINE = didn't ring a bell?



Just a FYI, dta is a bad tool to do performance tuning. This is what I do :

http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/
http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-2/
anzz
anzz
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3459 Visits: 719
How to modify the above script for creating index online.
Ninja's_RGR'us
Ninja's_RGR'us
SSC Guru
SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)SSC Guru (154K reputation)

Group: General Forum Members
Points: 154354 Visits: 9672
What didn't you understand in my previous post?

What part of ONLINE = SOMETHING OTHER THAN OFF GOES HERE are you having troubles with?
Syed Jahanzaib Bin hassan
Syed Jahanzaib Bin hassan
SSCertifiable
SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)

Group: General Forum Members
Points: 6324 Visits: 481
CREATE NONCLUSTERED INDEX [_dta_index_dClientCode_16_437576597__K7_K3_1] ON [dbo].[dClientCode]
(
[ClientGenericId] ASC,
[Code] ASC
)
INCLUDE ( [ClientCodeId]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = ON) ON [Data_Data]

Use online= off recommended,some indexes will not create with online option ON

Regards,
Syed Jahanzaib Bin Hassan
BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA

My Blog
www.aureus-salah.com
tlunsf
tlunsf
SSC Rookie
SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)

Group: General Forum Members
Points: 37 Visits: 61
Ninja's_RGR'us (5/26/2011)
What didn't you understand in my previous post?

What part of ONLINE = SOMETHING OTHER THAN OFF GOES HERE are you having troubles with?


It is comments like this that makes me shy away from this site. It is completely unnecessary. For those who care to know a more appropriate response, something this would have been more effective:

"Take a closer look at my previous comments in regard to ONLINE. If you still don't understand, then please provide very specific details about what you don't understand, and I'll try to help."
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)

Group: General Forum Members
Points: 93861 Visits: 20673
tlunsf (3/28/2014)
Ninja's_RGR'us (5/26/2011)
What didn't you understand in my previous post?

What part of ONLINE = SOMETHING OTHER THAN OFF GOES HERE are you having troubles with?


It is comments like this that makes me shy away from this site. It is completely unnecessary. For those who care to know a more appropriate response, something this would have been more effective:

"Take a closer look at my previous comments in regard to ONLINE. If you still don't understand, then please provide very specific details about what you don't understand, and I'll try to help."

Good point!
Steve Jones
Steve Jones
SSC Guru
SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)

Group: Administrators
Points: 329358 Visits: 20109
Apologies and hope things are working for you.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)

Group: General Forum Members
Points: 93861 Visits: 20673
Ranzz (5/26/2011)
Below is the script for creating index and how can I change the script to create index onlie?

what are benfits and disadvangates of online and offile?

CREATE NONCLUSTERED INDEX [_dta_index_dClientCode_16_437576597__K7_K3_1] ON [dbo].[dClientCode]
(
[ClientGenericId] ASC,
[Code] ASC
)
INCLUDE ( [ClientCodeId]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [Data_Data]


An online index (build) allows access / modification of the data while the index maintenance operations take place. It is (correct me if I'm wrong) an Enterprise feature. To create an online index, set the ONLINE flag to ONLINE = ON.

I cannot think of any disadvantages but the price of the Enterprise edition Cool
Steve Jones
Steve Jones
SSC Guru
SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)SSC Guru (329K reputation)

Group: Administrators
Points: 329358 Visits: 20109
Yes, Enterprise Edition only

http://technet.microsoft.com/en-us/library/cc645993.aspx#Scalability

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
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