In this video we will introduce SQL*Plus, the most widely used and fudemental tool for interacting with the Oracle database
- [Instructor] Working with the Oracle database we have several tools at our disposal. Some of them are more custom tailored toward DBAs while others are geared towards developers. Let's talk about the most basic and fundamental tool allowing us to interact with the Oracle database. That tool is called sequel plus. We can start sequel plus by either typing sequel plus directly into the terminal window, pressing enter will prompt us to specify a database username and database password.
You can type system and the password for the system user which we specified during our Oracle database instance creation process. And we are connected to the Oracle database. We can see that sequel plus provided us with some useful information such as the version of the Oracle database we connected to. Oracle database 12C enterprise edition release 126.96.36.199.0, 64 beat and production.
We can quit sequel plus any time by pressing quit and enter. We can also supply the username and password in the terminal window by writing sequel plus space system and the password, in my case Oracle. Same thing. The sequel plus binary itself, the program is located under the bin directory of our Oracle home. That is the installation directory of the Oracle software.
We can verify that by typing which space sequel plus and enter. We can see that sequel plus is executed from the full path where we installed our Oracle software in the bin sub directory. We can also use the full path when executing sequel plus. System and the password. That's cool.
The reason that I was able to just type sequel plus and enter without having to specify the full path is because that the path environment variable in our Linux server which determines where executables are located already has been configured to include the Oracle home where the Oracle software is installed. We can verify that by typing echo space dollar and then path. This will display the environment variable called path and as we can see at the beginning of the path environment variable we have the Oracle home directory configured, so typing sequel plus and enter will be sufficient.
There is no need to specify the full path. Also by typing sequel plus a username and a password and pressing enter sequel plus will connect to the local database. In our case the database that we installed on the VM. The reason sequel plus knows which database to connect to is because of another environment variable called Oracle SID. We can view the content of that environment variable by typing echo space dollar, oracle_SID.
As we can see it has been pre configured with the ORCL value. That is the name of our Oracle instance. That's why typing sequel plus space username and password will open a connection to our local database. The ORCL database. If the Oracle SID had an incorrect value configured sequel plus will fail and won't ask that it was unable to connect to the database. So in case you are trying to open a sequel plus connection and get an error reporting that it was unable to connect to a local instance it's probably because your Oracle SID environment variable did not include the instance name.
After completing this course, you'll have fundamentals required for installation, configuration, and administration of an Oracle 12c database.
- Database instance and storage
- Instance memory pools
- Instance background processes
- Client connections
- Database storage file types
- Control files and backup files
- Multitenant databases
- Starting and stopping the database
- Installing Oracle 12c software
- Using the developer tools
- Database management