On Tue, 20 Jul 2004 17:08:34 -0700, Andy wrote:
Quote:
Our Sybase dba resigned recently, and nobody else has any experience.
The guy he handed over to is off today, so it's left to me.
I am a complete novice with Sybase, I have never logged into a Sybase
database in my life. However, I am an experienced Oracle DBA so should
be able to find my way around. There is only one Sybase database, but
it's doing Replication, I think it's V12.5.
The problem:
A user has phoned up and says that they are getting error messages
from their application, and when they run (or an automatic script
runs) the sp_rpm_spaceleft procedure it reports 99.7% full. |
sp_rpm_spaceleft isn't a Sybase system procedure that I'm aware of, so it
is likely that this is something that the previous DBA wrote and
installed (not that it really matters - you still need to find additional
space for your DB)
Quote:
My question:
How do I add space to a Sybase database to stop these errors and allow
the application to continue? |
To add space to a database you need to extend it pn a disk device. The
syntax is
alter database <dbname> on <device_name> = <size in MB>
First though you need to either create a new disk device, or find an
existing one with space available.
To list all existing disk devices run:
sp_helpdevice
This will list all of the devices.
To create a new disk device you use:
disk init name="<logical device_name>", physname="<path to device>",
size=<size>
where <size> defaults to a number of pages, but can also be specified as
kilobytes (add trailing "k"), megabytes (trailing "m") or gigabytes
(trailing "g").
In order to add a disk device you must have a free "vdevno" value. Check
this with "sp_monitorconfig 'devices'" which will tell you how many
devices have been allocated, and how many are in use:
1> sp_monitorconfig 'devices'
2> go
Usage information at date and time: Jul 20 2004 11:36PM.
Name Num_free Num_active Pct_act Max_Used Reused
------------------------- ----------- ----------- ------- ----------- ------
number of devices 0 25 100.00 25 NA
(return status = 0)
In this case I don't have any free devices, so I'd need to increase the
configuration value "number of devices":
1> sp_configure 'number of devices', 26
2> go
You probably also want to read a little about this in the Sybase Commands
Reference manual:
http://sybooks.sybase.com/onlinebook...eric__BookView
Good luck!
Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler (AT) peppler (DOT) org http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.peppler.org/resume.html