5. Using a Distributed Database : Connecting Directly to a Local Database : Direct Connect Statement
 
Share this page                  
Direct Connect Statement
The direct connect statement allows you to connect to a local database using Ingres Star in a pass-through mode. You remain in this pass-through mode until you issue a direct disconnect statement.
When you issue a direct connect statement, the Communications Server determines the login account on the remote node connection based on the netutil entries that have been set up. On a direct connect statement, your connection to the local DBMS will be made as the user authorized to access the remote node by netutil. For instance, if user Harry has a private authorization entry that defines Sally as the user for connections to node Italy, when Harry establishes a connection to node Italy from a distributed database, the local user will be Sally. This behavior also occurs when Ingres Star accesses a remote database’s data or catalogs.
The direct connect does not always require that a new connection be opened between Ingres Star and the local DBMS. If the session has already caused Ingres Star to open a connection with the local DBMS, then Ingres Star uses that same connection for the direct connect.
You can connect to an Ingres or an Enterprise Access local DBMS with this statement, but not to another Ingres Star DBMS.
If you are within a transaction, you first must commit or rollback your transaction before you can issue a direct connect.