dbTalk Databases Forums  

information regarding devices

comp.databases.sybase comp.databases.sybase


Discuss information regarding devices in the comp.databases.sybase forum.



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

Default information regarding devices - 12-11-2003 , 05:44 AM






Hi Friends,

Please help me out to get the procedure which gives me the name of all
databases created on any particular device.

For eg sp__devdb finseg1

Database Name
------------
Sample1
Sample2
--
--
Sample5

where 'finseg1' is the name of the device .

Here it indicated that database 'Sample1',Sample2 etc created on
finseg1 device

Regards

Reply With Quote
  #2  
Old   
Carl Kayser
 
Posts: n/a

Default Re: information regarding devices - 12-11-2003 , 06:24 AM






I think that you really mean "give me the name of any database which uses
any space on <particular device>". (It's common to distribute databases on
multiple devices although this depends upon the nature of your storage
hardware & software.)

Do you want just a simple list? Or an indicator of how many fragments (per
database) there are on <particular device>? With space & usage type per
fragment? Or a map of the device space - including unallocated space? The
last may depend upon naming conventions and your OS. I do this but the code
is only good for Solaris raw partitions without symbolic links.


"Lalit" <issues_sybase (AT) hotmail (DOT) com> wrote

Quote:
Hi Friends,

Please help me out to get the procedure which gives me the name of all
databases created on any particular device.

For eg sp__devdb finseg1

Database Name
------------
Sample1
Sample2
--
--
Sample5

where 'finseg1' is the name of the device .

Here it indicated that database 'Sample1',Sample2 etc created on
finseg1 device

Regards



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

Default Re: information regarding devices - 12-11-2003 , 08:29 AM



issues_sybase (AT) hotmail (DOT) com (Lalit) wrote in message news:<7bcd3933.0312110344.7de729cc (AT) posting (DOT) google.com>...
Quote:
Hi Friends,

Please help me out to get the procedure which gives me the name of all
databases created on any particular device.

For eg sp__devdb finseg1

Database Name
------------
Sample1
Sample2
--
--
Sample5

where 'finseg1' is the name of the device .

Here it indicated that database 'Sample1',Sample2 etc created on
finseg1 device

Regards

select db_name(u.id)
from sysusages u, sysdevices d
where d.name = "fineseg1"
and sysusages.vstart between d.low and d.high


Reply With Quote
  #4  
Old   
Carl Kayser
 
Posts: n/a

Default Re: information regarding devices - 12-11-2003 , 09:02 AM




"Bret Halford" <bret (AT) sybase (DOT) com> wrote in message

(SNIP)news:34c88f2b.0312110629.4094fabf (AT) posting (DOT) google.com...
Quote:
select db_name(u.id)
from sysusages u, sysdevices d
where d.name = "fineseg1"
and sysusages.vstart between d.low and d.high

You may (or may not) want "select distinct ..." Also "master.dbo.sysusages
u, ..."

You do want "db_name (u.dbid)" and "and u.vstart ..."




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.