Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Multiple Explicite Connections (Embedded SQL)
Hi,
I want my C-program to make n connections to one database. So, concerning to the pro*c programmers´s guide, you´ll have to write something like the following:
...
strcpy(db_string, "NYNON");
for (i=0; i<n; i++) {
/* connect to the non-default database */
printf("Database name: ");
gets(db_name);
EXEC SQL CONNECT :username IDENTIFIED BY :password
AT :dbname USING :db_string;
}
...
So, if I´m right ´dbname´ is just a name for the connection (to differ between several cons) and ´db_string´ is a SQL*Net string that gives us the destination node to connect to.
For single connections I usually use the default connection. But that
doesn´t work for multiple connections. So I have to use the SQL*net
string. But I don´t understand the syntax of this string.
I read something like ´d:node´ where d specifies the non-default databa=
se
and node specifies the remote node (???).
Another example says:
The syntax for connecting to a non-default database on a remote node via
DECnet is ´d:node-database´ (´d´ stands for DECnet ???).
Has anyone a simple example of an SQL*net string he uses so I can see
what I´ve to do?
Where can I find information which nodes are specified for SQL*net to use?
In other words where is the SQL*Net configured?
Regards, Niels
![]() |
![]() |