dbTalk Databases Forums  

simple questions from Oracle DBA

comp.databases.sybase comp.databases.sybase


Discuss simple questions from Oracle DBA in the comp.databases.sybase forum.



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

Default simple questions from Oracle DBA - 02-25-2004 , 10:32 AM






ASE 12.5.1 developer version on Linux

1. How can I extend 'master','tempdb', and other system databases?

2. I did the following to resize the existing device(belong to 'indx'
database) from 250M to 500M on the fly:

alter database indx on indx_device_1=500

it went fine. but when I checked with:

sp_helpdb indx

the output is:

indx_device_1 250MB data only
log_device_2 50MB log only
indx_device_1 250MB data only

How come it shows the same device twice?

Thanks a lot!!

Reply With Quote
  #2  
Old   
Bret Halford
 
Posts: n/a

Default Re: simple questions from Oracle DBA - 02-25-2004 , 08:05 PM






ibm_97 (AT) yahoo (DOT) com (JZ) wrote in message news:<10bc841c.0402250832.494d32f0 (AT) posting (DOT) google.com>...
Quote:
ASE 12.5.1 developer version on Linux

1. How can I extend 'master','tempdb', and other system databases?
Use the "ALTER DATABASE" command. The master database can only
be altered onto the master device.

Quote:
2. I did the following to resize the existing device(belong to 'indx'
database) from 250M to 500M on the fly:

alter database indx on indx_device_1=500

it went fine. but when I checked with:

sp_helpdb indx

the output is:

indx_device_1 250MB data only
log_device_2 50MB log only
indx_device_1 250MB data only

How come it shows the same device twice?
The command you ran there is not the right command to resize
an existing device - the command for that is DISK RESIZE.
The command you ran attempted to add 500 megabytes of space
to the indx database using available space on the indx_device
device. Resizing a device and resizing a databasae are two
different concepts.

There is a system table in the master device called sysusages,
which maps databases to their allocations on various devices.
Rows in this table are called "[device] fragments". sp_helpdb
is showing each of the device fragments belonging to the
database - there are evidently two seperate fragments on the
index_device_1 device, each at 250mb of size.

Now the question is, if you started with 250mb allocated on
this device and then altered for another 500mb, why only
2 250mb fragments?

When you use ALTER DATABASE and specify a certain size,
ASE will give you as much free space as there is on the
device up to that size. An error is only raised if there
is no free space at all. The command does tell you how
much it allocated, but it isn't necessarily obvious that
it gave you less than you asked for (it reports in pages,
not MB). So it could have been that there was only 250
mb free when you ran the alter.

Another possibility is that you were mistaken about there
being 250mb on the device originally. If the device
had 500mb free, but it wasn't contiguous, but rather there
were two 250mb areas free on the device seperated by
one or more existing fragments, your request for 500mb would
result in the two fragments in sysusages.

Hope that helps,

-bret


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.