A specific database server
The application
can establish a connection to a specific database server when it lists
the database server name, and optionally the database name, in an
SQL statement, as follows:
- The CONNECT statement establishes an explicit connection to the
database server. Each of the following CONNECT statements establishes an explicit connection to a database server that is called valley:
EXEC SQL connect to 'stores7@valley'; EXEC SQL connect to '@valley';
- When one of the SQL database statements (such as DATABASE or START
DATABASE) is the first SQL statement of the application, it can establish
an implicit connection. Each of the following SQL statements establishes an implicit connection to the stores7 database in a specific database server that is called valley:
EXEC SQL database '//valley/stores7'; EXEC SQL database stores7@valley;
For the UNIX™ operating system, use the following statement:EXEC SQL database '/usr/dbapps/stores7@valley';
For a Windows™ environment, use the following statement:EXEC SQL database ’C:\usr\dbapps\stores@valley’;