If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Map databases to dbspaces ---> please help!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-21-02, 19:23
dnix dnix is offline
Registered User
 
Join Date: Sep 2002
Posts: 51
Map databases to dbspaces ---> please help!

Hi,
Anyone tell me how to easily make a list of all of the dbspaces used by a database? ANd just in case anyone knows this one, I already tried:

select b.dbsname, a.name from sysdbspaces a, systabnames b where a.dbsnum= partdbsnum(b.partnum) and b.tabname="systables"

But it only lists one dbspace for a database that I know has many.

-thanks
dnix
__________________
When in doubt just ask your self,
-WWSBD?-
(what would Sponge Bob do?)
Reply With Quote
  #2 (permalink)  
Old 10-22-02, 00:51
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Try the following:

select dbinfo("DBSPACE",partnum) dbspace,
name database
from sysdatabases
order by name, dbspace;
Reply With Quote
  #3 (permalink)  
Old 10-22-02, 08:36
dnix dnix is offline
Registered User
 
Join Date: Sep 2002
Posts: 51
I get the same results I got the other way I tried it. I have a database I thought was spread across like 22 dbspaces, but when I run queries like this I only get one dbspace listed...is it possible that the database is in one dbspace and the this database's tables are in seperate dbspaces? I guess I should have prefaced this with the fact that I do not have an informix background and the guy that built or database system is no longer with the company, so if that last dbspace question is a dumb one - please forgive me.
-d

Quote:
Originally posted by rnealejr
Try the following:

select dbinfo("DBSPACE",partnum) dbspace,
name database
from sysdatabases
order by name, dbspace;
__________________
When in doubt just ask your self,
-WWSBD?-
(what would Sponge Bob do?)
Reply With Quote
  #4 (permalink)  
Old 10-23-02, 01:38
ladwig ladwig is offline
Registered User
 
Join Date: May 2002
Location: Osnabrueck Germany
Posts: 59
Hi,

log in as informix, then try oncheck -pe and onstat -d. That tells you a lot of all your databases.
__________________
Juergen Ladwig
Reply With Quote
  #5 (permalink)  
Old 10-24-02, 07:34
zathrus zathrus is offline
Registered User
 
Join Date: Oct 2002
Posts: 6
If you are wanting to know the default dbspace that a certain database was created in use onmonitor.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On