變更分割區
MaxL alter partition 敘述句可協助您修正無效或懸置的 Essbase 分割區參照、變更可連線至這兩個立方體的授權使用者,或在移動或重新命名項目時變更應用程式、立方體或主機名稱。
關鍵字
- alter...partition...set 連線
-
變更授權存取分割立方體的使用者。
- alter...partition...set 主機名稱
-
編輯分割區定義,以包含正確的分割區來源立方體、目標立方體或兩者 URL。
- alter...partition...set application 設定為
-
編輯分割區定義,以包含更正的應用程式名稱。這在一個應用程式名稱變更時很有用;如果兩個應用程式名稱都變更,分割區定義就無法更正,您必須重新建立。
- alter...partition... 將資料庫設定為
-
編輯分割區定義以包含更正的立方體名稱。這在一個立方體名稱變更時非常有用;如果兩個立方體名稱都變更,就無法更正分割區定義,而且您必須重新建立。
- alter...partition...direction single
-
請參閱範例 2 和 5。
- alter...partition...direction all
-
請參閱範例 3、4 和 6。
注意
-
第一個 DBS-NAME 為本端立方體,第二個 DBS-NAME 為遠端立方體。
-
將分割區導向遠端位置表示目前的立方體是來源。從遠端站台建立分割區表示目前的立方體是目標。
-
若要變更授權的分割區使用者,您必須變更這兩個分割立方體的使用者,如範例 1 所示。
-
如果已重新命名分割的主機、應用程式或立方體,則重新命名不會傳輸到分割區定義,因此您必須使用更改分割區來變更分割區定義中的名稱。您必須提供舊名稱與新名稱。如果這兩個名稱都已變更,就無法復原分割區定義,而且必須重新建立。異常狀況:可以在來源和目標上更新主機名稱,如範例 4 所示。
範例 1 – 變更分割區使用者
下列範例會變更授權存取分割立方體的使用者。
/* To change authorized partition user on target, log in to source & then use: */
alter transparent partition app1.source to app2.target
set connect as newuser identified by newpasswd;
/* To change authorized partition user on source, log in to target & then use: */
alter transparent partition app2.target from app1.source
set connect as newuser identified by newpasswd;範例 2 – 更新目標的一個主機名稱
在下列範例中,alter partition 是用來修正當 URL 變更且只影響一半分割區定義 (app2.target) 時變成無效的分割區定義:
alter transparent partition app1.source to app2.target at "https://myserver1.example.com:9001/essbase/agent"
set hostname as "https://myserver2.example.com:9001/essbase/agent" instead of "https://myserver1.example.com:9001/essbase/agent" direction single;其中 direction single 表示只需要變更目標 URL。
範例 3 – 更新來源和目標的一個主機名稱
在下列範例中,alter partition 用於修正當某個主機名稱變更同時影響來源和目標時變成無效的分割區定義,因為這兩個應用程式都位於相同的主機上:
alter transparent partition app1.source to app1.target at "https://myserver2.example.com:9001/essbase/agent"
set hostname as "https://myserver2.example.com:9001/essbase/agent" instead of "https://myserver1.example.com:9001/essbase/agent" direction all;其中 direction all 表示需要在分割區定義的目標和來源半部進行主機名稱變更。
範例 4 – 更新來源和目標的主機名稱
在下列範例中,當目標和來源立方體 (位於不同的主機上) 都移至相同的新主機時,alter partition 會用來修正變成無效的分割區定義:
alter transparent partition app1.target from app2.source set hostname as "https://myserver3.example.com:9001/essbase/agent" instead of "https://myserver1.example.com:9001/essbase/agent" direction all;或者
alter transparent partition app1.target from app2.source set hostname as "https://myserver3.example.com:9001/essbase/agent" instead of "https://myserver2.example.com:9001/essbase/agent" direction all;其中 direction all 表示需要在分割區定義的目標和來源半部進行主機名稱變更。
範例 5 – 更新來源應用程式名稱
在下列範例中,alter partition 用於修正當來源應用程式名稱 (oldAppName) 變更為 newAppName,且僅影響一半的分割區定義時變成無效的分割區定義:
alter transparent partition newAppName.source to app2.target
set application as newAppName instead of oldAppName direction single;其中 direction single 表示只需要更正一半的分割區定義。
附註:
在更正分割區定義之前,可以先發出 display partition 敘述句來尋找舊的應用程式名稱。
範例 6 – 更新來源與目標的應用程式名稱
在下列範例中,alter partition 用於修正當來源應用程式名稱 (oldAppName) 變更為 newAppName 時變成無效的分割區定義,以及因為兩個分割的立方體都在同一個應用程式上,所以受影響的分割區定義兩半:
alter transparent partition newAppName.source to newAppName.target
set application as newAppName instead of oldAppName direction all;其中 direction single 表示必須更正這兩半的分割區定義。
