Tag: databases

Questions Related to databases

This query is: INSERT ALL INTO mytab (c1,c2) VALUES ('ram',12) INTO mytab (c1,c2) VALUES ('mani',15)

  1. True

  2. False


Correct Option: A
  1. listener.ora

  2. sqlnet.ora server file

  3. sqlnet.ora client file

  4. tnsnames.ora server file


Correct Option: B
  1. create user ops$admin identified by os;

  2. create user ops$admin identified externally;

  3. create user ops$admin nopassword;

  4. create user ops$admin authenticated by os;


Correct Option: B
Explanation:

To solve this question, the user needs to have knowledge about Oracle database user authentication methods.

Option A: This option creates an Oracle user account with the name 'ops$admin' and the password 'os'. However, it uses a password file for authentication, not the operating system. Therefore, this option is incorrect.

Option B: This option creates an Oracle user account with the name 'ops$admin' and identifies it as an external user, which means that authentication is done by the operating system. Therefore, this option is correct.

Option C: This option creates an Oracle user account with the name 'ops$admin' and no password. This is not a secure method of authentication and is not related to operating system authentication. Therefore, this option is incorrect.

Option D: This option creates an Oracle user account with the name 'ops$admin' and specifies that it should be authenticated by the operating system. However, it does not create an operating system account for the user. Therefore, this option is incorrect.

The Answer is: B

  1. An index creation

  2. SQL statements with a GROUP BY clause

  3. A hash join operation

  4. All of the above


Correct Option: D
  1. grant alter on gl.accounts to desmond;

  2. grant alter to desmond on gl.accounts;

  3. grant alter table to desmond;

  4. allow desmond to alter table gl.accounts;


Correct Option: A

Which of the following statements gives user desmond the ability to alter table gl.accounts as well as give this ability to other accounts?

  1. grant alter any table with grant option to desmond;

  2. grant alter on gl.accounts to desmond with admin option;

  3. grant alter any table to desmond with grant option;

  4. grant alter any table to desmond with admin option;


Correct Option: D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) grant alter any table with grant option to desmond; This option grants Desmond the ability to alter any table, but it does not give him the ability to grant this permission to other accounts. Therefore, this option is incorrect.

Option B) grant alter on gl.accounts to desmond with admin option; This option grants Desmond the ability to alter the table "gl.accounts" specifically, but it does not give him the ability to grant this permission to other accounts. Therefore, this option is incorrect.

Option C) grant alter any table to desmond with grant option; This option grants Desmond the ability to alter any table, but it does not give him the ability to grant this permission to other accounts. Therefore, this option is incorrect.

Option D) grant alter any table to desmond with admin option; This option grants Desmond the ability to alter any table and also gives him the ability to grant this permission to other accounts. Therefore, this option is correct.

The correct answer is Option D. This option gives Desmond the ability to alter the table "gl.accounts" as well as grant this ability to other accounts.

  1. Select the next value from oe.orders_seq.

  2. Alter sequence oe.orders_seq to change the next value.

  3. Change the number of sequence numbers that will be cached in memory.

  4. Both A and C.

  5. All of the above.


Correct Option: A,C,D

User system granted SELECT on sh.products to user A using WITH GRANT OPTION. A then granted SELECT on sh.products to user B. A has left the company, and his account is dropped. What happens to B’s privileges on sh.products?

  1. B loses his SELECT privilege on sh.products.

  2. B retains his SELECT privilege on sh.products.

  3. B loses his SELECT privilege if A was dropped with the CASCADE REVOKE option.

  4. B retains his SELECT privilege if A was dropped with the NOCASCADE REVOKE option


Correct Option: A

AI Explanation

To answer this question, we need to understand how privileges and the "WITH GRANT OPTION" work in Oracle.

When user A is granted SELECT privilege on sh.products with the "WITH GRANT OPTION," it means that A can also grant this privilege to other users. In this case, A grants SELECT privilege on sh.products to user B.

However, when user A's account is dropped, all the privileges granted by A are also revoked. This means that user B will lose the SELECT privilege on sh.products because it was originally granted by user A. Therefore, the correct answer is A: B loses his SELECT privilege on sh.products.