Alter Partition

Fix invalid or dangling partition references. Change the authorized user who can connect to both databases. Change the name of an application, database, or host (in the event that something was renamed).

Syntax

Notes

Examples

Example 1

The following example changes the user authorized to access the partitioned databases.

/* 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;

Example 2

In the following example, alter partition is used to fix a partition definition that became invalid when a host name (oldHost) changed and affected only one half of the partition definition (app2.target):

alter transparent partition app1.source to app2.target at oldHOST 
     set hostname as newHOST instead of oldHOST direction single;

where direction single indicates that only the target host name needs to be changed.

Example 3

In the following example, alter partition is used to fix a partition definition that became invalid when a host-name change affected both the source and the target, because both applications were on the same host:

alter transparent partition app1.source to app1.target at newHOST 
     set hostname as newHOST instead of oldHOST direction all;

where direction all indicates that the host-name change needs to be made on both the target and source halves of the partition definition.

Example 4

In the following example, alter partition is used to fix a partition definition that became invalid when the source application name (oldAppName) changed to newAppName, and affected only one half of the partition definition:

alter transparent partition newAppName.source to app2.target  
    set application as newAppName instead of oldAppName direction single;

where direction single indicates that only one half of the partition definition needs to be corrected.

Note: The old application name can be discovered by issuing the display partition statement prior to correcting the partition definition.

Example 5

In the following example, alter partition is used to fix a partition definition that became invalid when the source application name (oldAppName) changed to newAppName, and affected both halves of the partition definition because both partitioned databases were on the same application:

alter transparent partition newAppName.source to newAppName.target  
     set application as newAppName instead of oldAppName direction all;

where direction single indicates both halves of the partition definition need to be corrected.

Descriptions

Use alter partition to edit partitions in the following ways:

Key Phrase Explanation
...set connect Change the user authorized to access the partitioned databases.
...set hostname Edit the partition definition to include the correct computer name that hosts the partition source database, target database, or both.
...set application as Edit the partition definition to include a corrected application name. This is useful if one application name was changed; if both application names changed, the partition definition cannot be corrected and you must re-create it.
...set database as Edit the partition definition to include a corrected database name. This is useful if one database name was changed; if both database names changed, the partition definition cannot be corrected and you must re-create it.
...direction single See Examples 2, 4, and 5.
...direction all See Example 3.

©2004 Hyperion Solutions Corporation. All Rights Reserved.
http://www.hyperion.com