Sample Exam Questions

From the objective of OSS-DB Exam Silver
- Operation and Management - How to use standard attached tool

Sample Question

1.20

As an explanation of createuser command, choose two things that are wrong.

  1. Behavior when database creation authority is not specified by option, behavior changed in PostgreSQL 9.2, new creation authority is not granted by default by default.
  2. It must be executed as the database administrator user.
  3. You can create a user in a database on a server other than the machine on which the createuser command is executed.
  4. It is possible to create new users as well as users of databases.
  5. The same thing can be realized by connecting to the database with psql and then using the CREATE ROLE command.

※This sample exam is different from those that appear in the actual OSS-DB Exam.
2019/03/04

Answer and Explanation

createuser is the command to create a new database user to the PostgreSQL server. Since PostgreSQL dedicated command, you will not be able to create a user of the OS. 

Internally connect to the database and issue the CREATE ROLE command. Therefore, what you can do with createuser can also be realized by connecting to the database with psql and executing the CREATE USER or CREATE ROLE command.

Because the database to be connected is specified with options such as -h and -p, you can also create a user by connecting to a remote database.

Specify the superuser privilege, user creation authority, or database creation authority for new users by specifying them at runtime options. If not specified, asking it interactively until PostgreSQL 9.1 was the default, but since 9.2 the behavior has changed and these rights are not granted by default.

To execute the createuser command, you need to have user creation authority, but it does not necessarily need to be a database administrator user.

Whether to grant superuser privileges, user creation privileges, and database creation privileges to new users is determined by options at runtime. 

If not specified, asking it interactively until PostgreSQL 9.1 was the default, but since 9.2 the behavior has changed and these rights are not granted by default.

To execute the createuser command, you need to have user creation authority, but it does not necessarily need to be a database administrator user.

Therefore, the correct answer is B and D.