Reg: Area Creation

Hi Everybody,
I guess its a silly question but i have not worked much on database related works,

1) How to get the size of an Area?
2) I have a database already defined, say "payroll" which has 5 Areas defined already. Now i need to add a new Area, say "payroll_idx". What are the steps to be done?

Thanks in advance.
 
"Size" depends on what you need to know. You could use OS tools like "ls -l" if you need to know the amount of disk space being taken. Or you could use "prostrct list" if you need to know the allocated size from a Progress perspective. Or you might want to use "proutil dbanalys" if you want to know how much data is actually in the storage area.

To create a new area you define it in a .st file (use "prostrct list" to get the most current description of your db structure -- it may serve as a useful guide) and then use "prostcrt add". You can then place new objects in it when you create them in the data dictionary or you can use the "proutil tablemove" and "indexmove" commands to move existing objects (moving existing objects that are large can take a substantial amount of time and grow your bi file very considerably).
 
Hi Tom,
Thanks for your quick response. I meant the maximum size allocated for a particular Area. As per your comment i guess if i use "prostrct list" i will get the details that i want. Please correct me if i am wrong.

Thanks for showing me the rights path to work on.
 
1) to check a real occuped size try:

proutil [database] -C dbanalys > dbanalys.txt

To add a new area
2.1) update the database structure file, example on sports2000:

#
b ./sports2000.b1
#
d "Schema Area":6,32;1 ./sports2000.d1
#
d "Employee":7,32;1 ./sports2000_7.d1 f 320
d "Employee":7,32;1 ./sports2000_7.d2
#
d "Inventory":8,32;1 ./sports2000_8.d1 f 640
d "Inventory":8,32;1 ./sports2000_8.d2
#
d "Cust_Data":9,32;1 ./sports2000_9.d1 f 320
d "Cust_Data":9,32;1 ./sports2000_9.d2
#
d "Cust_Index":10,32;1 ./sports2000_10.d1 f 320
d "Cust_Index":10,32;1 ./sports2000_10.d2
#
d "Order":11,32;1 ./sports2000_11.d1 f 1280
d "Order":11,32;1 ./sports2000_11.d2
#
d "Misc":12,32;1 ./sports2000_12.d1 f 320
d "Misc":12,32;1 ./sports2000_12.d2

note the last counter -> 12

create a file named: add.st with this content:
#
d "payroll_idx":13,32;512 ./sports2000_13.d1 f 1024
d "payroll_idx":13,32;512 ./sports2000_13.d2

the first extent is fixed size -> 1024 = 1 Mb and the last extent is variable.


save this file add.st and use:
prostrct add [dbname] add.st
 
Back
Top