Technical Questions on oracle certification
-
What is row chaining and row migration?
-
We will migrate a row when an update to that row would cause it to not fit on the block anymore (with all of the other data that exists there currently). A migration means that the entire row will move and we just leave behind the. So, the original block just has the rowid of the new block and the entire row is moved.
Row chaining nstead of just having a forwarding address on one block and the data on another we have data on two or more blocks.
-
What will be the output for this query:
select 1 from dual minus select 'a' from dual;
-
This will produce Error:
Expression must have same datatype as corresponding expression
-
How do you create a multiple databases with the same configuration?
-
Applications can create multiple databases with in a single file.This is useful when database are both numerous and reasonably small in order to avoid creating a large number of underlying files.Putting multiple databases in a single physical file is an administrative convenience and unlikely to affectdatabase performance.
-
What is the use of PARALLEL_ADAPTIVE_MULTI_USER initialization parameter
-
When we set to PARALLEL_ADAPTIVE_MULTI_USER true enables an adaptive algorithm designed to improve performance in multiuser environments that use parallel execution. The algorithm automatically reduces the request degree of parallelism based on the degree at the system load at query startup time.
-
How do you use STANDBY_ARCHIVE_DEST parameter and explain it's need?
-
STANDBY_ARCHIVE_DEST is relevant only for a standby database in managed recovery mode. It specifies the location of archive logs arriving from a primary database.
-
What are the benefits of system-managed locally managed tablespace ?
-
Locally Managed Tablespaces Include the following Benefits:
1.Free extents are managed in the Tablespace.
2.Bitmap is used to record free extents.
3.Each bit corresponds to a block or a group of block.
4.Bit value indicates free or used.
-
What are transportable table spaces and the need to use them?
-
Transportable tablespaces are the fastest way for moving large volume of data between two oracle databases. We can use the transportable tablespaces feature to copy a set of tablespaces from oneoracle database to another. Moving data using transportable tablespaces is much faster than performing either an export/import or unload/load the same data.
-
What are transportable table spaces and the need to use them?
-
Transportable tablespaces are the fastest way for moving large volume of data between two oracle databases. We can use the transportable tablespaces feature to copy a set of tablespaces from one oracle database to another. Moving data using transportable tablespaces is much faster than performing either an export/import or unload/load the same data.
-
Which two statements are true about sequences created in a single instance database? (Choosetwo.)A. The numbers generated by a sequence can be used only for one tableB. DELETE <sequencename> would remove a sequence from the databaseC. CURRVAL is used to refer to the last sequence number that has been generatedD. When the MAXVALUE limit for a sequence for reached, you can increase the MAXVALUE limitby using the ALTER SEQUENCE statementE. When a database instance shuts down abnormally, the sequence numbers that have beencached but not used would be available once again when the database instance is restarted
-
C. CURRVAL is used to refer to the last sequence number that has been generated
D. When the MAXVALUE limit for a sequence for reached, you can increase the MAXVALUE limit
by using the ALTER SEQUENCE statement
-
Which three statements/commands would cause a transaction to end? (Choose three.)A. COMMITB. SELECTC. CREATED. ROLLBACKE. SAVEPOINT
-
A. COMMIT
C. CREATE
D. ROLLBACK
-
Which three statements are true regarding subqueries? (Choose three.)A. Subqueries can contain GROUP BY and ORDER BY clausesB. Main query and subquery can get data from different tablesC. Main query and subquery must get data from the same tablesD. Subqueries can contain ORDER BY but not the GROUP BY clauseE. Only one column or expression can be compared between the main query and subqeuryF. Multiple columns or expressions can be compared between the main query and subquery
-
A. Subqueries can contain GROUP BY and ORDER BY clauses
B. Main query and subquery can get data from different tables
F. Multiple columns or expressions can be compared between the main query and subquery
-
Which two statements are true regarding working with dates? (Choose two.)A. The default internal storage of dates is in the numeric formatB. The default internal storage of dates is in the character formatC. The RR date format automatically calculates the century from the SYSDATE function and doesnot allow the user to enter the centuryD. The RR date format automatically calculates the century from the SYSDATE function but allowsthe user to enter the century if required
-
A. The default internal storage of dates is in the numeric format
D. The RR date format automatically calculates the century from the SYSDATE function but allows
the user to enter the century if required
-
Which two statements are true regarding views? (Choose two.)A. A subquery that defines a view cannot include the GROUP BY clauseB. A view is created with the subquery having the DISTINCT keyword can be updatedC. A view that is created with the subquery having the pseudo column ROWNUM keyword cannotbe updatedD. A Data Manipulation Language (DML) operation can be performed on a view that is createdwith the subquery having all the NOT NULL columns of a table
-
C. A view that is created with the subquery having the pseudo column ROWNUM keyword cannot
be updated
D. A Data Manipulation Language (DML) operation can be performed on a view that is created
with the subquery having all the NOT NULL columns of a table
-
When does a transaction complete? (Choose all that apply.)A. When a DELETE statement is executedB. When a ROLLBACK command is executedC. When a PL/SQL anonymous block is executedD. When a data definition language statement is executedE. When a TRUNCATE statement is executed after the pending transaction
-
B. When a ROLLBACK command is executed
D. When a data definition language statement is executed
E. When a TRUNCATE statement is executed after the pending transaction
-
You need to generate a list of all customer last names with their credit limits from theCUSTOMERS table. Those customers who do not have a credit limit should appear last in the list.Which two queries would achieve the required result? (Choose two.)A. SELECT cust_last_name,cust_credit_limitFROM customersORDER BY cust_credit_limit DESC;B. SELECT cust_last_name,cust_credit_limitFROM customersORDER BY cust_credit_limit;C. SELECT cust_last_name,cust_credit_limitFROM customersORDER BY cust_credit_limit NULLS LAST;D. SELECT cust_last_name,cust_credit_limitFROM customersORDER BY cust_last_name,cust_credit_limit NULLS LAST;
-
B. SELECT cust_last_name,cust_credit_limit
FROM customers
ORDER BY cust_credit_limit;
C. SELECT cust_last_name,cust_credit_limit
FROM customers
ORDER BY cust_credit_limit NULLS LAST;
-
Which two statements are true regarding working with dates? (Choose two.)A. The default internal storage of dates is in the numeric formatB. The default internal storage of dates is in the character formatC. The RR date format automatically calculates the century from the SYSDATE function and doesnot allow the user to enter the centuryD. The RR date format automatically calculates the century from the SYSDATE function but allowsthe user to enter the century if required
-
A. The default internal storage of dates is in the numeric format
D. The RR date format automatically calculates the century from the SYSDATE function but allows
the user to enter the century if required
-
Which two statements are true regarding constraints? (Choose two.)A. A foreign key cannot contain NULL valuesB. A columns with the UNIQUE constraint can contain NULL valuesC. A constraint is enforced only for the INSERT operation on a tableD. A constraint can be disabled even if the constraint column contains dataE. All constraints can be defined at the column level as well as the table level
-
B. A columns with the UNIQUE constraint can contain NULL values
D. A constraint can be disabled even if the constraint column contains data
-
Which two statements are true regarding views? (Choose two.)A. A subquery that defines a view cannot include the GROUP BY clauseB. A view is created with the subquery having the DISTINCT keyword can be updatedC. A view that is created with the subquery having the pseudo column ROWNUM keyword cannotbe updatedD. A Data Manipulation Language (DML) operation can be performed on a view that is createdwith the subquery having all the NOT NULL columns of a table
-
C. A view that is created with the subquery having the pseudo column ROWNUM keyword cannot
be updated
D. A Data Manipulation Language (DML) operation can be performed on a view that is created
with the subquery having all the NOT NULL columns of a table
-
Evaluate the following SQL statements:DELETE FROM sales;There are no other uncommitted transactions on the SALES table.Which statement is true about the DELETE statement?A. It would not remove the rows if the table has a primary keyB. It removes all the rows as well as the structure of the tableC. It removes all the rows in the table and deleted rows can be rolled backD. It removes all the rows in the table and deleted rows cannot be rolled back
-
C. It removes all the rows in the table and deleted rows can be rolled back
-
Which two statements are true regarding single row functions? (Choose two.)A. They accept only a single argumentB. They can be nested only to two levelsC. Arguments can only be column values or constantD. They always return a single result row for every row of a queried tableE. They can return a data type value different from the one that is reference
-
D. They always return a single result row for every row of a queried table
E. They can return a data type value different from the one that is reference
-
Which statements are correct regarding indexes? (Choose all that apply.)A. When a table is dropped, the corresponding indexes are automatically droppedB. A FOREIGN KEY constraint on a column in a table automatically creates a nonunique keyC. A nondeferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates aunique indexD. For each data manipulation language operation performed, the corresponding indexes areautomatically updated
-
A. When a table is dropped, the corresponding indexes are automatically dropped
C. A nondeferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a
unique index
D. For each data manipulation language operation performed, the corresponding indexes are
automatically updated
-
Which three statements are true regarding the data types in Oracle Database 10g/11g? (Choosetwo.)A. Only One LONG column can be used per tableB. A TIMESTAMP data type column stores only time values with fractional secondsC. The BLOB data type column is used to store binary data in an operating system fileD. The minimum column width that can be specified for a VARCHAR2 data type column is oneE. The value for a CHAR data type column is blanked-padded to the maximum defined columnwidth
-
A. Only One LONG column can be used per table
D. The minimum column width that can be specified for a VARCHAR2 data type column is one
E. The value for a CHAR data type column is blanked-padded to the maximum defined column
width
-
You need to calculate the number of days from 1st Jan 2007 till date:Dates are stored in the default format of dd-mm-rr.Which two SQL statements would give the required output? (Choose two.)A. SELECT SYSDATE - '01-JAN-2007' FROM DUALB. SELECT SYSDATE - TO_DATE('01/JANUARY/2007') FROM DUAL;C. SELECT SYSDATE - TO_DATE('01-JANUARY-2007) FROM DUAL;D. SELECT TO_CHAR(SYSDATE,'DD-MON-YYYY')-'01-JAN-2007' FROM DUAL;E. SELECT TO_DATE(SYSDATE,'DD/MONTH/YYYY')-'01/JANUARY/2007' FROM DUAL;
-
B. SELECT SYSDATE - TO_DATE('01/JANUARY/2007') FROM DUAL;
C. SELECT SYSDATE - TO_DATE('01-JANUARY-2007) FROM DUAL;
-
Which two statements are true regarding single row functions? (Choose two.)A. They accept only a single argumentB. They can be nested only to two levelsC. Arguments can only be column values or constantD. They always return a single result row for every row of a queried tableE. They can return a data type value different from the one that is reference
-
D. They always return a single result row for every row of a queried table
E. They can return a data type value different from the one that is reference
-
what is difference between
TRUNCATE, DELETE, DROP?
-
1) Drop will drop the records from the table along with its structure.All the indexes associated with it will also deleted and there is no rollback.
2) Delete will deletes the records of the table but the structure of the table is retained back.It is a DML operation which is slower but provides rollback facility.
3) Truncate is a DDL command which is faster ,retain structure of the table and rollback is possible.It allocates memory usually after truncating so structure is retained.
-
what is difference between primary key and foreign key
-
Primary Key is unique Key entire the table and which is
also NOT NULL
where as foriegn key is the null & which references the
primary key .