Use the Structure Add Online (PROSTRCT ADDONLINE) utility to add storage areas and extents to an existing database while it is online. PROSTRCT ADDONLINE allows a database administrator to add data areas and extents, before-image areas and extents, and after-image areas and extents without incurring downtime.
PROSTRCT ADDONLINE has the following restrictions:
You can not have more than one instance of PROSTRCT ADDONLINE executing at a single time.
All connected users must have sufficient privileges to access the newly created extents. If currently connected users will not have sufficient privileges to access the new extents, you may begin the ADDONLINE, but the users must be disconnected before the ADDONLINE can complete.
PROSTRCT ADDONLINE follows this general procedure:
1. Check status of all connected users. If any connected users do not have sufficient privileges to access the new extents, you are informed of the users and the risks with proceeding. You are prompted to continue, as shown:
Usr Name Type Pid
01 usr1 Usr 1234
102 usr2 Usr 5678
...
There exist connections to the database which will have
problems opening newly added extents.
These connections may abort adding extent online later.
Do you want to continue adding extents online? (y/n)
Answer Y to continue the ADDONLINE. Answer N to abort.
2. Create the physical files associated with the extents. This is the longest step, but requires no locks so connected users are not impacted.
3. Re-check the status of all connected users. You are prompted as follows:
Usr Name Type Pid
01 usr1 Usr 1234
102 usr2 Usr 5678
...
There exist connections to the database which will have
problems opening newly added extents.
Do you wish to recheck user permissions and continue adding extents online?
Answer Y to proceed to recheck. Answer N to abort ADDONLINE.
If you answer Y, ADDONLINE will loop, performing the privilege check, and prompting you to continue as long as there are under-privileged users connected.
If any under-privileged users are connected, ADDONLINE cannot proceed. You must disconnect the users with PROSHUT, wait for them to disconnect, or cancel the ADDONLINE process.
4. Acquire the area admin lock.
5. If adding an extent to an existing data area, convert the current variable-length extent to a fixed length extent.
6. Add the new extent and size information to the area in the database control area.
7. Release the area admin lock.
If ADDONLINE fails, the newly created files are deleted.
Use the following steps to add storage areas to an existing database using PROSTRCT ADDONLINE:
1. Create a new structure description file that contains only information about the areas you want to add.
For example:
# FILE: add.st
## Add additional before-image extents
b . f 1024
b .
## Add additional extents to the "Employee" area
d "Employee":7,32;1 . f 4096
d "Employee":7,32;1 .
## Add after-image areas
a . f 512
a . f 512
a .
Note: To avoid overwriting the .st file for your existing database, the name of this .st file must be different from the existing .st file for the database. For example, name the new structure description file add.st.
2. Validate your structure definition file.
For example:
prostrct addonline service add.st -validate
Adding the -validate parameter directs PROSTRCT to check the syntax and contents of your .st file, without performing the add. For complete information on the use of the -validate parameter, see Validating structure description files.
3. Add the new areas and extents. Use the PROSTRCT Utility with the ADDONLINE qualifier, specifying the .st file you created in Step 1.
For example:
prostrct addonline service add.st
PROSTRCT ADDONLINE adds the new extents or storage areas and extents to the existing database control area, and outputs descriptive information, such as:
Formatting extents:
size area name path name
128 Primary Recovery Area /user/joe/service.b3 00:00:02
16 Primary Recovery Area /user/joe/service.b4 00:00:02
4096 Employee /user/joe/service_7.d5 00:00:02
32 Employee /user/joe/service_7.d6 00:00:04
64 After Image Area 10 /user/joe/service.a10 00:00:00
64 After Image Area 11 /user/joe/service.a11 00:00:00
16 After Image Area 12 /user/joe/service.a12 00:00:00
Enabling extents:
size area name path name (13170)
128 Primary Recovery Area /user/joe/service.b3 00:00:00
16 Primary Recovery Area /user/joe/service.b4 00:00:00
4096 Employee /user/joe/service_7.d5 00:00:00
32 Employee /user/joe/service_7.d6 00:00:00
64 After Image Area 10 /user/joe/service.a10 00:00:01
64 After Image Area 11 /user/joe/service.a11 00:00:00
16 After Image Area 12 /user/joe/service.a12 00:00:00
4. Generate an update structure definition file for your database PROSTRCT LIST.
For example:
prostrct list service service.st
After you modify the structure of your database (adding or removing extents), run PROSTRCT LIST. PROSTRCT LIST automatically creates a structure description file for your database if one does not exist, or overwrites an existing .st file of the same name to reflect the changes you just made to the structure of your database.