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.
Write a shell script that will create a new password-type file that contains user information. The...
Write a shell script that will create a new password-type file that contains user information. The file should contain information about the last five users added to the system with each line describing a single user. This information is contained in the last five lines of both the /etc/shadow and the /etc/passwd files. Specifically, you should produce a file where each line for a user contains the following fields: user name, encrypted password, and shell. The fields should be separated...
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...
Write a pro-active password checker that checks to make sure that a user entered password meets...
Write a pro-active password checker that checks to make sure that a user entered password meets certain requirements. You must implement a simple program that prompts the user for two String values, a password and the same password again for confirmation. For the purposes of this lab, a legal password must have all of the following properties: ▪ Length of at least 8 characters ▪ Starts with a lower case letter ▪ Ends with a numerical digit ▪ Has one...
In PYTHON: Write a program that asks for a password from a user and checks if...
In PYTHON: Write a program that asks for a password from a user and checks if it satisfies the conditions: Contains at least one lowercase letter (a-z). Contains at least one uppercase letter (A-Z). Contains at least one digit (0-9). Minimum length 6 characters. Contains no spaces. If the password is valid, then the program prints “password accepted”. Otherwise, it keeps asking for more passwords from the user until a valid password is obtained. Hint: You might like to check...
[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)
Create a C++ program which will prompt the user to enter a password continually until the...
Create a C++ program which will prompt the user to enter a password continually until the password passes the following tests. Password is 6 chars long Password has at least 1 number If the input does not match the tests, it will input a specific error message. "Pass must be 6 chars long." If the input is allowed, print a message saying "Correct Password Criteria."
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT