Starting SQLcl and Connecting to the Database
Learn how to start SQLcl and connect to the database.
To start SQLcl and connect to the database:
-
Set your operating system’s path so that it contains the location of
./sqlcl/binsubdirectory where you expanded the SQLcl ZIP file. -
Connect to the database using the database user account that corresponds to the schema assigned to your APEX workspace, or a database user with
DBAorAPEX_ADMINISTRATOR_ROLEroles. -
Enter the command:
$ sql apex_admin/passwordFor example:
$ sql apex_admin/password SQLcl: Release 21.4 Production on Mon Jan 31 12:20:12 2022 Copyright (c) 1982, 2022, Oracle. All rights reserved. Connected to: Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production Version 21.3.0.0.0 SQL> -
If you do not enter a username and password, the program prompts you to enter them. Note that the characters in the password do not display in the terminal window.
You can also enter an extended connection string if necessary indicating the hostname, port, and SID or service of the database to which you want to connect.
For example:
$ sql apex_admin/password@examplehost:1522/yourservicename -
Once connected, you can execute any of the commands covered in this chapter from the
SQL>command prompt.