Creates a user-defined database role named orderentry

Assignment Help Database Management System
Reference no: EM131066989

Lab Assignment

Exercise

1. Write a script that creates a user-defined database role named OrderEntry in the MyGuitarShop database. Give INSERT and UPDATE permission to the new role for the Orders and OrderItems table. Give SELECT permission for all user tables.

2. Write a script that (1) creates a login ID named "RobertHalliday" with the password "HelloBob"; (2) sets the default database for the login to the MyGuitarShop database; (3) creates a user named "RobertHalliday" for the login; and (4) assigns the user to the OrderEntry role you created in exercise 1.

3. Write a script that uses dynamic SQL and a cursor to loop through each row of the Administrators table and (1) create a login ID for each row in that consists of the administrator's first and last name with no space between; (2) set a temporary password of "temp" for each login; (3) set the default database for the login to the MyGuitarShop database; (4) create a user for the login with the same name as the login; and (4) assign the user to the OrderEntry role you created in exercise 1.

4. Using the Management Studio, create a login ID named "RBrautigan" with the password "RBra9999," and set the default database to the MyGuitarShop database. Then, grant the login ID access to the MyGuitarShop database, create a user for the login ID named "RBrautigan", and assign the user to the OrderEntry role you created in exercise 1.

Note: If you get an error that says "The MUST_CHANGE option is not supported", you can deselect the "Enforce password policy" option for the login ID.

5. Write a script that removes the user-defined database role named OrderEntry. (Hint: This script should begin by removing all users from this role.)

6. Write a script that (1) creates a schema named Admin, (2) transfers the table named Addresses from the dbo schema to the Admin schema, (3) assigns the Admin schema as the default schema for the user named RobertHalliday that you created in exercise 2, and (4) grants all standard privileges except for REFERENCES and ALTER to RobertHalliday for the Admin schema.

Attachment:- Attachments.rar

Reference no: EM131066989

Questions Cloud

Create method called left that accepts a array of characters : Create a method called left that accepts an array of characters and the number of characters to return.
Summarise the impact of the interventions : Discuss the impact of TWO successful public health primary prevention interventions. You are expected to: briefly introduce the issue, population and population group; describe the interventions, summarise the impact of the interventions
Synthesize articles that focus on the question : In units 3 and 4, you will be asked to synthesize articles that focus on the question, "should the college athlete get paid?" Please watch this video from the CNN show Crossfire and respond to the following reflection:
Content to be understandable by your audience : 1. Mention and fully explain 4 ways that you can get a better attention from your audience during a speech. 2. Explain how can you as a presenter (say in your video) organize its content to be understandable by your audience.
Creates a user-defined database role named orderentry : Write a script that creates a user-defined database role named OrderEntry in the MyGuitarShop database. Give INSERT and UPDATE permission to the new role for the Orders and OrderItems table. Give SELECT permission for all user tables.
Brief opening scene : The purpose of the scene will be to clue the audience that this will be a modernist movie. Explain your ideas about what you would include in this brief opening scene.
Different cultures and times : Why is Austen's novel still so popular, with people returning to the story and adapting it to different cultures and times? What is it about her characters, their relationships, and her writing that has enduring resonance? Offer compelling reasons..
What is the magnitude of the friction force : what is the magnitude of the friction force opposing the motion of the block?
How the sensors and microprocessor interact to detect : A burglar alarm system uses pressure sensors and acoustic (sound) sensors to detect the presence of an intruder. A microprocessor is used to monitor and control the whole system. A keypad is used to key in a 4-digit PIN that either activates or d..

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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