Question

In: Computer Science

3. Write the statements to: • create a user named FooBar with a password of “candybar”...

3. Write the statements to: • create a user named FooBar with a password of “candybar” • assign the payments role created in the previous question to FooBar • assign the create session privilege to FooBar • Show the statements to connect to FooBar

4. For this question, I only need the query statement and not the results. Write the queries that use the user_sys_privs, user_tab_privs, user_role_privs, role_sys_privs and role_tab_privs objects to view the user and role privileges that are available to FooBar. You need a WHERE clause to check for the proper OWNER.

5. Write a script that grants the privilege of creating public synonyms to the payments role. Which user should you be connected to, in order to provide this privilege?

6. Show the statements to connect as FooBar and create a public synonym for the AP’s Invoices table.

Solutions

Expert Solution

3. For creating user with password use this syntax

Create user Foo bar identified by candybar;

For assigning payment role to Foo bar use this command

Ensure we have roles available if not use this command

Create role payments ;

Grant payment to FooBar:

Set role payments;

This needs to be done in the FooBar session.

For creating the session to FooBar use this query:

Grant create session to FooBar ;

For connecting to database use the login credentials as

Enter user name : FooBar

Enter password: candybar (which will be hidden )

4. For querying the roles associated with FooBar use this query

Select * from session_roles where Owner = ''FooBar'';

For creating public synonyms please use the following query and name the table as required:

Create public synonym synonym_name

For payments;

The public synonym can be created for people who has underlying necessary privileges to access the object which is payments table here to use public synonyms.

5. Use same privileges of username and password which is FooBar and candybar and connect to Db.

And use this query:

Create public synonym AP Invoice table

For payments;


Related Solutions

Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password...
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password TESTACCOUNT that grants the user the ability to: Select and modify any table. Connect to and have access to all resources. In SSMS
Create a program (Python) YourFirstnameLastnameA06b.py to ask the user to create a password: The user will...
Create a program (Python) YourFirstnameLastnameA06b.py to ask the user to create a password: The user will first enter a password, then enters the same password again; If the second input is the same as first one, the user successfully creates the password. Print “Well done.”; Otherwise, the user will be directed to repeat the whole process (go to step 1.)
C# Create an application that asks the user to enter their new password. The password must...
C# Create an application that asks the user to enter their new password. The password must be at least 6 characters long. Develop a custom exception handling case that checks for the password length. (hint: use " .Length " built-in method). If the new password is less than 6 characters long the custom exception should output an error message.
Using C++ Write a program to ask user to enter a password and validity the password....
Using C++ Write a program to ask user to enter a password and validity the password. The password should be 8 – 20 characters long (8 is included and 20 is included), it should contain at least one uppercase letter and one lower case letter. The password should contain at least one digit, and at least one symbol other than alphabets or numbers. Most importantly, the password may not contain any white space. Functions: You will need at least the...
[10, 3, 15, 18] 4. Password Checker Write a fuction called passwordChecker() that asks the user...
[10, 3, 15, 18] 4. Password Checker Write a fuction called passwordChecker() that asks the user to input a string and checks if the string can be used as a password. Loop until the user inputs an appropriate password. A password must satisfy the following conditions: (a) Must contain at least 12 characters (b) Must contain one special symbol from string.punctuation [HINTS: use the string module; use the keyword in ] (c) Must contain at least one lower-case letter (d)
Write C++ code that prompts the user for a username and password (strings), and it calls...
Write C++ code that prompts the user for a username and password (strings), and it calls the login() function with the username and password as arguments. You may assume that username and password have been declared elsewhere. Your code should print error messages if login() generates an exception: LoginException: "Username not found or password incorrect" ServerException: "The login server is busy and you cannot log in" AccessException: "Your account is forbidden from logging into this server" Any other exception: "Unknown...
Write C++ code that prompts the user for a username and password (strings), and it calls...
Write C++ code that prompts the user for a username and password (strings), and it calls the login() function with the username and password as arguments. You may assume that username and password have been declared elsewhere. Use virtual functions, pure virtual functions, templates, and exceptions wherever possible. Please explain the code. Your code should print error messages if login() generates an exception: LoginException: "Username not found or password incorrect" ServerException: "The login server is busy and you cannot log...
2. Create a new project named named lab5_2. You will prompt the user for an amount...
2. Create a new project named named lab5_2. You will prompt the user for an amount of names to enter, and then ask for that amount of names. You’ll store these names in a vector of strings. Then you’ll sort the vector. Finally, you’ll print the results. How many names?: 4 Enter a name: Leonardo Enter a name: Donatello Enter a name: Michelangelo Enter a name: Raphael ==================== Alphabetized ==================== Donatello                  Leonardo Michelangelo                      Raphael
1. Write the statements to create a table named REQUIREMENTS. The table has the following columns:...
1. Write the statements to create a table named REQUIREMENTS. The table has the following columns: credits number (primary key) and degree name. 2. Write the statements to create a table named CANDIDATE with the following columns names. Pick the best column type: student_id, first name, last name, credits and graduation date. The credits column is a foreign key to the credits column in the REQUIREMENTS table. 3. Write the statement(s) to Insert 2 rows in your REQUIREMENTS table. Make...
Create a function named getCreds with no parameters that will prompt the user for their username...
Create a function named getCreds with no parameters that will prompt the user for their username and password. This function should return a dictionary called userInfo that looks like the dictionaries below: # Administrator accounts list adminList = [ { "username": "DaBigBoss", "password": "DaBest" }, { "username": "root", "password": "toor" } ] Create a function named checkLogin with two parameters: the userInfo and the adminList. The function should check the credentials to see if they are contained within the admin...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT