Font size
Worksheetsشابتر 5 قواعد البيانات
Total questions: 68
Worksheet time: 37mins
The primary means of communicating with Oracle Database is by .......................................................
submitting Java Statements
submitting SQL Statements
is the primary command line interface to your Oracle database.
Connecting to the Database with SQL*Plus: When you connect with SQL*Plus, you are connecting to
the Oracle instance.
When you connect with SQL*Plus, you are connecting to the Oracle instance
connecting to the SQL database.
connecting to the MySQL instance.
connecting to the PostgreSQL server.
Connecting to the Database with SQL*Plus
What are several ways to submit SQL statements and commands to Oracle Database?
Directly
SQL*Plus
Indirectly
using the command-line interface of SQL*Plus.
Directly
Indirectly
a graphical user interface: such as
Oracle Enterprise Manager Database Express
Oracle Enterprise Manager Cloud Control
Oracle Enterprise Manager Database Express
EM Express
Cloud Control
Oracle Enterprise Manager Cloud Control
EM Express
Cloud Control
Oracle Enterprise Manager Database Express (EM Express) or Oracle Enterprise Manager Cloud Control (Cloud Control) With these tools, you use a graphical interface to
to use a command line interface to monitor Oracle databases
to administer the database, and the tool submits SQL statements and commands behind the scenes.
Directly, using SQL Developer: Developers use SQL Developer to
to create and test database schemas
use it for database administration tasks.
to create and test applications
Directly, using SQL Developer: Developers use
Oracle Database also supports a superset of SQL, which includes commands for
shutting down
starting up
modifying database configuration
Oracle Database supports a superset of SQL
True
False
Oracle Database not supports a superset of SQL
True
False
You use SQL*Plus to
create and manage users
start up and shut down the database
set database initialization parameters
You use SQL*Plus to
insert and update data, run SQL queries
create and alter database objects (such as tables and indexes)
Before you can submit SQL statements and commands, you must connect to the database. With ..............................................
SQL*Plus
Before you can submit SQL statements and commands, you must connect to the database. With SQL*Plus
True
False
With SQL*Plus, you can connect ................................. or .............................................
locally
remotely
only remotely
means connecting to an Oracle database running on the same computer on which you are running SQL*Plus.
Connecting locally
Connecting remotely
means connecting over a network to an Oracle database that is running on a remote computer. Such a database is referred to as a remote database.
Connecting locally
Connecting remotely
The SQL*Plus executable on the local computer is provided by
an Oracle Client installation
a full Oracle Database installation
an Instant Client installation
is a collection of processes and memory, and a set of disk files that contain user data and system data.
Oracle Database instance
Take the necessary action on your platform to open a window into which you can enter operating system commands
Open a Command Window
Set Operating System Environment Variables
Depending on your platform, you may have to set environment variables before starting SQL*Plus, or at least verify that they are set properly.
Open a Command Window
Set Operating System Environment Variables
Submit the SQL*Plus CONNECT command to initially connect to the Oracle database instance or at any time to reconnect as a different user.
Start SQL*Plus: Start SQL*Plus.
Submit the SQL*Plus CONNECT Command
to initially connect to the Oracle database instance or at any time to reconnect as a different user.
Access command
CONNECT command
Each instance has an
elements
variables
instance ID
also known as a system ID (SID)
instance ID
Because there can be multiple Oracle instances on a host computer, each with its own set of data files, you must identify ...............................................
the instance to which you want to connect
can not be multiple Oracle instances on a host computer
True
False
can be multiple Oracle instances on a host computer
True
False
you identify the instance by setting operating system environment variables.
For a local connection
For a remote connection
For both local and remote connections
you must set environment variables to help the operating system find the SQL*Plus executable and to provide the executable with a path to its support files and scripts.
For a local connection
For a remote connection
For both local and remote connections
you identify the instance by specifying a network address and a database service name.
For a local connection
For a remote connection
For both local and remote connections
Why do we set environment variables when using SQL*Plus?
To connect to the internet
To help the OS find SQL*Plus and its files
Environment variables are needed for:
Local connections only
Remote connections only
Both local and remote connections
What does the operating system need to find using environment variables?
Oracle passwords
SQL*Plus executable
What do environment variables provide to SQL*Plus?
Memory
A path to support files and scripts
Passwords
pluggable databases (PDBs), such as .....................................................
redo log files
archived redo log files
control files
To manage objects that are shared by the multitenant container database (CDB) and its pluggable databases (PDBs) connect to the
CDB root
is a collection of container databases where each container is a collection of schemas, objects, and related structures.
A multitenant container database (CDB)
is a user-created container that stores the data and code for an application, such as a human resources application.
A pluggable database (PDB)
From which perspective is the PDB appears to be a logically separate, independent database?
user or application
operating system perspective
From which perspective is the CDB is the database
user or application
operating system perspective
Objects such as tablespaces, data files, or temp files can be created in the ................................................. or ...........................................
PDB only
CDB root only
CDB root or a PDB
To manage such objects, connect to the ..............................................................................
container that owns the object
file system that owns the object
local storage that owns the object
network drive that owns the object
connecting to the database means connecting to the CDB root.
True
False
on most platforms, you must set the environment variables ....................................... and ............................................
ORACLE_SID and ORACLE_HOME
you must configure the PATH environment variable to include the .......................................................
ORACLE_HOME/bin directory
set environment variables by entering operating system commands
On the UNIX and Linux platforms
On the Windows platform
Oracle Universal Installer (OUI) automatically assigns values to ORACLE_HOME and ORACLE_SID in the Windows registry.
On the UNIX and Linux platforms
On the Windows platform
For all platforms, when switching between instances with different Oracle homes, you must change the
ORACLE_HOME environment variable
If multiple instances share the same Oracle home, you must change
only ORACLE_SID when switching instances
setenv
UNIX (C Shell)
Linux (Bash Shell)
export
UNIX (C Shell)
Linux (Bash Shell)
to Start SQL*Plus we use:
Ensure that the PATH environment variable contains $ORACLE_HOME /bin.
Change directory to $ORACLE_HOME /bin. (Ensure that the PATH environment variable contains a dot (“.”))
Change directory to $ORACLE_HOME /bin. (Ensure that the PATH environment variable not contains a dot (“.”))
Start SQL*Plus
Ensure that the PATH environment variable contains $ORACLE_HOME /bin.
Change directory to $ORACLE_HOME /bin. (Ensure that the PATH environment variable contains a dot (“.”))
Enter the following command (case-sensitive on UNIX and Linux)
You can also run the sqlplus command by specifying its complete path: $ORACLE_HOME/bin/sqlplus /nolog
sqlplus /nolog case-sensitive on UNIX and Linux
True
False
This command is used to connect to the CDB root or a particular PDB
SQL*Plus prompts for the SYSTEM user ..................................................
connects to a local database as user SYSTEM
connect system
connect sys as sysdba
connects to a local database as user SYS with the SYSDBA privilege
connect system
connect sys as sysdba
connects to a local database as user SYS with the
SYSDBA privilege
SYSTEM
connects to a local database as user SYSBACKUP with the SYSBACKUP privilege
connect sysbackup as sysbackup
connect / as sysdba
connect sys@sales_pdb as sysdba
connects locally to a pluggable database (PDB) named sales_pdb as user SYS with the SYSDBA privilege.
connect sysbackup as sysbackup
connect / as sysdba
connect sys@sales_pdb as sysdba
connects locally with the SYSDBA privilege with operating system authentication.
connect sysbackup as sysbackup
connect / as sysdba
connect sys@sales_pdb as sysdba
