UnlockObject (Dimension Interface)
Примечание. |
---|
В следующей версии Microsoft SQL Server эта возможность будет удалена. Не используйте ее при работе над новыми приложениями и как можно быстрее измените приложения, в которых она в настоящее время используется. |
The UnlockObject method of the Dimensioninterface releases a lock on a dimension object previously established by the LockObject method.
Applies To:clsDatabaseDimension
Синтаксис
object.UnlockObject
Замечания
- object
The Dimension object to unlock.
Замечания
Calling the UnlockObject method without first calling the LockObject method raises an error.
Пример
The following example locks the Product dimension of the FoodMart 2000 database, completely reprocesses it, and then unlocks it so others make changes:
Dim dsoServer As New DSO.Server
Dim dsoDB As DSO.MDStore
Dim dsoDim As DSO.Dimension
' Connect to local Analysis server.
dsoServer.Connect "LocalHost"
' Open FoodMart 2000 database.
Set dsoDB = dsoServer.MDStores("FoodMart 2000")
' Open the Product dimension.
Set dsoDim = dsoDB.Dimensions("Product")
' Lock the dimension for processing.
dsoDim.LockObject olapLockProcess, "Locked for processing."
' Completely reprocess the dimension.
dsoDim.Process processFull
' Once complete, unlock the dimension.
dsoDim.UnlockObject
' Clean up.
Set dsoDim = Nothing
Set dsoDB = Nothing
dsoServer.CloseServer
Set dsoServer = Nothing
См. также
Справочник
Dimension Interface
LockObject (Dimension Interface)