Amaliy mashg’ulotlarida berilgan topshiriqlar


Download 395.12 Kb.
bet13/20
Sana15.11.2023
Hajmi395.12 Kb.
#1777301
1   ...   9   10   11   12   13   14   15   16   ...   20
Bog'liq
SQL command 29-11-2021

Example


Let's look at some examples of how to revoke privileges on tables in SQL Server.
For example, if you wanted to revoke DELETE privileges on a table called employees from a user named anderson, you would run the following REVOKE statement:
REVOKE DELETE ON employees FROM anderson;
If you wanted to revoke ALL ANSI-92 permissions (ie: SELECT, INSERT, UPDATE, DELETE, and REFERENCES) on a table for a user named anderson, you could use the ALL keyword as follows:
REVOKE ALL ON employees FROM anderson;
If you had granted SELECT privileges to the public role (ie: all users) on the employees table and you wanted to revoke these privileges, you could run the following REVOKE statement:
REVOKE SELECT ON employees FROM public;

DENY – ob’yekt bilan har qanday amal bajarishni taqiqlaydi (shunu


aytish kerakki, REVOKE buyrig’i faqat imtiyozlarni olib tashlayi). Foydalanuvchiga ruxsat olish funktaiyalarini quyidagi buyruqlar amalga
oshiradi:


DENY CREATE TABLE, CREATE PROCEDURE
TO peter;


USE sample;
GRANT SELECT ON project
TO PUBLIC;
DENY SELECT ON project
TO peter, mary;


CREATE DATABASE — ma’lumotlar bazasini yaratish huquqi;
CREATE DEFAULT — jadval ustunlari uchun standart qiymatlarni o’rnatish huquqi;
CREATE PROCEDURE — saqlanadigan protseduralarni yaratish huqiqi;
CREATE ROLE — jadval ustunlari uchun qoidalarni o’ranish huquqi; CREATE TABLEjadvallarni yaratish huquqi;
CREATE VIEW — ob’ekt tasvirlarini yaratish huquqi;

Download 395.12 Kb.

Do'stlaringiz bilan baham:
1   ...   9   10   11   12   13   14   15   16   ...   20




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling