Whenever a new connection to the Oracle instance is initiated, the Login window shows up. It prompts the user to enter an Oracle username, password, and TNS Name - an entry in the tnsnames.ora file located in the ORACLE_HOME directory on your workstation.
In the case when there is no corresponding entry in tnsnames.ora, Direct Addressing option is still available. Check "Direct Addressing" box in this window and define the Host Name of the Oracle server (or IP address), the Port number, and the Service name (or Oracle SID) as it is known to the Oracle listener. As you enter this information, the connection string in the "TNS Name / Connect String" box will reflect these changes. Optionally you can indicate the instance name, this is highly recommended for Oracle cluster (RAC) environment. See more on connecting to RAC in How Lab128 should connect to Oracle Cluster database (RAC).
You can also manually enter a connection string into the "TNS Name / Connect String" edit box. The connect string should use the same format used in TNS entries. An example of a connection string:
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) (HOST=myhostaname.domainname.com) (PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=RACD1) (INSTANCE_NAME = D1)))
Lab128 also supports URL-type connection strings, for example:
Press the "Connect" button to make a connection. Press the "Store" button to store the current connection for later use. You can give an alias name to the stored connection in the edit box next to the Store button. The connection will be added to the list in the lower part of the Login window. To invoke a stored connection, select it, then press the "Connect" button. If the password was not entered when the connection was stored, you will be prompted to enter it when invoking this stored connection. The passwords are stored in encrypted form; the stored connections are written into and read from the lab128.ini file.
Note. A strong form of encryption is used to store the username and password; however, it is possible to recover them or to reverse-engineer the code. If you want to store passwords in stored connections, it is not advisable to use privileged accounts.
The stored connections have the Alias column. If no value was specified in the "Alias Name" edit box upon storing, the Alias value is derived automatically from the Service name or from the Connect string when using direct addressing mode. The Alias value is used to title the Main window and other related windows after a connection is made. You can change the Alias by editing it in the list. Select the connection and click on Alias value to enter Edit mode. Similarly, you can edit other stored connection attributes.
As you select a stored connection, the attributes are loaded into the corresponding edit boxes. You can edit values in these edit boxes and then store them again, replacing already stored values. The application will prompt you to confirm this action.
To delete the stored connection, select it first, then press the "Delete" button.
The Oracle user (account) used for Lab128 should have certain privileges, see also Lab128 Installation and Setup. Some accounts, such as SYS, require the additional attributes "as sysdba" or "as sysoper", so check the corresponding box in the Login window.
It is recommended to open a monitor for each instance. Don't use connect strings or TNS names configured for failover. Create a TNS name or connect string for each instance. You can also specify the instance name to ensure connection to a particular instance. Also you can use Direct Addressing option if you don't want to deal with tnsnames.Example:
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) (HOST=my_hostname1) (PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=my_sname) (INSTANCE_NAME=my_instance1)))
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) (HOST=my_hostname2) (PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=my_sname) (INSTANCE_NAME=my_instance2)))
If you have trouble connecting to the Oracle server, your action depends on the error returned. Generally, you should follow the error explanation in the Oracle Database Error Messages manual.
Below is a list of the most frequent problems/actions: