Create two user-defined roles in database adventureworks

Assignment Help Database Management System
Reference no: EM131299451

Lab Manual

In the first part of this lab you will learn how to protect the data in the Oracle database by implementing security via profiles, roles, and privileges. You will also use object privileges to protect individual tables or columns.

You can use Oracle Data Dictionary list at https://ss64.com/orad/. Use CTRL+F to search the page. Oracle uses self-explanatory names for tables, views and columns.

In the second part of this lab you will learn how to protect the data in the SQL Server database by implementing security via security policies, roles, and privileges. You will also use object privileges to protect individual tables or columns.

Use INFORMATION_SCHEMA reference at https://msdn.microsoft.com/en-us/library/ms186778.aspx

The requirement of the lab is listed as deliverables. The deliverable is abbreviated as "D" in this manual.

Deliverables

NOTE: do not use GUI, you have to provide SQL code. Check out "Lab4Tutorial.docx" for tutorials.

D1 - D12 need to completed using Oracle

D1. Create the following three user-defined roles that are shown in the table below and assign them the specified permissions for the

OE.CUSTOMERS table.

Role

Select

Insert

Update

Delete

account_managers



CREDIT_LIMIT only

 

customer_service


 

sales_reps

 

Include SQL scripts:

D2. Create user user1. Assign role account_manger to user1

Include SQL scripts:

D3. Use SQL Plus to login as user1 and test permissions.

List all steps you performed to test permissions add screenshot with results

D4. Close SQL Plus. Assign role sales_reps to user1

Include SQL scripts:

D5. As a part of an auditing process your company is conducting, you are required to report all users who have been granted system privileges with ADMIN option.

These users can grant system privileges to other users. Write a query that will display users and their privileges. (Hint: use data dictionary SYS_PRIVS)

Include SQL scripts, number of rows and screenshot of the results

D6. As a part of an auditing process your company is conducting, you are required to report all users who have been granted object privileges with GRANT option.

These users as well as object owners can grant object privileges to other users. Write a query that will display owner, grantee and table name. (Hint: use data dictionary TAB_PRIVS)

Include SQL scripts, number of rows and screenshot of the results

D7. Write SQL statement that lists all roles AND users (without repetition) who have access to the OE.CUSTOMERS table.

Include SQL scripts and screenshot of the results

D8. Do you see ACCOUNT_MANAGERS on the list generated from D7? Why?

D9. How can you check that whether ACCOUNT_MANAGERS have permission to update only one column in CUSTOMERS table?

Include SQL scripts and screenshot of the results

D10. Create an Oracle profile OE_PROFILE to limit database resources using the following criteria:

a. Logon time-2 hours
b. Idle time-3 minutes
c. CPU time required per call-1 second
d. 1 block per query

Include SQL scripts:

D11. Assign profile OE_PROFILE to user1.

Include SQL scripts:

D12. Test that IDLE time setting in the profile works.

Outline steps and provide SQL queries if necessary

D13 - D22 need to completed using SQL Server

D13. Create two user-defined roles in database AdventureWorks that are shown in the following table and assign them the specified permissions for the PURCHASING.Vendor table:

Role

Select

Insert

Update

Delete

account_managers

fin_clerk

AccountNumber, Name, CreditRating, and ActiveFlag

 

CreditRating and ActiveFlag

 

Include SQL scripts:

D14. Use data dictionary to check that permissions were granted correctly in D13. Hint: check column permissions and table permission separately.

Include SQL scripts and screen shots of the results:

D15. Use Computer Management to create local Windows user with user name sam. (Right click My Computer - Mange - Local Users and Groups - Right click - New)

You don't need to include anything for this step.

D16. Grant sam permission to logon to SQL server and AdventureWorks database.

Include SQL scripts:

D17. Open new query window and run statement "execute as login" to execute queries as sam (see chapter slides). Try to select NAMES from Vendor table.

Include SQL scripts and screen shots of the results:

D18. Switch to the previous query window (the one you used to run query in D16) and Assign role fin_clerk to sam.

Include SQL scripts:

D19. Switch to the "new" query window (the one you opened in #6) and try AGAIN to select NAMES from Vendor table when you logged as sam.

Include SQL scripts and screen shots of the results:

D20. Try to delete vendor with VendorID = 1 when you logged as sam (Explain the result). Include SQL scripts and explain the result.

D21. Explain in detail the use of the DENY statement in SQL Server.

Provide example on how to restrict access to a column VendorID in a table

D22. Create a password policy that password expires in 60 days and locks the user's account if the password is entered incorrectly four times in a row. Document the process

Step-by-step instructions and screenshot of successful operation.

Reference no: EM131299451

Questions Cloud

Determine the heat loss from the surface of the lake : Determine the heat loss from the surface of the lake by radiation, free convection, and evaporation.
Create class named incident that consists of public property : Create a class named Incident that consists of one public property for each column in the Incidents table and a method named CustomerIncidentDisplay that formats an incident for display on the Customer Survey page.
Complete the flexible budgets for sales volumes : Complete the flexible budgets for sales volumes of 10,000, 12,000, and 14,000 units.
Sources of upward bias in the rate : Suppose you calculate a grocery price inflation rate. Using the arguments presented in the chapter, explain possible sources of upward bias in the rate you calculate, relative to the actual trend of food prices.
Create two user-defined roles in database adventureworks : Create two user-defined roles in database AdventureWorks that are shown in the following table and assign them the specified permissions for the PURCHASING.Vendor table:
Management plan including contingency plans : Develop key success factors, budget, and forecasted financials, including a break-even chart. Create a risk management plan including contingency plans for the identified risks.
Compute the direct labor rate variance : Compute the direct labor rate variance and the direct labor efficiency variance. Indicate whether each variance is favorable or unfavorable.
Formulate a linear programming model to solve given problem : devise a busing plan that will minimize the total number of student miles bused.- Formulate a linear programming model to solve this problem.
What is the correlation between unemployment and inflation : How can you support your position?Please answer the following question by integrating research, examples and opinion. Your answer should be no less than 300 words in length.Proper citation, referencing and material integration is required.

Reviews

Write a Review

Database Management System Questions & Answers

  Create local variable that inherits structure of car table

Using an explicit cursor, retrieve each row from the i_car table. Create a local variable that inherits the structure of the i_car table (using %ROWTYPE attribute). Place each row returned into this variable

  Researchers wanted to explore self-esteem in adolescent

researchers wanted to explore self-esteem in adolescent boys and adolescent girls. each respondent completed a 10-item

  Prove-leaves of binary search tree are located in bottom

Examples for small n are given bellow, where a small square box represents an unsuccessful search. Prove that leaves of any binary search tree are located in the bottom two levels.

  Why a relation schema is an indexed set of sets

Why the states of a relation schema are the subsets of schemas product? Please give an example?

  Koszyk manufacturing corporation

Koszyk Manufacturing Corporation has a traditional costing system in which it applies manufacturing overhead to its products using a predetermined overhead rate based on direct labor-hours

  Exhibiting all the primary keys and foreign keys

Draw the corresponding GRD, exhibiting all the primary keys and foreign keys. For simplicity, no other attributes nor multiplicity constraints are required.

  Modify the clsdatalayer to use a two-step process

Modify the SavePersonnel() function so that instead of just doing a single SQL INSERT operation with all the personnel data, it does an INSERT with only the FirstName and LastName, followed by an UPDATE to save the PayRate, StartDate, and EndDate ..

  Formulas within table cells always begin withend of exam

Which of the following allows you to view and access important information about your document all in one location

  Develop queries in oracle and provide its output

Create CUSTOMER table and create table that will link customer to their ice cream preferences. Make sure to include appropriate primary and foreign keys.

  Develop a portal where a user logs in using credentials

Want to develop a portal where a user logs in using their credentials. so in db we will need an area to create login for the users.

  What is the role of a dbms

What is the role of a DBMS, and what are it advantages? What are its disadvantages?

  Implement the query find total number of orders submitted

Find the total number of orders submitted in 2015. List all distinct customer IDs (O_C_ID) who submitted the largest number of orders in 2014. Find the total number if orders submitted by each customer.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd