DEFINITIONS

Definitions More Info.
Definition ID676
TitleSQL
CategoryNOTES
DefinitionSetting an option on all indexes on a table, tum indexlerdeki option ayni anda set etme
Definition Descriptionhttps://msdn.microsoft.com/en-US/library/ms186253(v=sql.90).aspx The following example disallows row locks on all indexes associated with the Product table. The sys.indexes catalog view is queried before and after executing the sp_indexoption procedure to show the results of the statement. USE AdventureWorks; GO --Display the current row and page lock options for all indexes on the table. SELECT name, type_desc, allow_row_locks, allow_page_locks FROM sys.indexes WHERE object_id = OBJECT_ID(N'Production.Product'); GO -- Set the disallowrowlocks option on the Product table. EXEC sp_indexoption N'Production.Product', N'disallowrowlocks', TRUE; GO --Verify the row and page lock options for all indexes on the table. SELECT name, type_desc, allow_row_locks, allow_page_locks FROM sys.indexes WHERE object_id = OBJECT_ID(N'Production.Product'); GO
RecordBycunay
Record Date20-10-2015 14:24:47
Düzenle
Kopyala
Sil