Resizing Sybase Database Devices

本文详细介绍了使用Sybase数据库设备扩容的过程,包括物理设备扩容和数据库设备扩容的步骤,确保了数据库运行效率和存储空间的有效利用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Resizing the database device is very simple in sybase ,only use disk resize command.But before,make sure that the physical device has enough space.If you use the file as the sybase database device,make sure that your filesystem has enough space.

1.Extend the physical device

Here used raw device in vxvm environment,the datavg group has enough space.The spw_db currently has 5GB that's full.So i want to extend it to 10GB.

  1. suse01:~ # vxassist -g datavg growto spw_db 10G 
  2. suse01:~ # blockdev --getpbsz /dev/vx/dsk/datavg/spw_db  
  3. 512 
  4. suse01:~ # blockdev --getsz /dev/vx/dsk/datavg/spw_db  
  5. 20971520 
  6. suse01:~ # echo "20971520*512/1024/1024/1024"|bc 
  7. 10 

After extend,the spw_db resized to 10GB.

2.Resizing spw_db_dev

The database spwdb was created on spw_db_dev.Extend it when the spw_db_dev is full.

  1. 1> disk resize name=spw_db_dev,size='5G' 
  2. 2> go 
  3. 1> sp_helpdevice spw_db_dev 
  4. 2> go 
  5.  device_name                                  
  6.          physical_name                                                                                        
  7.          description                                                                                                                                                                                                                                                                                                                                                                  
  8.          status                   cntrltype                            
  9.          vdevno                   ***_low                      
  10.          ***_high                          
  11.  -------------------------------------------- 
  12.          ---------------------------------------------------------------------------------------------------- 
  13.          ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  14.          ------------------------ ------------------------------------ 
  15.          ------------------------ ---------------------------- 
  16.          --------------------------------  
  17.  spw_db_dev                                   
  18.          /dev/vx/dsk/datavg/spw_db                                                                            
  19.          block device, special, dsync off, directio on, physical disk, 10240.00  
  20.          MB, Free: 5120.00 MB                                                                                                                                                                                                                                                                                  
  21.               2                           0                            
  22.               5                         0                      
  23.           5242879                          
  24.  
  25. (1 row affected) 
  26.  dbname                   size                                                 
  27.          allocated                                                                    
  28.          vstart                       lstart                    
  29.  ------------------------ ---------------------------------------------------- 
  30.          ---------------------------------------------------------------------------- 
  31.          ---------------------------- ------------------------  
  32.  spwdb                       3072.00 MB                                        
  33.          Oct 25 2012 11:01AM                                                          
  34.                0                           0                    
  35.  spwdb                       2048.00 MB                                        
  36.          Oct 25 2012 11:01AM                                                          
  37.          1572864                      786432                    
  38.  
  39. (1 row affected) 
  40. (return status = 0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值