Add Devices to Sybase Database
Mögliche Fehlermeldung:
Critical rmx111 SEGMENT FULL ALERT for 'default' in DB 'SAS', '524288', '0'
# vxdg -g sybasedg free
DISK DEVICE TAG OFFSET LENGTH FLAGS sybase_0_44 EMC0_44 EMC0_44 10066432 7539456 - sybase_0_45 EMC0_45 EMC0_45 10066432 7539456 - sybase_0_46 EMC0_46 EMC0_46 10066432 7539456 - sybase_0_47 EMC0_47 EMC0_47 10066432 7539456 - sybase_0_48 EMC0_48 EMC0_48 10066432 7539456 -
-- Als Muster: größe eines vorherigen Volume.
v sasdata9 - ENABLED ACTIVE 10485760 SELECT sasdata9-01 fsgen pl sasdata9-01 sasdata9 ENABLED ACTIVE 10485760 STRIPE 5/256 RW sd sybase_0_44-06 sasdata9-01 sybase_0_44 7969280 2097152 0/0 EMC0_44 ENA sd sybase_0_45-06 sasdata9-01 sybase_0_45 7969280 2097152 1/0 EMC0_45 ENA sd sybase_0_46-06 sasdata9-01 sybase_0_46 7969280 2097152 2/0 EMC0_46 ENA sd sybase_0_47-06 sasdata9-01 sybase_0_47 7969280 2097152 3/0 EMC0_47 ENA sd sybase_0_48-06 sasdata9-01 sybase_0_48 7969280 2097152 4/0 EMC0_48 ENA
-- zur info: echo "10485760/2" |bc = 5242880 = ca.5GB
-- Nächste freie Volume ist „sasdata10“.
# vxassist -g sybasedg make sasdata10 10485760 layout=stripe ncol=5 stripewidth=256 user=sybase group=sybase
# vxdg -g sybasedg free
DISK DEVICE TAG OFFSET LENGTH FLAGS sybase_0_44 EMC0_44 EMC0_44 12163584 5442304 - sybase_0_45 EMC0_45 EMC0_45 12163584 5442304 - sybase_0_46 EMC0_46 EMC0_46 12163584 5442304 - sybase_0_47 EMC0_47 EMC0_47 12163584 5442304 - sybase_0_48 EMC0_48 EMC0_48 12163584 5442304 -
# cd /dev/opt/sybase/SASP/
# chmod g+rw /dev/vx/rdsk/sybasedg/sasdata10
# ln -s /dev/vx/rdsk/sybasedg/sasdata10
sybase@: isql -S SASB -U xxxxx -w 999 -Dmaster
-- Info: Max. einstellbare Devdevices Nummer.
1> sp_configure devices
2> go
Parameter Name Default Memory Used Config Value Run Value ------------------------------ ----------- ----------- ------------ ----------- number of devices 10 #16 40 40
-- letzte frei dev Nummer, also hier die Nummer 35
1> select distinct low/16777216 from sysdevices order by low
2> go
[...] 31 32 33 34 (35 rows affected)
-- zur info: echo “10485760/2/2”|bc = 2621440 = ca.5GB
oder
-- zur info: echo "5242880/2" |bc = 2621440
1> disk init name = "sasdata10", physname="/dev/opt/sybase/SASP/sasdata10", vdevno=35,size=2621440
2> go
1> alter database SAS on sasdata10 = 2621440
2> go
Extending database by 2621440 pages on disk sasdata10
1> use SAS
2> go
1> sp_helpdb SAS
2> go
name db_size owner dbid created status ------------------------ ------------- ------------------------ ------ -------------- ----------------------------------------------- ------------------------------------------------------- SAS 89040.0 MB sa 4 Feb 22, 2007 select into/bulkcopy/pllsort, trunc log on chkp t, abort tran on log full (1 row affected) device_fragments size usage free kbytes ------------------------------ ------------- -------------------- ---------------- sasdata1 1000.0 MB data only 2394 sasdata1 2000.0 MB data only 574 sasdata1 2288.0 MB data only 26866 sasdata1 4096.0 MB data only 8458 sasdata1 7000.0 MB data only 10696 sasdata10 5120.0 MB data only 5242880 sasdata2 4096.0 MB data only 60086 sasdata2 4096.0 MB data only 174654 sasdata2 8192.0 MB data only 162960 sasdata3 4096.0 MB data only 294 sasdata4 4096.0 MB data only 43050 sasdata5 4096.0 MB data only 46242 sasdata6 2048.0 MB data only 124956 sasdata7 5120.0 MB data only 54740 sasdata8 5120.0 MB data only 65786 sasdata9 5120.0 MB data only 627302 sasindex 4096.0 MB data only 7552 sasindex1 4096.0 MB data only 57358 sasindex2 2048.0 MB data only 8578 sasindex3 2048.0 MB data only 304022 sasindex4 5120.0 MB data only 4835946 saslog 250.0 MB log only not applicable saslog 1750.0 MB log only not applicable saslog 2048.0 MB log only not applicable -------------------------------------------------------------- log only free kbytes = 4128958 device segment ------------------------------ ------------------------------------------------------------------------------------------ sasdata1 default sasdata1 indexsegment sasdata1 system sasdata10 default sasdata10 system sasdata2 datasegment sasdata2 default sasdata3 default sasdata4 default sasdata5 default sasdata6 datasegment sasdata7 datasegment
sasdata7 default sasdata8 datasegment sasdata8 default sasdata9 datasegment sasdata9 default sasindex default sasindex indexsegment sasindex1 default sasindex2 default sasindex2 indexsegment sasindex3 indexsegment sasindex4 indexsegment saslog logsegment (return status = 0)
-- das neu Device aus segment system herausnehmen oder hinzufügen (sp_extendsegment datasegment,…)
1> sp_dropsegment system,SAS,sasdata10
2> go
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role. Segment reference to device dropped. (return status = 0)
1> sp_helpdb SAS
2> go
name db_size owner dbid created status ------------------------ ------------- ------------------------ ------ -------------- ----------------------------------------------- ------------------------------------------------------- SAS 89040.0 MB sa 4 Feb 22, 2007 select into/bulkcopy/pllsort, trunc log on chkp t, abort tran on log full (1 row affected) device_fragments size usage free kbytes ------------------------------ ------------- -------------------- ---------------- sasdata1 1000.0 MB data only 2394 sasdata1 2000.0 MB data only 574 sasdata1 2288.0 MB data only 26866 sasdata1 4096.0 MB data only 8458 sasdata1 7000.0 MB data only 10696 sasdata10 5120.0 MB data only 5242880 sasdata2 4096.0 MB data only 60086 sasdata2 4096.0 MB data only 174654 sasdata2 8192.0 MB data only 162960 sasdata3 4096.0 MB data only 294 sasdata4 4096.0 MB data only 43050 sasdata5 4096.0 MB data only 46242 sasdata6 2048.0 MB data only 124956 sasdata7 5120.0 MB data only 54740 sasdata8 5120.0 MB data only 65786 sasdata9 5120.0 MB data only 627302 sasindex 4096.0 MB data only 7552 sasindex1 4096.0 MB data only 57358 sasindex2 2048.0 MB data only 8578 sasindex3 2048.0 MB data only 304022 sasindex4 5120.0 MB data only 4835946 saslog 250.0 MB log only not applicable saslog 1750.0 MB log only not applicable saslog 2048.0 MB log only not applicable ------------------------------------------------------------- log only free kbytes = 4128958 device segment ------------------------------ ------------------------------------------------------------------------------------------ sasdata1 default sasdata1 indexsegment sasdata1 system sasdata10 default sasdata2 datasegment sasdata2 default sasdata3 default sasdata4 default sasdata5 default sasdata6 datasegment sasdata7 datasegment sasdata7 default sasdata8 datasegment sasdata8 default sasdata9 datasegment sasdata9 default sasindex default sasindex indexsegment sasindex1 default sasindex2 default sasindex2 indexsegment sasindex3 indexsegment sasindex4 indexsegment saslog logsegment (return status = 0)