oca questions

Upload: roy-nema

Post on 08-Apr-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 OCA Questions

    1/65

    http://www.cert21.com

    #1 (1z0001q338)What can occur when multiple users try to access the same schema object (fill in the

    blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: deadlock

    Explanation : According to the documentation available at the Oracle web

    site:

    A deadlock can occur when two or more users try to accessthe same schema object. For example, two users updating the

    same table might wait if each tries to update a row currentlylocked by the other. Because each user is waiting for

    resources held by another user, neither can continue until

    Oracle breaks the deadlock by signaling an error to the last

    participating transaction.

    #2 (1z0001q205)To ensure proper data conversion between databases with different character sets, you

    must ensure that:

    A) ASCII characters are capitalized.

    B) INT data consists of non-negative numbers.

    C) CHAR data consists of well-formed strings.

    D) CHAR data consists of at least a nil string.

    E) None of the choices.

    Your answer is:Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:

    To ensure proper data conversion between databases withdifferent character sets, you must ensure that CHAR data

    consists of well-formed strings.

    http://www.cert21.com/http://www.cert21.com/
  • 8/7/2019 OCA Questions

    2/65

    #3 (1z0001q292)

    What statement can you use to configure an account through which you can log in to the

    database and establish the means by which Oracle permits access by the user (fill in theblank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ACERSTU

    Explanation : According to the documentation available at the Oracle web

    site:

    Use the CREATE USER statement to create and configure adatabase user, or an account through which you can log in to

    the database and establish the means by which Oracle

    permits access by the user.

    #4 (1z0001q291)What statement can you use to create tablespaces that contain schema objects only for the

    duration of a session (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ABCELMOPRSTY

    Explanation : According to the documentation available at the Oracle website:You can use the CREATE TEMPORARY TABLESPACE

    statement to create tablespaces that contain schema objects

    only for the duration of a session.

    #5 (1z0001q213)For each DATE value in an Oracle database, which of the following information is stored

    (choose all that apply):

    A) second

    B) century

    C) hour

    D) year

    E) date

  • 8/7/2019 OCA Questions

    3/65

    F) month

    G) minute

    Your answer is:

    Correct answer is: ABCDEFGExplanation : According to the documentation available at the Oracle web

    site:

    The DATE datatype stores date and time information.

    Although date and time information can be represented inboth character and number datatypes, the DATE datatype has

    special associated properties. For each DATE value, Oracle

    stores the following information: century, year, month, date,hour, minute, and second.

    #6 (1z0001q287)To enable a UNIQUE constraint ______

    A) you must have the privileges necessary to create a rollback segment on the table.

    B) you must have the privileges necessary to create a schema on the table.

    C) you must have the privileges necessary to create an index on the table.

    D) This is hard to determine.

    Your answer is:Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:

    To enable a UNIQUE or PRIMARY KEY constraint, you

    must have the privileges necessary to create an index on thetable. You need these privileges because Oracle creates an

    index on the columns of the unique or primary key in the

    schema containing the table.

    #7 (1z0001q209)Which of the following correctly describe the LONG columns (choose all that apply):

    A) You can use them to store long text strings.

    B) They have many of the characteristics of VARCHAR2 columns.

    C) They store variable-length character strings containing up to 2 gigabytes

  • 8/7/2019 OCA Questions

    4/65

    D) None of the choices.

    Your answer is:

    Correct answer is: ABC

    Explanation : According to the documentation available at the Oracle website:

    LONG columns store variable-length character strings

    containing up to 2 gigabytes, or 231-1 bytes. LONG columnshave many of the characteristics of VARCHAR2 columns.

    You can use LONG columns to store long text strings. The

    length of LONG values may be limited by the memory

    available on your computer.

    #8 (1z0001q212)

    Which of the following are the valid datetime datatypes in Oracle (choose all that apply):

    A) TIMESTAMP WITH LOCAL TIME ZONE

    B) TIMESTAMP

    C) TIMESTAMP WITH TIME ZONE

    D) DATE

    Your answer is:

    Correct answer is: ABCD

    Explanation : According to the documentation available at the Oracle website:

    The datetime datatypes are DATE, TIMESTAMP,

    TIMESTAMP WITH TIME ZONE and TIMESTAMPWITH LOCAL TIME ZONE. Values of datetime datatypes

    are sometimes called "datetimes". The interval datatypes are

    INTERVAL YEAR TO MONTH and INTERVAL DAY TO

    SECOND. Values of interval datatypes are sometimes called"intervals".

    #9 (1z0001q277)Which of the following are the restrictions of creating bitmap indexes (choose all that

    apply):

    A) You cannot specify BITMAP for a domain index.

    B) You cannot specify both UNIQUE and BITMAP.

  • 8/7/2019 OCA Questions

    5/65

    C) You cannot specify BITMAP when creating a local index.

    D) You cannot specify BITMAP when creating a global partitioned index.

    Your answer is:

    Correct answer is: ABDExplanation : According to the documentation available at the

    Oracle web site:

    You cannot specify BITMAP when creating a global

    partitioned index.

    You cannot create a bitmapped secondary index on an

    index-organized table unless the index-organized

    table has a mapping table associated with it.

    You cannot specify both UNIQUE and BITMAP.

    You cannot specify BITMAP for a domain index.

    #10 (1z0001q330)

    In PL/SQL, the EXIT-WHEN statement lets you:

    A) this statement is not valid

    B) complete a loop if further processing is desirable.

    C) This is hard to determine.

    D) complete a loop if further processing is impossible.

    Your answer is: D

    Correct answer is: D

    Explanation : According to the documentation available at the Oracle web

    site:

    The EXIT-WHEN statement lets you complete a loop iffurther processing is impossible or undesirable. When the

    EXIT statement is encountered, the condition in the WHEN

    clause is evaluated. If the condition is true, the loop

    completes and control passes to the next statement.

    #11 (1z0001q201)nvarchar2 has an upper limit of how many bytes (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

  • 8/7/2019 OCA Questions

    6/65

    Correct answer is: 4000

    Explanation : According to the documentation available at the Oracle website:

    Variable-length character string having maximum length size

    characters or bytes, depending on the choice of national

    character set. Maximum size is determined by the number ofbytes required to store each character, with an upper limit of

    4000 bytes. You must specify size for NVARCHAR2.

    #12 (1z0001q337)What is used by Oracle to control concurrent access to data?

    A) memory holes

    B) Net 8

    C) transaction manager

    D) locks

    E) Session Manager

    Your answer is: D

    Correct answer is: D

    Explanation : According to the documentation available at the Oracle website:

    Oracle uses locks to control concurrent access to data. A lock

    gives you temporary ownership of a database resource suchas a table or row of data. Thus, data cannot be changed by

    other users until you finish with it. You need never explicitly

    lock a resource because default locking mechanisms protectOracle data and structures. However, you can request data

    locks on tables or rows when it is to your advantage to

    override default locking. You can choose from several modes

    of locking such as row share and exclusive.

    #13 (1z0001q203)The CHAR datatype specifies a variable-length character string.

    A) This is hard to determine.

    B) True

    C) False

  • 8/7/2019 OCA Questions

    7/65

    D) None of the choices.

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle website:

    The CHAR datatype specifies a fixed-length character string.

    Oracle subsequently ensures that all values stored in thatcolumn have the length specified by size. If you insert a

    value that is shorter than the column length, Oracle blank-

    pads the value to column length. If you try to insert a value

    that is too long for the column, Oracle returns an error.

    #14 (1z0001q206)

    You cannot insert a CHAR value into an NCHAR column, but you can insert an NCHARvalue into a CHAR column.

    A) True

    B) False

    C) This is hard to determine.

    D) None of the choices.

    Your answer is:

    Correct answer is: BExplanation : According to the documentation available at the Oracle web

    site:

    If you insert a value that is shorter than the column length,Oracle blank-pads the value to column length. You cannot

    insert a CHAR value into an NCHAR column, nor can you

    insert an NCHAR value into a CHAR column.

    #15 (1z0001q339)What PL/SQL statements ensure that all database changes brought about by SQL

    operations are either made permanent or undone at the same time (choose all that apply):

    A) COMMIT

    B) CONFIRM

    C) ROLLBACK

    D) CANCEL

  • 8/7/2019 OCA Questions

    8/65

    E) None of the choices.

    Your answer is:

    Correct answer is: AC

    Explanation : According to the documentation available at the Oracle website:

    The COMMIT and ROLLBACK statements ensure that all

    database changes brought about by SQL operations are eithermade permanent or undone at the same time. All the SQL

    statements executed since the last commit or rollback make

    up the current transaction. The SAVEPOINT statement

    names and marks the current point in the processing of atransaction.

    #16 (1z0001q214)The default date format for an Oracle date literal is specified by what initialization

    parameter (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ADEFLMNORST_

    Explanation : According to the documentation available at the Oracle website:

    The default date format for an Oracle date literal is specifiedby the initialization parameter NLS_DATE_FORMAT. Thisexample date format includes a two-digit number for the day

    of the month, an abbreviation of the month name, the last two

    digits of the year, and a 24-hour time designation.

    #17 (1z0001q331)PL/SQL has which types of subprograms (choose all that apply):

    A) procedures

    B) links

    C) packages

    D) pointers

    E) functions

    F) This is hard to determine.

  • 8/7/2019 OCA Questions

    9/65

    Your answer is:

    Correct answer is: AE

    Explanation : According to the documentation available at the Oracle website:

    PL/SQL has two types of subprograms called procedures andfunctions, which can take parameters and be invoked

    (called).

    #18 (1z0001q211)You cannot reference LONG columns in which of the following SQL statements (choose

    all that apply):

    A) SELECT lists

    B) SET clauses of UPDATE statementsC) VALUES clauses of INSERT statements

    D) This is hard to determine.

    E) None of the choices.

    Your answer is:

    Correct answer is: E

    Explanation : According to the documentation available at the Oracle web

    site:

    You can reference LONG columns in SQL statements inthese places:

    SELECT lists

    SET clauses of UPDATE statements

    VALUES clauses of INSERT statements

    #19 (1z0001q290)What statement do you use to define a logical table based on one or more tables (fill in

    the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ACEIRTVW

    Explanation : According to the documentation available at the Oracle web

    site:

  • 8/7/2019 OCA Questions

    10/65

    Use the CREATE VIEW statement to define a view, which is

    a logical table based on one or more tables or views. A view

    contains no data itself. The tables upon which a view is basedare called base tables.

    #20 (1z0001q210)

    Which of the following correctly describe the restrictions on the use of LONG columns(choose all that apply):

    A) You cannot create an object type with a LONG attribute.

    B) A table can contain only one LONG column.

    C) LONG columns cannot be indexed.

    D) LONG columns cannot appear in WHERE clauses.

    Your answer is: B

    Correct answer is: ABCD

    Explanation : According to the documentation available at the Oracle website:

    The use of LONG values is subject to some restrictions:

    A table can contain only one LONG column.

    You cannot create an object type with a LONG

    attribute.

    LONG columns cannot appear in WHERE clauses or

    in integrity constraints (except that they can appear inNULL and NOT NULL constraints).

    LONG columns cannot be indexed.

    A stored function cannot return a LONG value.

    You can declare a variable or argument of a PL/SQL

    program unit using the LONG datatype. However,

    you cannot then call the program unit from SQL.

    Within a single SQL statement, all LONG columns,

    updated tables, and locked tables must be located on

    the same database.

    LONG and LONG RAW columns cannot be used indistributed SQL statements and cannot be replicated.

    If a table has both LONG and LOB columns, you

    cannot bind more than 4000 bytes of data to both theLONG and LOB columns in the same SQL statement.

    However, you can bind more than 4000 bytes of data

    to either the LONG or the LOB column.

  • 8/7/2019 OCA Questions

    11/65

    A table with LONG columns cannot be stored in a

    tablespace with automatic segment-space

    management.

    #1 (1z0001q218)In addition to the LONG RAW datatype, what datatype stores data that is not to be

    interpreted (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ARW

    Explanation : According to the documentation available at the Oracle web

    site:

    The RAW and LONG RAW datatypes store data that is notto be interpreted (not explicitly converted when moving databetween different systems) by Oracle. These datatypes are

    intended for binary data or byte strings. For example, you

    can use LONG RAW to store graphics, sound, documents, orarrays of binary data, for which the interpretation is

    dependent on the use.

    #2 (1z0001q225)

    Text literals have properties of which of the following datatypes (choose all that apply):

    A) CHAR

    B) CLOB

    C) VARCHAR2

    D) Float

    Your answer is:

    Correct answer is: AC

    Explanation : According to the documentation available at the Oracle web

    site:Text literals have properties of both the CHAR and

    VARCHAR2 datatypes:

    Within expressions and conditions, Oracle treats textliterals as though they have the datatype CHAR by

    comparing them using blank-padded comparison

  • 8/7/2019 OCA Questions

    12/65

    semantics.

    A text literal can have a maximum length of 4000

    bytes.

    #3 (1z0001q222)

    Each row in the database has an address. Such address is represented by what datatype(fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: DIORW

    Explanation : According to the documentation available at the Oracle website:

    Each row in the database has an address. You can examine arow's address by querying the pseudocolumn ROWID.

    Values of this pseudocolumn are hexadecimal strings

    representing the address of each row. These strings have thedatatype ROWID.

    #4 (1z0001q228)The total length of a date format model cannot exceed how many characters (fill in the

    blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: 22

    Explanation : According to the documentation available at the Oracle web

    site:You can use date format models:

    In the TO_DATE function to translate a charactervalue that is in a format other than the default dateformat into a DATE value

    In the TO_CHAR function to translate a DATE value

    that is in a format other than the default date format

    into a string (for example, to print the date from anapplication)

    The total length of a date format model cannot exceed 22

  • 8/7/2019 OCA Questions

    13/65

    characters.

    #5 (1z0001q231)

    A sequence generates values that are often used for (choose all that apply):

    A) primary keys

    B) sales figures

    C) foreign keys

    D) unique keys

    Your answer is:

    Correct answer is: AD

    Explanation : According to the documentation available at the Oracle web

    site:A sequence is a schema object that can generate uniquesequential values. These values are often used for primary

    and unique keys.

    #6 (1z0001q221)In Oracle, BLOBs have full transactional support.

    A) True

    B) False

    C) This is hard to determine.

    D) None of the choices.

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle website:

    BLOBs have full transactional support. Changes made

    through SQL, the DBMS_LOB package, or the OCIparticipate fully in the transaction. BLOB valuemanipulations can be committed and rolled back. However,

    you cannot save a BLOB locator in a PL/SQL or OCI

    variable in one transaction and then use it in anothertransaction or session.

  • 8/7/2019 OCA Questions

    14/65

    #7 (1z0001q227)

    What is known as a character literal that describes the format of DATE or NUMBER data

    stored in a character string?

    A) representation model

    B) descriptive header

    C) numeric tagger

    D) format model

    Your answer is:

    Correct answer is: D

    Explanation : According to the documentation available at the Oracle web

    site:A format model is a character literal that describes the format

    of DATE or NUMBER data stored in a character string.When you convert a character string into a date or number, aformat model tells Oracle how to interpret the string. In SQL

    statements, you can use a format model as an argument of the

    TO_CHAR and TO_DATE functions:

    To specify the format for Oracle to use to return avalue from the database

    To specify the format for a value you have specified

    for Oracle to store in the database

    #8 (1z0001q232)You cannot use CURRVAL in which of the following SQL statements (choose all that

    apply):

    A) The SELECT list of a subquery in an INSERT statement

    B) This is hard to determine.

    C) The SELECT list of a SELECT statement that is not contained in a subquery

    D) The SET clause of an UPDATE statement

    E) The VALUES clause of an INSERT statement

    F) None of the choices.

    Your answer is:

    Correct answer is: F

    Explanation : According to the documentation available at the Oracle web

  • 8/7/2019 OCA Questions

    15/65

    site:

    You can use CURRVAL and NEXTVAL in:

    The SELECT list of a SELECT statement that is notcontained in a subquery, materialized view, or view

    The SELECT list of a subquery in an INSERTstatement

    The VALUES clause of an INSERT statement

    The SET clause of an UPDATE statement

    #9 (1z0001q220)What datatype enables access to binary file LOBs that are stored in file systems outside

    the Oracle database (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: BEFIL

    Explanation : According to the documentation available at the Oracle website:

    The BFILE datatype enables access to binary file LOBs that

    are stored in file systems outside the Oracle database. A

    BFILE column or attribute stores a BFILE locator, whichserves as a pointer to a binary file on the server's file system.

    The locator maintains the directory alias and the filename.

    #10 (1z0001q234)

    It is a good practice to use ROWID as a table's primary key.

    A) False

    B) This is hard to determine.

    C) True

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle web

    site:

    You should not use ROWID as a table's primary key. If youdelete and reinsert a row with the Import and Export utilities,

    for example, its rowid may change. If you delete a row,

    Oracle may reassign its rowid to a new row inserted later.

  • 8/7/2019 OCA Questions

    16/65

    #11 (1z0001q223)

    Oracle uses what datatype to store the addresses of index-organized and foreign tables

    (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: DIORUW

    Explanation : According to the documentation available at the Oracle website:

    Oracle uses "universal rowids" (urowids) to store the

    addresses of index-organized and foreign tables. Index-organized tables have logical urowids and foreign tables have

    foreign urowids. Both types of urowid are stored in theROWID pseudocolumn (as are the physical rowids of heap-organized tables).

    #12 (1z0001q229)ALL scalar functions in Oracle return null when given a null argument.

    A) False

    B) This is hard to determine.

    C) True

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle website:

    All scalar functions (except REPLACE, NVL, and

    CONCAT) return null when given a null argument. You can

    use the NVL function to return a value when a null occurs.For example, the expression NVL(COMM,0) returns 0 if

    COMM is null or the value of COMM if it is not null.

    #13 (1z0001q224)A text literal must be enclosed in:

    A) semi-colons.

  • 8/7/2019 OCA Questions

    17/65

    B) colons.

    C) single quotation marks.

    D) double quotation marks.

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:

    A text literal must be enclosed in single quotation marks.This reference uses the terms text literal and character literal

    interchangeably.

    #14 (1z0001q230)

    What is known as a schema object that can generate unique sequential values (fill in theblank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: sequence

    Explanation : According to the documentation available at the Oracle web

    site:

    A sequence is a schema object that can generate unique

    sequential values. These values are often used for primaryand unique keys.

    #15 (1z0001q233)

    Within a single SQL statement, Oracle will increment the sequence only twice for eachrow.

    A) False

    B) This is hard to determine.

    C) True

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle web

    site:Within a single SQL statement, Oracle will increment the

    sequence only once for each row. If a statement contains

  • 8/7/2019 OCA Questions

    18/65

    more than one reference to NEXTVAL for a sequence,

    Oracle increments the sequence once and returns the same

    value for all occurrences of NEXTVAL. If a statementcontains references to both CURRVAL and NEXTVAL,

    Oracle increments the sequence and returns the same value

    for both CURRVAL and NEXTVAL regardless of theirorder within the statement.

    #16 (1z0001q215)Oracle DATE columns always contain the date but not the time fields.

    A) False

    B) This is hard to determine.

    C) True

    D) None of the choices.

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle website:

    Oracle DATE columns always contain both the date and time

    fields. If your queries use a date format without a timeportion, you must ensure that the time fields in the DATE

    column are set to zero (that is, midnight). Otherwise, Oracle

    may not return the query results you expect.

    #17 (1z0001q226)An interval literal specifies:

    A) a period of time.

    B) a numerical difference.

    C) a descriptive number.

    D) a floating point number.

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle website:

    An interval literal specifies a period of time. You can specify

    these differences in terms of years and months, or in terms of

    days, hours, minutes, and seconds. Oracle supports two types

  • 8/7/2019 OCA Questions

    19/65

    of interval literals, YEAR TO MONTH and DAY TO

    SECOND. Each type contains a leading field and may

    contain a trailing field. The leading field defines the basicunit of date or time being measured. The trailing field defines

    the smallest increment of the basic unit being considered.

    #18 (1z0001q219)

    What datatype is an ideal substitute to LONG RAW (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: BLO

    Explanation : According to the documentation available at the Oracle web

    site:Oracle Corporation strongly recommends that you convertLONG RAW columns to binary LOB (BLOB) columns.

    LOB columns are subject to far fewer restrictions than

    LONG columns.

    #19 (1z0001q217)

    What datatype stores the year, month, and day of the DATE datatype (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: AEIMPST

    Explanation : According to the documentation available at the Oracle website:

    The TIMESTAMP datatype is an extension of the DATE

    datatype. It stores the year, month, and day of the DATEdatatype, plus hour, minute, and second values.

    #20 (1z0001q216)What function returns the current system date and time (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ADESTY

  • 8/7/2019 OCA Questions

    20/65

    Explanation : According to the documentation available at the Oracle web

    site:

    The date function SYSDATE returns the current system dateand time. The function CURRENT_DATE returns the

    current session date.

    #1 (1z0001q242)You may use two consecutive minus signs in arithmetic expressions to indicate the

    subtraction of a negative value.

    A) This is hard to determine.

    B) True

    C) False

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:

    Do not use two consecutive minus signs (--) in arithmeticexpressions to indicate double negation or the subtraction of

    a negative value. The characters -- are used to begin

    comments within SQL statements. You should separate

    consecutive minus signs with a space or a parenthesis.

    #2 (1z0001q247)In Oracle, the result of comparison conditions can be (choose all that apply):

    A) TRUE

    B) UNKNOWN

    C) ERROR

    D) NULL

    E) FALSE

    Your answer is:

    Correct answer is: ABE

    Explanation : According to the documentation available at the Oracle web

    site:

    Comparison conditions compare one expression with

    another. The result of such a comparison can be TRUE,

  • 8/7/2019 OCA Questions

    21/65

    FALSE, or UNKNOWN.

    #3 (1z0001q239)

    You create a database link in Oracle with what statement (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: create database link

    Explanation : According to the documentation available at the Oracle web

    site:

    You create a database link with the statement CREATE

    DATABASE LINK. The statement lets you specify thisinformation about the database link:

    The name of the database link

    The database connect string to access the remote

    database

    The username and password to connect to the remote

    database

    #4 (1z0001q245)

    In general, Oracle accepts all forms of expressions in all parts of all SQL statements.

    A) True

    B) False

    C) This is hard to determine.

    Your answer is:

    Correct answer is: B

    Explanation : According to the documentation available at the Oracle web

    site:

    Oracle does not accept all forms of expressions in all parts ofall SQL statements. You must use appropriate expression

    notation whenever expr appears in conditions, SQL

    functions, or SQL statements in other parts of this reference.

  • 8/7/2019 OCA Questions

    22/65

    #5 (1z0001q253)

    Analytic functions compute an aggregate value based on a group of rows and return a

    single row for each group.

    A) False

    B) This is hard to determine.

    C) True

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle web

    site:Analytic functions compute an aggregate value based on a

    group of rows. They differ from aggregate functions in that

    they return multiple rows for each group. The group of rowsis called a window and is defined by the analytic clause. Foreach row, a "sliding" window of rows is defined. The

    window determines the range of rows used to perform the

    calculations for the "current row". Window sizes can bebased on either a physical number of rows or a logical

    interval such as time.

    #6 (1z0001q249)

    You can include the actual characters "%" or "_" in a LIKE pattern by using what clause

    (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ACEPS

    Explanation : According to the documentation available at the Oracle web

    site:

    You can include the actual characters "%" or "_" in thepattern by using the ESCAPE clause, which identifies the

    escape character. If the escape character appears in thepattern before the character "%" or "_" then Oracle interpretsthis character literally in the pattern, rather than as a special

    pattern matching character.

    #7 (1z0001q246)

    You can use a condition in the WHERE clause of which of the following statements

    (choose all that apply):

  • 8/7/2019 OCA Questions

    23/65

    A) DELETE

    B) SELECT

    C) UPDATE

    D) This is hard to determine.

    Your answer is:

    Correct answer is: ABC

    Explanation : According to the documentation available at the Oracle web

    site:You can use a condition in the WHERE clause of these

    statements:

    DELETE

    SELECT

    UPDATE

    #8 (1z0001q243)

    The result of concatenating two character strings is always a VARCHAR2 character

    string.

    A) True

    B) This is hard to determine.

    C) False

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:The result of concatenating two character strings is another

    character string. If both character strings are of datatype

    CHAR, the result has datatype CHAR and is limited to 2000

    characters. If either string is of datatype VARCHAR2, theresult has datatype VARCHAR2 and is limited to 4000

    characters. If either argument is a CLOB, the result is a

    temporary CLOB. Trailing blanks in character strings arepreserved by concatenation, regardless of the datatypes of the

    string or CLOB.

  • 8/7/2019 OCA Questions

    24/65

    #9 (1z0001q248)

    What type of conditions specify a test involving pattern matching (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: EIKL

    Explanation : According to the documentation available at the Oracle website:

    The LIKE conditions specify a test involving pattern

    matching. Whereas the equality operator (=) exactly matches

    one character value to another, the LIKE conditions match aportion of one character value to another by searching the

    first value for the pattern specified by the second. LIKE

    calculates strings using characters as defined by the input

    character set. LIKEC uses unicode complete characters.LIKE2 uses UCS2 codepoints. LIKE4 uses USC4

    codepoints.

    #10 (1z0001q237)You use comments in a SQL statement to pass hints to the Oracle optimizer.

    A) False

    B) This is hard to determine.

    C) True

    D) None of the choices.

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle website:

    You can use comments in a SQL statement to pass

    instructions, or hints, to the Oracle optimizer. The optimizeruses these hints as suggestions for choosing an execution

    plan for the statement.

    #11 (1z0001q251)

    Single-row functions can appear in which of the following (choose all that apply):

    A) WHERE clauses

  • 8/7/2019 OCA Questions

    25/65

    B) START WITH and CONNECT BY clauses

    C) select lists

    D) HAVING clauses

    Your answer is:

    Correct answer is: ABCD

    Explanation : According to the documentation available at the Oracle web

    site:

    Single-row functions return a single result row for every rowof a queried table or view. These functions can appear in

    select lists, WHERE clauses, START WITH and CONNECT

    BY clauses, and HAVING clauses.

    #12 (1z0001q236)A comment can appear between which of the following in a SQL statement (choose allthat apply):

    A) punctuation marks

    B) This is hard to determine.

    C) parameters

    D) keywords

    Your answer is:Correct answer is: ACD

    Explanation : According to the documentation available at the Oracle website:

    A comment can appear between any keywords, parameters,

    or punctuation marks in a statement. You can include acomment in a statement using either of these means:

    Begin the comment with a slash and an asterisk (/*).

    Proceed with the text of the comment. This text can

    span multiple lines. End the comment with an asterisk

    and a slash (*/). The opening and terminatingcharacters need not be separated from the text by a

    space or a line break.

    Begin the comment with -- (two hyphens). Proceedwith the text of the comment. This text cannot extend

    to a new line. End the comment with a line break.

  • 8/7/2019 OCA Questions

    26/65

    #13 (1z0001q254)

    In Oracle, a query nested within another SQL statement is called a (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: subquery

    Explanation : According to the documentation available at the Oracle web

    site:

    A query is an operation that retrieves data from one or more

    tables or views. In this reference, a top-level SELECTstatement is called a query, and a query nested within another

    SQL statement is called a subquery.

    #14 (1z0001q244)

    Oracle treats zero-length character strings as nulls.

    A) False

    B) True

    C) This is hard to determine.

    Your answer is:

    Correct answer is: BExplanation : According to the documentation available at the Oracle web

    site:

    Although Oracle treats zero-length character strings as nulls,concatenating a zero-length character string with another

    operand always results in the other operand, so null can result

    only from the concatenation of two null strings. However,this may not continue to be true in future versions of Oracle.

    To concatenate an expression that might be null, use the

    NVL function to explicitly convert the expression to a zero-

    length string.

    #15 (1z0001q241)

    You can use ____________ in a SQL expression to override operator precedence.

    A) colons

    B) parentheses

  • 8/7/2019 OCA Questions

    27/65

    C) commas

    D) semi-colons

    Your answer is:

    Correct answer is: BExplanation : According to the documentation available at the Oracle web

    site:

    You can use parentheses in an expression to override

    operator precedence. Oracle evaluates expressions insideparentheses before evaluating those outside.

    #16 (1z0001q252)

    In Oracle, all aggregate functions except which of the following ignore nulls (choose all

    that apply):

    A) COUNT(*)

    B) SUM

    C) GROUPING

    D) AVERAGE

    Your answer is:

    Correct answer is: AC

    Explanation : According to the documentation available at the Oracle website:All aggregate functions except COUNT(*) and GROUPING

    ignore nulls. You can use the NVL function in the argument

    to an aggregate function to substitute a value for a null.

    COUNT never returns null, but returns either a number orzero. For all the remaining aggregate functions, if the data set

    contains no rows, or contains only rows with nulls as

    arguments to the aggregate function, then the function returnsnull.

    #17 (1z0001q235)

    Comments within SQL statements:

    A) make your application less secure

    B) do not affect the statement execution

  • 8/7/2019 OCA Questions

    28/65

    C) make your application faster to run

    D) This is hard to determine.

    Your answer is:

    Correct answer is: BExplanation : According to the documentation available at the Oracle web

    site:

    Comments within SQL statements do not affect the statement

    execution, but they may make your application easier for youto read and maintain. You may want to include a comment in

    a statement that describes the statement's purpose within your

    application.

    #18 (1z0001q240)

    Database link names (choose all that apply):

    A) can contain the "at" sign

    B) can contain periods

    C) can be as long as 128 bytes

    D) This is hard to determine.

    Your answer is:

    Correct answer is: ABCExplanation : According to the documentation available at the Oracle web

    site:

    When you create a database link, you must specify its name.

    Database link names are different from names of other types

    of objects. They can be as long as 128 bytes and can containperiods (.) and the "at" sign (@).

    #19 (1z0001q250)

    If you call a SQL function with an argument of a datatype other than the datatype

    expected by that SQL function, Oracle consults with you before converting the argumentto the expected datatype.

    A) False

    B) True

    C) This is hard to determine.

  • 8/7/2019 OCA Questions

    29/65

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle web

    site:

    If you call a SQL function with an argument of a datatype

    other than the datatype expected by the SQL function, Oracleimplicitly converts the argument to the expected datatype

    before performing the SQL function. If you call a SQLfunction with a null argument, the SQL function

    automatically returns null. The only SQL functions that do

    not necessarily follow this behavior are CONCAT, NVL, and

    REPLACE.

    #20 (1z0001q238)

    Which of the following can be partitioned (choose all that apply):

    A) Indexes

    B) Hints

    C) Tables

    D) Bitmaps

    Your answer is:

    Correct answer is: AC

    Explanation : According to the documentation available at the Oracle web

    site:

    Tables and indexes can be partitioned. When partitioned,these schema objects consist of a number of parts called

    partitions, all of which have the same logical attributes. For

    example, all partitions in a table share the same column and

    constraint definitions, and all partitions in an index share thesame index columns.

    #1 (1z0001q257)

    During a hierarchical query, Oracle always processes the WHERE clause before the

    CONNECT BY clause.

    A) True

    B) This is hard to determine.

    C) False

  • 8/7/2019 OCA Questions

    30/65

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:

    Oracle processes the WHERE clause either before or after

    the CONNECT BY clause depending on whether theWHERE clause contains any join predicates (as described in

    the preceding bullet list).

    #2 (1z0001q269)What type of joins extends the result of a simple join?

    A) left join

    B) right join

    C) outer join

    D) equil join

    E) simple join

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:

    An outer join extends the result of a simple join. An outer

    join returns all rows that satisfy the join condition and alsoreturns some or all of those rows from one table for which no

    rows from the other satisfy the join condition.

    #3 (1z0001q270)

    To write a query that performs an outer join of tables A and B and returns all rows fromB, you need a:

    A) left outer join

    B) inner join

    C) equil join

    D) right outer join

    Your answer is:

    Correct answer is: D

    Explanation : According to the documentation available at the Oracle web

  • 8/7/2019 OCA Questions

    31/65

    site:

    To write a query that performs an outer join of tables A and

    B and returns all rows from B (a right outer join), use theANSI RIGHT [OUTER] syntax, or apply the outer join

    operator (+) to all columns of A in the join condition. For all

    rows in B that have no matching rows in A, Oracle returnsnull for any select list expressions containing columns of A.

    #4 (1z0001q263)

    Oracle performs a join whenever multiple tables appear in the query's _________ clause

    (fill in the blank):

    Please type in your answer in the form :

    Your answer is:Correct answer is: FMOR

    Explanation : According to the documentation available at the Oracle web

    site:

    A join is a query that combines rows from two or more

    tables, views, or materialized views. Oracle performs a joinwhenever multiple tables appear in the query's FROM clause.

    The query's select list can select any columns from any of

    these tables. If any two of these tables have a column namein common, you must qualify all references to these columns

    throughout the query with table names to avoid ambiguity.

    #5 (1z0001q261)

    The mechanism by which Oracle sorts values for the ORDER BY clause is specified

    explicitly by what initialization parameter (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: NLS_SORT

    Explanation : According to the documentation available at the Oracle website:

    The mechanism by which Oracle sorts values for the ORDER

    BY clause is specified either explicitly by the NLS_SORTinitialization parameter or implicitly by the

    NLS_LANGUAGE initialization parameter. You can change

    the sort mechanism dynamically from one linguistic sortsequence to another using the ALTER SESSION statement.

    You can also specify a specific sort sequence for a single

  • 8/7/2019 OCA Questions

    32/65

    query by using the NLSSORT function with the NLS_SORT

    parameter in the ORDER BY clause.

    #7 (1z0001q265)

    What is known as a join with a join condition containing an equality operator (fill in theblank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: equijoin

    Explanation : According to the documentation available at the Oracle web

    site:

    An equijoin is a join with a join condition containing an

    equality operator. An equijoin combines rows that haveequivalent values for the specified columns. Depending on

    the internal algorithm the optimizer chooses to execute thejoin, the total size of the columns in the equijoin condition in

    a single table may be limited to the size of a data block minus

    some overhead. The size of a data block is specified by the

    initialization parameter DB_BLOCK_SIZE.

    #8 (1z0001q273)

    What command do you use to rebuild an existing index (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ADEILNRTX

    Explanation : According to the documentation available at the Oracle web

    site:Use the ALTER INDEX statement to change or rebuild an

    existing index.

    #9 (1z0001q271)

    What SQL command do you use to change the increment, minimum and maximum

    values, cached numbers, and behavior of an existing sequence (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

  • 8/7/2019 OCA Questions

    33/65

    Correct answer is: ACELNQRSTU

    Explanation : According to the documentation available at the Oracle website:

    Use the ALTER SEQUENCE statement to change the

    increment, minimum and maximum values, cached numbers,

    and behavior of an existing sequence. This statement affectsonly future sequence numbers.

    #10 (1z0001q274)

    You may use the CREATE INDEX statement to create an index on (choose all thatapply):

    A) This is hard to determine.

    B) One or more scalar typed object attributes of a cluster

    C) One or more columns of a table

    D) A nested table storage table

    Your answer is:

    Correct answer is: BCD

    Explanation : According to the documentation available at the Oracle website:

    Use the CREATE INDEX statement to create an index on

    One or more columns of a table, a partitioned table,

    an index-organized table, or a cluster

    One or more scalar typed object attributes of a table

    or a cluster

    A nested table storage table for indexing a nested

    table column

    #11 (1z0001q264)Oracle never executes a join of three or more tables orderly.

    A) True

    B) This is hard to determine.

    C) False

    Your answer is:

    Correct answer is: C

  • 8/7/2019 OCA Questions

    34/65

    Explanation : According to the documentation available at the Oracle web

    site:

    To execute a join of three or more tables, Oracle first joinstwo of the tables based on the join conditions comparing

    their columns and then joins the result to another table based

    on join conditions containing columns of the joined tablesand the new table. Oracle continues this process until all

    tables are joined into the result. The optimizer determines the

    order in which Oracle joins tables based on the joinconditions, indexes on the tables, and, in the case of the cost-

    based optimization approach, statistics for the tables.

    #12 (1z0001q268)

    An inner join is always a:

    A) outer join

    B) equil join

    C) simple join

    D) right join

    E) left join

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle website:An inner join (sometimes called a "simple join") is a join of

    two or more tables that returns only those rows that satisfy

    the join condition.

    #13 (1z0001q267)When will a Cartesian product be returned?

    A) when two tables in a join query have only a single join condition

    B) when two tables in a join query have too many join conditions

    C) This is hard to determine.

    D) when two tables in a join query have no join condition

    Your answer is:

    Correct answer is: D

  • 8/7/2019 OCA Questions

    35/65

    Explanation : According to the documentation available at the Oracle web

    site:

    If two tables in a join query have no join condition, Oraclereturns their Cartesian product. Oracle combines each row of

    one table with each row of the other. A Cartesian product

    always generates many rows and is rarely useful. Forexample, the Cartesian product of two tables, each with 100

    rows, has 10,000 rows. Always include a join condition

    unless you specifically need a Cartesian product. If a queryjoins three or more tables and you do not specify a join

    condition for a specific pair, the optimizer may choose a join

    order that avoids producing an intermediate Cartesian

    product.

    #14 (1z0001q259)

    In Oracle SQL, all set operators have equal precedence.

    A) True

    B) This is hard to determine.

    C) False

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle web

    site:You can combine multiple queries using the set operators

    UNION, UNION ALL, INTERSECT, and MINUS. All setoperators have equal precedence. If a SQL statement contains

    multiple set operators, Oracle evaluates them from the left to

    right if no parentheses explicitly specify another order.

    #15 (1z0001q255)

    In Oracle, the select list appears after the SELECT keyword and before the FROMclause.

    A) True

    B) This is hard to determine.

    C) False

    Your answer is:

    Correct answer is: A

  • 8/7/2019 OCA Questions

    36/65

    Explanation : According to the documentation available at the Oracle web

    site:

    The list of expressions that appears after the SELECTkeyword and before the FROM clause is called the select list.

    Within the select list, you specify one or more columns in the

    set of rows you want Oracle to return from one or moretables, views, or materialized views. The number of columns,

    as well as their datatype and length, are determined by the

    elements of the select list.

    #16 (1z0001q260)The UNION ALL operator does not eliminate duplicate selected rows from the result set.

    A) True

    B) FalseC) This is hard to determine.

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle website:

    The UNION operator returns only distinct rows that appear

    in either result, while the UNION ALL operator returns all

    rows. The UNION ALL operator does not eliminate

    duplicate selected rows.

    #17 (1z0001q266)

    When performing an equijoin, the size of a data block involved is specified by what

    initialization parameter (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: BCDEIKLOSZ_Explanation : According to the documentation available at the Oracle web

    site:

    According to the documentation available at the Oracle web

    site:An equijoin is a join with a join condition containing an

    equality operator. An equijoin combines rows that have

    equivalent values for the specified columns. Depending on

    the internal algorithm the optimizer chooses to execute the

  • 8/7/2019 OCA Questions

    37/65

    join, the total size of the columns in the equijoin condition in

    a single table may be limited to the size of a data block minus

    some overhead. The size of a data block is specified by theinitialization parameter DB_BLOCK_SIZE.

    #18 (1z0001q258)

    Which of the following are the valid set operators in Oracle SQL (choose all that apply):

    A) UNION ALL

    B) UNION

    C) MINUS

    D) INTERSECT

    Your answer is:Correct answer is: ABCD

    Explanation : According to the documentation available at the Oracle web

    site:

    You can combine multiple queries using the set operatorsUNION, UNION ALL, INTERSECT, and MINUS. All set

    operators have equal precedence. If a SQL statement contains

    multiple set operators, Oracle evaluates them from the left toright if no parentheses explicitly specify another order.

    #19 (1z0001q256)

    The optimizer uses what to choose an execution plan for your select statement (fill in the

    blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: hints

    Explanation : According to the documentation available at the Oracle website:

    You can use comments in a SELECT statement to pass

    instructions, or hints, to the Oracle optimizer. The optimizeruses hints to choose an execution plan for the statement.

    #20 (1z0001q272)The ALTER SEQUENCE statement can affect only the future sequence numbers.

  • 8/7/2019 OCA Questions

    38/65

    A) False

    B) True

    C) This is hard to determine.

    Your answer is:

    Correct answer is: B

    Explanation : According to the documentation available at the Oracle web

    site:

    Use the ALTER SEQUENCE statement to change theincrement, minimum and maximum values, cached numbers,

    and behavior of an existing sequence. This statement affects

    only future sequence numbers.

    #20 (1z0001q272)The ALTER SEQUENCE statement can affect only the future sequence numbers.

    A) False

    B) True

    C) This is hard to determine.

    Your answer is:

    Correct answer is: B

    Explanation : According to the documentation available at the Oracle website:Use the ALTER SEQUENCE statement to change the

    increment, minimum and maximum values, cached numbers,

    and behavior of an existing sequence. This statement affects

    only future sequence numbers.

    #1 (1z0001q279)

    What statement do you use to dynamically alter your Oracle instance (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: AELMRSTY

    Explanation : According to the documentation available at the Oracle web

    site:Use the ALTER SYSTEM statement to dynamically alter

  • 8/7/2019 OCA Questions

    39/65

    your Oracle instance. The settings stay in effect as long as

    the database is mounted.

    #2 (1z0001q295)

    When you create a database user, what clause can you use to make the user global (fill inthe blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ABGLOY

    Explanation : According to the documentation available at the Oracle web

    site:The GLOBALLY clause lets you create a global user. Such a

    user must be authenticated by the enterprise directoryservice.

    #3 (1z0001q284)

    When the REMOTE_LOGIN_PASSWORDFILE initialization parameter is setto_________, Oracle returns an error when you attempt to re-create a database.

    Please type in your answer in the form :

    Your answer is:Correct answer is: CEILSUVX

    Explanation : According to the documentation available at the Oracle web

    site:

    To create a database, you must have the SYSDBA systemprivilege.

    If the REMOTE_LOGIN_PASSWORDFILE initialization

    parameter is set to EXCLUSIVE, Oracle returns an errorwhen you attempt to re-create the database. To avoid this

    message, either set the parameter to SHARED, or re-create

    your password file before re-creating the database.

    #4 (1z0001q299)To drop a role, you must have been granted the role with what option (fill in the blank):

    Please type in your answer in the form :

  • 8/7/2019 OCA Questions

    40/65

    Your answer is:

    Correct answer is: ADIMNOPT

    Explanation : According to the documentation available at the Oracle web

    site:

    You must have been granted the role with the ADMIN

    OPTION or you must have the DROP ANY ROLE systemprivilege.

    #5 (1z0001q283)

    To create a database, you must have what system privilege (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ABDSYExplanation : According to the documentation available at the Oracle web

    site:

    To create a database, you must have the SYSDBA system

    privilege.If the REMOTE_LOGIN_PASSWORDFILE initialization

    parameter is set to EXCLUSIVE, Oracle returns an error

    when you attempt to re-create the database. To avoid thismessage, either set the parameter to SHARED, or re-create

    your password file before re-creating the database.

    #6 (1z0001q296)

    When creating a user, what clause can you use to allow the user to allocate up to certain

    bytes of space in the tablespace (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: AOQTU

    Explanation : According to the documentation available at the Oracle web

    site:Use the QUOTA clause to allow the user to allocate up tointeger bytes of space in the tablespace. Use K or M to

    specify the quota in kilobytes or megabytes. This quota is the

    maximum space in the tablespace the user can allocate.

  • 8/7/2019 OCA Questions

    41/65

    #7 (1z0001q286)

    To create a relational table in another user's schema, you must have what system

    privilege (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ABCELNRTY

    Explanation : According to the documentation available at the Oracle web

    site:

    To create a relational table in your own schema, you must

    have the CREATE TABLE system privilege. To create atable in another user's schema, you must have CREATE

    ANY TABLE system privilege. Also, the owner of the

    schema to contain the table must have either space quota on

    the tablespace to contain the table or UNLIMITEDTABLESPACE system privilege.

    #8 (1z0001q275)

    Oracle supports which of the following types of index (choose all that apply):

    A) B-tree indexes

    B) Function-based indexes

    C) Domain indexes

    D) Partitioned indexes

    E) Bitmap indexes

    Your answer is:

    Correct answer is: ABCDE

    Explanation : According to the documentation available at the Oracle website:

    Oracle supports several types of index:

    Normal indexes (by default, Oracle creates B-treeindexes)

    Bitmap indexes, which store rowids associated with

    a key value as a bitmap

    Partitioned indexes, which consist of partitionscontaining an entry for each value that appears in the

    indexed column(s) of the table

    Function-based indexes, which are based on

    expressions. They enable you to construct queries that

  • 8/7/2019 OCA Questions

    42/65

    evaluate the value returned by an expression, which

    in turn may include functions (built-in or user-

    defined).

    Domain indexes, which are instances of an

    application-specific index of type indextype

    #9 (1z0001q288)

    In Oracle, the absolute maximum number of columns in a table is (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: 1000

    Explanation : According to the documentation available at the Oracle website:

    The absolute maximum number of columns in a table is

    1000. However, when you create an object table (or arelational table with columns of object, nested table, varray,

    or REF type), Oracle maps the columns of the user-defined

    types to relational columns, creating in effect "hiddencolumns" that count toward the 1000-column limit.

    #10 (1z0001q294)

    When you create a database user, what clause can you use to create an external user (fillin the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: AELNRTXY

    Explanation : According to the documentation available at the Oracle website:

    Specify EXTERNALLY to create an external user. Such a

    user must be authenticated by an external service (such as anoperating system or a third-party service). In this case, Oracleto relies on the login authentication of the operating system

    to ensure that a specific operating system user has access to a

    specific database user.

  • 8/7/2019 OCA Questions

    43/65

    #11 (1z0001q281)

    What statement can you use to compile a database trigger (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: AEGILRT

    Explanation : According to the documentation available at the Oracle website:

    Use the ALTER TRIGGER statement to enable, disable, or

    compile a database trigger.

    #12 (1z0001q282)

    If you use the CREATE DATABASE statement on an existing database, all data in the

    datafiles will be lost.

    A) False

    B) True

    C) This is hard to determine.

    Your answer is:

    Correct answer is: B

    Explanation : According to the documentation available at the Oracle web

    site:Use the CREATE DATABASE statement to create a

    database, making it available for general use.

    This statement erases all data in any specified datafiles thatalready exist in order to prepare them for initial database use.

    If you use the statement on an existing database, all data in

    the datafiles is lost.

    #13 (1z0001q297)When creating a user, what clause can you use to specify that you want the user's

    password to expire (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ADEIOPRSWX

    Explanation : According to the documentation available at the Oracle web

    site:

  • 8/7/2019 OCA Questions

    44/65

    Specify PASSWORD EXPIRE if you want the user's

    password to expire. This setting forces the user (or the DBA)

    to change the password before the user can log in to thedatabase.

    #14 (1z0001q298)

    You may use the __________ statement to remove a role from the database (fill in the

    blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: DELOPR

    Explanation : According to the documentation available at the Oracle web

    site:Use the DROP ROLE statement to remove a role from thedatabase. When you drop a role, Oracle revokes it from all

    users and roles to whom it has been granted and removes it

    from the database. User sessions in which the role is already

    enabled are not affected. However, no new user session canenable the role after it is dropped.

    #15 (1z0001q289)

    When you create a table, what clause lets you specify a value to be assigned to the

    column if a subsequent INSERT statement omits a value for the column (fill in theblank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ADEFLTU

    Explanation : According to the documentation available at the Oracle web

    site:

    The DEFAULT clause lets you specify a value to be assigned

    to the column if a subsequent INSERT statement omits avalue for the column. The datatype of the expression must

    match the datatype of the column. The column must also be

    long enough to hold this expression.

  • 8/7/2019 OCA Questions

    45/65

    #16 (1z0001q293)

    After creating a user in your database, you should grant the user at least what privilege so

    that he can connect (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ACEINORST

    Explanation : According to the documentation available at the Oracle web

    site:

    You must have CREATE USER system privilege. When you

    create a user with the CREATE USER statement, the user'sprivilege domain is empty. To log on to Oracle, a user must

    have CREATE SESSION system privilege. Therefore, after

    creating a user, you should grant the user at least the

    CREATE SESSION privilege.

    #17 (1z0001q280)

    The ALTER TRIGGER command can be used to change the definition of an existing

    trigger.

    A) True

    B) This is hard to determine.

    C) False

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:This statement does not change the declaration or definition

    of an existing trigger. To redeclare or redefine a trigger, use

    the CREATE TRIGGER statement with the OR REPLACE

    keywords.

    #18 (1z0001q276)To create an index in another schema, you must have what system privilege (fill in the

    blank):

    Please type in your answer in the form :

    Your answer is:

  • 8/7/2019 OCA Questions

    46/65

    Correct answer is: ACDEINRTXY

    Explanation : According to the documentation available at the Oracle website:

    To create an index in another schema, you must have

    CREATE ANY INDEX system privilege. Also, the owner of

    the schema to contain the index must have either theUNLIMITED TABLESPACE system privilege or space

    quota on the tablespaces to contain the index or index

    partitions.

    #19 (1z0001q285)

    Tables are created with no data even when a query is specified.

    A) False

    B) This is hard to determine.

    C) True

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle web

    site:

    Tables are created with no data unless a query is specified.You can add rows to a table with the INSERT statement.

    After creating a table, you can define additional columns,partitions, and integrity constraints with the ADD clause of

    the ALTER TABLE statement. You can change thedefinition of an existing column or partition with the

    MODIFY clause of the ALTER TABLE statement.

    #20 (1z0001q278)

    What statement do you use to specify any of the conditions that affect your connection tothe database (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: AEILNORST

    Explanation : According to the documentation available at the Oracle web

    site:

    Use the ALTER SESSION statement to specify or modify

  • 8/7/2019 OCA Questions

    47/65

    any of the conditions or parameters that affect your

    connection to the database. The statement stays in effect until

    you disconnect from the database.

    #1 (1z0001q318)

    What is the PL/SQL construct that lets you name a work area and access its stored

    information (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: cursor

    Explanation : According to the documentation available at the Oracle web

    site:Oracle uses work areas to execute SQL statements and storeprocessing information. A PL/SQL construct called a cursor

    lets you name a work area and access its stored information.

    There are two kinds of cursors: implicit and explicit. PL/SQL

    implicitly declares a cursor for all SQL data manipulationstatements, including queries that return only one row. For

    queries that return more than one row, you can explicitly

    declare a cursor to process the rows individually.

    #2 (1z0001q306)You can specify RESETLOGS and NORESETLOGS with ALTER DATABASE only

    after:

    A) performing incomplete media recovery

    B) performing complete media recovery with a backup control file

    C) This is hard to determine.

    Your answer is:

    Correct answer is: ABExplanation : According to the documentation available at the Oracle web

    site:

    Specify NORESETLOGS to retain the current state of the log

    sequence number and redo log files. Restriction: You canspecify RESETLOGS and NORESETLOGS only after

    performing incomplete media recovery or complete media

    recovery with a backup control file. In any other case, Oracle

    uses the NORESETLOGS automatically.

  • 8/7/2019 OCA Questions

    48/65

    #3 (1z0001q315)

    Which of the following are PL/SQL datatypes (choose all that apply):

    A) BOOLEAN

    B) BINARY_INTEGER

    C) NUMBER

    D) DATE

    E) CHAR

    Your answer is:

    Correct answer is: AB

    Explanation : According to the documentation available at the Oracle website:

    Variables can have any SQL datatype, such as CHAR,DATE, or NUMBER, or any PL/SQL datatype, such as

    BOOLEAN or BINARY_INTEGER. For example, assume

    that you want to declare a variable named part_no to hold 4-digit numbers and a variable named in_stock to hold the

    Boolean value TRUE or FALSE.

    #4 (1z0001q317)

    Declaring a constant in PL/SQL requires that you add the keyword __________ andimmediately assign a value to the constant (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ACNOST

    Explanation : According to the documentation available at the Oracle web

    site:

    Declaring a constant is like declaring a variable except that

    you must add the keyword CONSTANT and immediatelyassign a value to the constant. Thereafter, no more

    assignments to the constant are allowed.

    #5 (1z0001q314)In PL/SQL, you can call local subprograms ONLY from the block in which they are

    defined.

  • 8/7/2019 OCA Questions

    49/65

    A) False

    B) This is hard to determine.

    C) True

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:You can nest sub-blocks in the executable and exception-

    handling parts of a PL/SQL block or subprogram but not in

    the declarative part. Also, you can define local subprogramsin the declarative part of any block. However, you can call

    local subprograms only from the block in which they are

    defined.

    #6 (1z0001q319)PL/SQL implicitly declares a cursor for all SQL data manipulation statements, excluding

    queries that return only one row.

    A) This is hard to determine.

    B) False

    C) True

    Your answer is:

    Correct answer is: B

    Explanation : According to the documentation available at the Oracle website:

    Oracle uses work areas to execute SQL statements and store

    processing information. A PL/SQL construct called a cursorlets you name a work area and access its stored information.

    There are two kinds of cursors: implicit and explicit. PL/SQL

    implicitly declares a cursor for all SQL data manipulation

    statements, including queries that return only one row. Forqueries that return more than one row, you can explicitly

    declare a cursor to process the rows individually.

    #7 (1z0001q311)

    Which of the following correctly describe PL/SQL (choose all that apply):

  • 8/7/2019 OCA Questions

    50/65

    A) This is hard to determine.

    B) It avoids nested sub-blocks

    C) It is a block-structured language

    D) It uses physical blocks

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:

    PL/SQL is a block-structured language. That is, the basicunits (procedures, functions, and anonymous blocks) that

    make up a PL/SQL program are logical blocks, which can

    contain any number of nested sub-blocks. Typically, eachlogical block corresponds to a problem or subproblem to be

    solved. Thus, PL/SQL supports the divide-and-conquerapproach to problem solving called stepwise refinement.

    #8 (1z0001q309)When you specify the STANDBY DATABASE clause with ALTER DATABASE, the

    standby database must be mounted but not open.

    A) False

    B) True

    C) This is hard to determine.

    Your answer is:

    Correct answer is: B

    Explanation : According to the documentation available at the Oracle website:

    Specify the STANDBY DATABASE clause to recover the

    standby database using the control file and archived redo logfiles copied from the primary database. The standby database

    must be mounted but not open.

    #9 (1z0001q303)

    Oracle implicitly commits the current transaction before but not after every DDLstatement.

    A) True

  • 8/7/2019 OCA Questions

    51/65

    B) False

    C) This is hard to determine.

    Your answer is:

    Correct answer is: BExplanation : According to the documentation available at the Oracle web

    site:

    Oracle implicitly commits the current transaction before and

    after every DDL statement.

    #10 (1z0001q312)You can nest sub-blocks in what part of a PL/SQL block (choose all that apply):

    A) This is hard to determine.B) declarative

    C) executable

    D) exception-handling

    Your answer is:

    Correct answer is: CD

    Explanation : According to the documentation available at the Oracle website:

    You can nest sub-blocks in the executable and exception-handling parts of a PL/SQL block or subprogram but not inthe declarative part. Also, you can define local subprograms

    in the declarative part of any block. However, you can call

    local subprograms only from the block in which they are

    defined.

    #11 (1z0001q301)

    Which of the following SQL commands require exclusive access to the specified object

    (choose all that apply):

    A) SELECT

    B) CREATE

    C) ALTER

    D) DROP

  • 8/7/2019 OCA Questions

    52/65

    Your answer is:

    Correct answer is: BCD

    Explanation : According to the documentation available at the Oracle web

    site:

    The CREATE, ALTER, and DROP commands require

    exclusive access to the specified object. For example, anALTER TABLE statement fails if another user has an open

    transaction on the specified table.

    #12 (1z0001q310)When you want to perform tablespace recovery, what clause do you specify to recover

    only the specified tablespace (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ABCELPST

    Explanation : According to the documentation available at the Oracle web

    site:Specify the TABLESPACE clause to recover only the

    specified tablespaces. You can use this clause if the database

    is open or closed, provided the tablespaces to be recoveredare offline.

    #13 (1z0001q307)You cannot open a database READ ONLY when (choose all that apply):

    A) it requires recovery.

    B) it is currently opened READ WRITE by another instance.

    C) while the database is open READ ONLY

    Your answer is:

    Correct answer is: ABC

    Explanation : According to the documentation available at theOracle web site:

    You cannot open a database READ ONLY if it is

    currently opened READ WRITE by another instance.

    You cannot open a database READ ONLY if it

    requires recovery.

    You cannot take tablespaces offline while the

  • 8/7/2019 OCA Questions

    53/65

    database is open READ ONLY. However, you can

    take datafiles offline and online, and you can recover

    offline datafiles and tablespaces while the database isopen READ ONLY.

    #14 (1z0001q302)Which of the following SQL commands do NOT require exclusive access to the specified

    object (choose all that apply):

    A) AUDIT

    B) REVOKE

    C) COMMENT

    D) GRANT

    E) ANALYZE

    Your answer is:

    Correct answer is: ABCDE

    Explanation : According to the documentation available at the Oracle web

    site:The GRANT, REVOKE, ANALYZE, AUDIT, and

    COMMENT commands do not require exclusive access to

    the specified object. For example, you can analyze a table

    while other users are updating the table.

    #15 (1z0001q316)

    What is the assignment operator in PL/SQL (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: :=Explanation : According to the documentation available at the Oracle web

    site:

    You can assign values to a variable in three ways. The first

    way uses the assignment operator (:=), a colon followed byan equal sign. You place the variable to the left of the

    operator and an expression (which can include function calls)

    to the right.

  • 8/7/2019 OCA Questions

    54/65

    #16 (1z0001q313)

    In PL/SQL, you can define local subprograms in the declarative part of any block.

    A) True

    B) This is hard to determine.

    C) False

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle web

    site:You can nest sub-blocks in the executable and exception-

    handling parts of a PL/SQL block or subprogram but not in

    the declarative part. Also, you can define local subprogramsin the declarative part of any block. However, you can calllocal subprograms only from the block in which they are

    defined.

    #17 (1z0001q308)

    What option do you use with the ALTER DATABASE command to have Oracleautomatically generate the name of the next archived redo log file needed to continue the

    recovery operation (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: ACIMOTU

    Explanation : According to the documentation available at the Oracle web

    site:Specify AUTOMATIC if you want Oracle to automatically

    generate the name of the next archived redo log file needed

    to continue the recovery operation. If the

    LOG_ARCHIVE_DEST_n parameters are defined, Oracle

    scans those that are valid and enabled for the first localdestination. It uses that destination in conjunction with

    LOG_ARCHIVE_FORMAT to generate the target redo logfilename. If the LOG_ARCHIVE_DEST_n parameters are

    not defined, Oracle uses the value of the

    LOG_ARCHIVE_DEST parameter instead.

  • 8/7/2019 OCA Questions

    55/65

    #18 (1z0001q304)

    What option do you use with the ALTER DATABASE command to reset the current log

    sequence number to 1 and discards any redo information that was not applied (fill in theblank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: EGLORST

    Explanation : According to the documentation available at the Oracle web

    site:

    Specify RESETLOGS to reset the current log sequencenumber to 1 and discards any redo information that was not

    applied during recovery, ensuring that it will never be

    applied. This effectively discards all changes that are in the

    redo log, but not in the database.

    #19 (1z0001q305)

    What option do you use with the ALTER DATABASE command to open the database

    after performing media recovery with an incomplete recovery using the RECOVER

    clause or with a backup control file (fill in the blank):

    Please type in your answer in the form :

    Your answer is:Correct answer is: EGLORST

    Explanation : According to the documentation available at the Oracle web

    site:

    You must specify RESETLOGS to open the database after

    performing media recovery with an incomplete recoveryusing the RECOVER clause or with a backup control file.

    After opening the database with this clause, you should

    perform a complete database backup.

    #20 (1z0001q300)In Oracle, a set of privileges that can be granted to users is known as a (fill in the blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: role

    Explanation : According to the documentation available at the Oracle web

  • 8/7/2019 OCA Questions

    56/65

    site:

    Use the CREATE ROLE statement to create a role, which is

    a set of privileges that can be granted to users or to otherroles. You can use roles to administer database privileges.

    You can add privileges to a role and then grant the role to a

    user. The user can then enable the role and exercise theprivileges granted by the role.

    #1 (1z0001q329)

    In a WHILE-LOOP statement, a condition is evaluated _________ each iteration of the

    loop.

    A) After

    B) During

    C) Before

    D) This is hard to determine.

    Your answer is:

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle web

    site:

    The WHILE-LOOP statement associates a condition with asequence of statements. Before each iteration of the loop, the

    condition is evaluated. If the condition is true, the sequence

    of statements is executed, then control resumes at the top ofthe loop. If the condition is false or null, the loop is bypassed

    and control passes to the next statement.

    #2 (1z0001q340)

    What statement can you use to explicitly lock the entire table (fill in the blank):

    Please type in your answer in the form :

    Your answer is:Correct answer is: ABCEKLOT

    Explanation : According to the documentation available at the Oracle website:

    With the LOCK TABLE statement, you can explicitly lock

    entire tables. With the SELECT FOR UPDATE statement,you can explicitly lock specific rows of a table to make sure

    they do not change before an update or delete is executed.

  • 8/7/2019 OCA Questions

    57/65

    However, Oracle automatically obtains row-level locks at

    update or delete time. So, use the FOR UPDATE clause only

    if you want to lock the rows before the update or delete.

    #3 (1z0001q321)Which of the following statements can you use to control a cursor (choose all that apply):

    A) OPEN

    B) APPEND

    C) CLOSE

    D) FETCH

    Your answer is:

    Correct answer is: ACDExplanation : According to the documentation available at the Oracle web

    site:

    You use the OPEN, FETCH, and CLOSE statements to

    control a cursor. The OPEN statement executes the queryassociated with the cursor, identifies the result set, and

    positions the cursor before the first row. The FETCH

    statement retrieves the current row and advances the cursor

    to the next row. When the last row has been processed, theCLOSE statement disables the cursor.

    #4 (1z0001q204)

    What is the default length for a CHAR column in byte (fill in the blank):

    Your answer is:

    Correct answer is: 1

    Explanation : According to the documentation available at the Oracle website:

    The default length for a CHAR column is 1 byte and themaximum allowed is 2000 bytes. A 1-byte string can beinserted into a CHAR(10) column, but the string is blank-

    padded to 10 bytes before it is stored.

    #5 (1z0001q326)

    To choose among several values or courses of action, which of the following control

    structure is more appropriate?

  • 8/7/2019 OCA Questions

    58/65

    A) FOR-LOOP

    B) CASE

    C) IF-THEN-ELSE

    D) WHILE-LOOP

    E) EXIT-WHEN

    Your answer is:

    Correct answer is: B

    Explanation : According to the documentation available at the Oracle website:

    To choose among several values or courses of action, you

    can use CASE constructs. The CASE expression evaluates a

    condition and returns a value for each case. The casestatement evaluates a condition and performs an action

    (which might be an entire PL/SQL block) for each case.

    #6 (1z0001q327)

    What PL/SQL statements let you execute a sequence of statements multiple times (fill inthe blank):

    Please type in your answer in the form :

    Your answer is:

    Correct answer is: loop

    Explanation : According to the documentation available at the Oracle web

    site:

    LOOP statements let you execute a sequence of statementsmultiple times. You place the keyword LOOP before the first

    statement in the sequence and the keywords END LOOP

    after the last statement in the sequence.

    #7 (1z0001q325)Which of the following are the valid Pl/SQL control structures (choose all that apply):

    A) EXIT-WHEN

    B) CASE

    C) FOR-LOOP

    D) IF-THEN-ELSE

  • 8/7/2019 OCA Questions

    59/65

    E) WHILE-LOOP

    Your answer is:

    Correct answer is: ABCDE

    Explanation : According to the documentation available at the Oracle website:

    Control structures are the most important PL/SQL extension

    to SQL. Not only does PL/SQL let you manipulate Oracledata, it lets you process the data using conditional, iterative,

    and sequential flow-of-control statements such as IF-THEN-

    ELSE, CASE, FOR-LOOP, WHILE-LOOP, EXIT-WHEN,

    and GOTO. Collectively, these statements can handle anysituation.

    #8 (1z0001q328)In PL-SQL, the FOR-LOOP statement lets you specify a range of integers, then execute a

    sequence of statements once for each of those integers.

    A) True

    B) False

    C) This is hard to determine.

    Your answer is:

    Correct answer is: AExplanation : According to the documentation available at the Oracle web

    site:

    The FOR-LOOP statement lets you specify a range ofintegers, then execute a sequence of statements once for each

    integer in the range.

    #9 (1z0001q320)

    PL/SQL cursor is either ___________ or ______________.

    A) internal, external

    B) defined, blank

    C) implicit, explicit

    D) secured, regular

    Your answer is:

  • 8/7/2019 OCA Questions

    60/65

    Correct answer is: C

    Explanation : According to the documentation available at the Oracle website:

    Oracle uses work areas to execute SQL statements and store

    processing information. A PL/SQL construct called a cursor

    lets you name a work area and access its stored information.There are two kinds of cursors: implicit and explicit. PL/SQL

    implicitly declares a cursor for all SQL data manipulation

    statements, including queries that return only one row. Forqueries that return more than one row, you can explicitly

    declare a cursor to process the rows individually.

    #10 (1z0001q322)

    Cursor variables are true PL/SQL variables to which you can assign new values and

    which you can pass to subprograms.

    A) True

    B) This is hard to determine.

    C) False

    Your answer is:

    Correct answer is: A

    Explanation : According to the documentation available at the Oracle web

    site:

    Like a cursor, a cursor variable points to the current row inthe result set of a multi-row query. But, unlike a cursor, a

    cursor variable can be opened for any type-compatible query.It is not tied to a specific query. Cursor variables are true

    PL/SQL variables, to which you can assign new values and

    which you can pass to subprograms stored in an Oracle

    database. This gives you more flexibility and a convenientway to centralize data retrieval.

    #11 (1z0001q334)

    You can use what attribute to declare a record t