Databases in a Database Server
Posted in 2009
A beginner using Delphi/ADO against IDS 11.50 asked how to discover the list of databases on an Informix server, since the ADO connection string requires database@server and he needed the names before connecting. Several respondents gave the same answer: connect to the always-present sysmaster database (sysmaster@servername) and run "SELECT name FROM sysdatabases;" -- or, from another database, "SELECT name FROM sysmaster:sysdatabases;". The original poster confirmed this solved his problem.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Server Administration
Hi,
Sorry I'm a beginner on IBM Informix. I'm in the first steps.
I'm working in Delphi on Windows whit IDS 11.50. I use ADO components.
The connectionstring needs a database@server param.
If I know the name of the database there is not problem. But, how can I to
know the names of the databases includes in a server before the connection?
With dbaccess I can see all the databases in a server. But there is any
utility of Informix that return the database names?
Thanks in advance.
Salva
Hi,
This query against sysmaster@yourInformixServer returns the list of the
databases defined in the instance/server:
select name from sysdatabases;
or, if you're connected to another db different from sysmaster, this is the
remote query version:
select name from sysmaster:sysdatabases;
hope it helps,
regards,
Veronica.
> To: ids@iiug.org
> From: salvaferron@hotmail.com
> Subject: Databases in a Database Server [15634]
> Date: Thu, 30 Apr 2009 09:27:24 -0400
>
> Hi,
> Sorry I'm a beginner on IBM Informix. I'm in the first steps.
> I'm working in Delphi on Windows whit IDS 11.50. I use ADO components.
> The connectionstring needs a database@server param.
> If I know the name of the database there is not problem. But, how can I to
> know the names of the databases includes in a server before the connection?
> With dbaccess I can see all the databases in a server. But there is any
> utility of Informix that return the database names?
> Thanks in advance.
>
> Salva
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
_________________________________________________________________
See how Windows® connects the people, information, and fun that are part of
your life
http://clk.atdmt.com/MRT/go/119463819/direct/01/
Hi,
usually you should know which databases exist and which one your application
should use :-)
To get all databases you can connect to database sysmaster (always existing)
and query the table sysdatabases:
select name from sysdatabases ;
Regards,
Andreas Kutsche
-------------------------------------------
SPAR Österreichische Warenhandels-AG
Hauptzentrale
A - 5015 Salzburg, Europastrasse 3
FN 34170 a
Tel: +43 662 4470 24223
Mobile: +43 664 6259575
E-Mail: Andreas.KUTSCHE@spar.at
Internet: http://www.spar.at
Wichtiger Hinweis: Der Inhalt dieser E-Mail kann vertrauliche und rechtlich
geschützte Informationen, insbesondere Betriebs- oder Geschäftsgeheimnisse,
enthalten, zu deren Geheimhaltung der Empfänger verpflichtet ist. Die
Informationen in dieser E-Mail sind ausschließlich für den Adressaten
bestimmt. Sollten Sie die E-Mail irrtümlich erhalten haben so ersuchen wir
Sie, die Nachricht von Ihrem System zu löschen und sich mit uns in Verbindung
zu setzen.
Über das Internet versandte E-Mails können leicht manipuliert oder unter
fremdem Namen erstellt werden. Daher schließen wir die rechtliche
Verbindlichkeit der in dieser Nachricht enthaltenen Informationen aus. Der
Inhalt der E-Mail ist nur rechtsverbindlich, wenn er von uns schriftlich
bestätigt und gezeichnet wird.
Sollte trotz der von uns verwendeten Virus-Schutzprogramme durch die Zusendung
von E-Mails ein Virus in Ihre Systeme gelangen, haften wir nicht für evtl.
hieraus entstehende Schäden.
Wir danken für Ihr Verständnis.
Important notice: The contents of this e-mail may contain confidential and
legally protected information that is in particular related to operational and
trade secrets, which the recipient is obliged to treat as confidential. The
information in this e-mail is made available exclusively for use by the
addressee. In the event that the e-mail may have been sent to you in error, we
would ask you to kindly delete this communication from your system and to
contact us.
E-mails sent via the Internet can be easily manipulated or sent out under
someone else's name. We therefore do not accept legal liability for the
information contained in this communication. The contents of the e-mail are
only legally binding if they have been confirmed and signed by us in writing.
If, in spite of our using Antivirus protection software, a virus may have
penetrated your system through the sending of this e-mail, we do not accept
liability for any damage that may possibly arise as a result of this.
We trust that you appreciate our position.
-------------------------------------------
-----Ursprüngliche Nachricht-----
Von: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Im Auftrag von FERRON
SALVA
Gesendet: Donnerstag, 30. April 2009 15:27
An: ids@iiug.org
Betreff: Databases in a Database Server [15634]
Hi,
Sorry I'm a beginner on IBM Informix. I'm in the first steps.
I'm working in Delphi on Windows whit IDS 11.50. I use ADO components.
The connectionstring needs a database@server param.
If I know the name of the database there is not problem. But, how can I to
know the names of the databases includes in a server before the connection?
With dbaccess I can see all the databases in a server. But there is any
utility of Informix that return the database names?
Thanks in advance.
Salva
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Thank you very much for your so rapid response. Exactly. Your information solves my problem and helps me completely. Thanks a lot. Salva
Great also. Thank you very much for your help. Salva
Connect to sysmaster@<servername> and select:
SELECT name FROM sysdatabases;
That will return the names of all of the databases on the server.
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Thu, Apr 30, 2009 at 9:27 AM, FERRON SALVA <salvaferron@hotmail.com>wrote:
> Hi,
> Sorry I'm a beginner on IBM Informix. I'm in the first steps.
> I'm working in Delphi on Windows whit IDS 11.50. I use ADO components.
> The connectionstring needs a database@server param.
> If I know the name of the database there is not problem. But, how can I to
> know the names of the databases includes in a server before the connection?
> With dbaccess I can see all the databases in a server. But there is any
> utility of Informix that return the database names?
> Thanks in advance.
>
> Salva
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636c5a9ff84c93c0468c6405c