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 > Show all databases

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-26-10, 14:37
nbrege nbrege is offline
Registered User
 
Join Date: Mar 2010
Posts: 8
Show all databases

How can I list all the databases in our server from a query?
Reply With Quote
  #2 (permalink)  
Old 03-28-10, 06:16
Luis Santos Luis Santos is offline
Registered User
 
Join Date: Jun 2009
Location: Lisboa, Portugal
Posts: 51
Hi,

If you don't whant the system databases, your sql code is:

database sysmaster;
select name from sysdatabases where name[1,3] != "sys";

I hope it helps you.

LS
Reply With Quote
  #3 (permalink)  
Old 03-29-10, 08:08
nbrege nbrege is offline
Registered User
 
Join Date: Mar 2010
Posts: 8
Thanks for the reply. However, that query gives me the following error:

"Database not found or no system permission. sqlerrm(systables)"

Would the database possibly be named something else besides 'sysmaster' & should it be accessible to anyone?
Reply With Quote
  #4 (permalink)  
Old 03-30-10, 17:48
Luis Santos Luis Santos is offline
Registered User
 
Join Date: Jun 2009
Location: Lisboa, Portugal
Posts: 51
What is the IDS version you are using?
Did you try as informix user?

LS
Reply With Quote
  #5 (permalink)  
Old 03-31-10, 08:05
nbrege nbrege is offline
Registered User
 
Join Date: Mar 2010
Posts: 8
DBMS version is 07.25.0000
I'm not sure what you mean by "try as informix user". I am accessing the database from .net via odbc.
Reply With Quote
  #6 (permalink)  
Old 04-01-10, 06:39
Luis Santos Luis Santos is offline
Registered User
 
Join Date: Jun 2009
Location: Lisboa, Portugal
Posts: 51
You must have use a user who is grant the possible of administration facilities to obtain that information. I think you are using SE so, i dont know how you can know that... I thougth you were using Informix On-line V. 11.x
For informix SE your databases are in directories of SO, so maybe using a shell script if you are using UNIX/LINUX.
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