dbTalk Databases Forums  

URGENT HELP! How to add space when sp_rpm_spaceleft reports full

comp.databases.sybase comp.databases.sybase


Discuss URGENT HELP! How to add space when sp_rpm_spaceleft reports full in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy
 
Posts: n/a

Default URGENT HELP! How to add space when sp_rpm_spaceleft reports full - 07-20-2004 , 07:08 PM






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.

My question:

How do I add space to a Sybase database to stop these errors and allow
the application to continue?

Please bear in mind my complete lack of experience, and give me a
step-by-step starting with connecting to the database etc.

Help very much appreciated.

Reply With Quote
  #2  
Old   
Michael Peppler
 
Posts: n/a

Default Re: URGENT HELP! How to add space when sp_rpm_spaceleft reports full - 07-21-2004 , 01:41 AM






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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.