Which two methods can you use to create users and grant roles in Autonomous Database services? (Choose two.)
Click on the arrows to vote for the correct answer
A. B. C. D.AB.
Sure, I can explain the methods to create users and grant roles in Autonomous Database services.
Autonomous Database services are fully managed databases provided by Oracle Cloud that automatically perform many of the traditional database administration tasks. To create users and grant roles in Autonomous Database services, you can use the following two methods:
javasqlplus admin_user@db_service_name_high
Once you have connected to the database, you can run SQL commands to create users and grant roles, such as:
sqlCREATE USER new_user IDENTIFIED BY password; GRANT CONNECT, RESOURCE TO new_user;
a. Log in to the OCI service console.
b. Navigate to the Autonomous Database service that you want to manage.
c. Click on the "DB Connection" button to get the connection string.
d. Connect to the database using a SQL client such as SQL Developer.
e. Run SQL commands to create users and grant roles, such as:
sqlCREATE USER new_user IDENTIFIED BY password; GRANT CONNECT, RESOURCE TO new_user;
a. Connect to the Autonomous Database using a SQL client such as SQL Developer.
b. Run the following command to create a credential for the DBMS_CLOUD_ADMIN package:
javascriptBEGIN DBMS_CLOUD.CREATE_CREDENTIAL( credential_name => 'ADMIN_CRED', username => 'ADMIN_USER', password => 'ADMIN_PASSWORD' ); END;
c. Run the following command to create a user:
javascriptBEGIN DBMS_CLOUD_ADMIN.CREATE_USER( username => 'NEW_USER', password => 'NEW_PASSWORD' ); END;
d. Run the following command to grant roles to the user:
javascriptBEGIN DBMS_CLOUD_ADMIN.GRANT_ROLE( role => 'CONNECT', grantee => 'NEW_USER' ); END;
In summary, the two methods to create users and grant roles in Autonomous Database services are through SQLPlus and the OCI service console. Additionally, you can also use the DBMS_CLOUD_ADMIN package to perform these tasks.