Oracle Database Administration and SQL Practice Test
Comprehensive Oracle practice test covering SQL, PL/SQL, RMAN backup, SQL*Plus commands, shared server architecture, networking, character sets, sequences, and data dictionary views.
Questions
The information for a dynamic performance view is gathered from the control file.
- True
- False
What is the probable cause for getting the following error stack?
ERROR: ORA-01034: ORACLE not available
ORA-07318: smsget: open error when opening sgadef.dbf file.
HP-UX Error: 2: No such file or directory
- The Oracle segment is shutdown that they are trying to access.
- The Oracle namespace is shutdown that they are trying to access.
- The Oracle instance is shutdown that they are trying to access.
- None of the above
The local naming method is being used to connect to a remote server and the service name is being provided in the connection request. This service name is mapped to a network address contained in a _________.
- Connect Descriptor
- Connect Identifier
- Connect String
- Connected Directory
What is a feature of procedural replication?
- Useful in performing batch processing at multiple sites
- Includes automatic conflict detection
- Does not need conflict resolution techniques
- Automatically disables row-level replication when called at each site
Employee table has salary field in this case if we give the query : select * from employee where sal<2000 and sal>9000 which will yield result as _______.
- rows with Sal<2000 and Salary>9000 will be displayed.
- all the rows are displayed with any one of the condition satisfied.
- no rows will be selected.
- between sal 2000 and 9000 will be displayed.
The longest row in table DEPT is 8096 bytes long. What is the minimum buffer size that should be set in an import of DEPT?
- 4096
- 8096
- 8192
- 17210
If the following command is issued:
rman> CONFIGURE CONTROLFILE AUTOBACKUP ON;
Which of the following statements is true?
- The autobackup of the control file will occur even if a backup set that included a control file backup just occurred.
- The control file autobackup will occur only after a BACKUP command is issued.
- The autobackup of the control file will not occur if an identical control file backup currently exists on the device to be written.
- The 'CONFIGURE CONTROLFILE AUTOBACKUP ON;' command has no effect because the control file autobackup feature is enabled by default.
You have linked SQLPlus to an external text editor. To invoke the text editor for use within SQLPlus, which command do you use?
- Open [FileName]
- Show [FileName]
- Alter [FileName]
- Edit [FileName]
Can one listener process listen for more than one database?
- Yes
- No
Which datatype is assigned to a SQL*Plus variable when created with a DEFINE command?
- CHAR
- DATE
- NUMBER
- VARCHAR2
Can we pass a parameter to a cursor?
- True
- False
A database is currently configured with the database character set to WEBIS08859P1 and national character set to AL16UTF16.
Business requirements dictate the need to expand language requirements beyond the current character set, for Asian and additional Western European languages, in the form of customer names and addresses.
Which solution saves space storing Asian characters and maintains consistent character manipulation performance?
- Use SQL CHAR data types and change the database character set to UTF8.
- Use SQL NCHAR data types and change the national character set to UTF8.
- Use SQL CHAR data types and change the database character set to AL32UTF8.
- Use SQL NCHAR data types and keep the national character set to AL16UTF16.
Which of the following data dictionary views displays the objects owned by the user?
- DICTIONARY
- TABLE_PRIVILEGES
- ALL_VIEWS
- USER_OBJECTS
The following command was issued:
SELECT emp_id_seq.CURRVAL
FROM SYS.dual;
Which value is displayed?
- Values of the EMP_ID_SEQ columnCurrent value of the EMP_ID_SEQ cursor
- Current value of the EMP_ID_SEQ sequence
- Current value of the EMP_ID_SEQ cursor
- Current value of the EMP_ID_SEQ sequence
Where is the GROUP BY clause statement placed in a SELECT statement that includes a WHERE clause?
- Immediately after the SELECT clause
- Before the WHERE clause
- After the ORDER BY clause
- After the WHERE clause
Under the Oracle Shared Server architecture, client-user processes ultimately connect to a __________.
- service
- listener
- dispatcher
- shared server process
When allowing RMAN to backup archived redo log files, how does RMAN know which archived redo logs to back up from the archive log destination?
- RMAN keeps a list of archived logs in a text file.
- The DBA must manually tell RMAN which archive logs to backup.
- RMAN has access to target control file and/or catalog information.
- RMAN looks at the ARCHIVE_LOG_DEST parameter of the target database and backs up all archive logs found.
To see the contents of the SQL*Plus buffer, type _____.
- CONTENTS
- BUFFER
- CURRENT
- LIST
If SGA size is greater than 128 MB, what is the size of Granules?
- 2
- 4
- 16
- 64
What is the correct use of the Trunc command on a date?
- TRUNC=To_Date('09-Jan-02,DD-MON-YY,'YEAR',"Date" from Dual;
- Select TRUNC(To_Date('09-Jan-02,DD-MON-YY,YEAR')) "DATE" from Dual;
- Date =TRUNC(To_DATE('09-Jan-02','DD-MON-YY'),'YEAR'),'YEAR)"DATE: from DUAL;
- SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') "Date " FROM DUAL;
Which command will delete all data from a table and will not write to the rollback segment?
- DROP
- DELETE
- CASCADE
- TRUNCATE
User Smith created indexes on some tables owned by user John. The following needs to be displayed:
index names
index types
Which data dictionary view(s) should be queried?
- DBA_INDEXES only
- DBA_IND_COLUMNS only
- DBA_INDEXES and DBA_USERS
- DBA_IND COLUMNS and DBA_USERS