الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

Give Grant Access or Deniy From Client pc

مغلق
بدأه server_programmer في 12 سبتمبر 2004 · 3 رد · 2,400 مشاهدة · في أرشيف قسم SQL Server
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

بسم الله

شباب أستفسار الله يعطيكم العافية

في عندي زبون عملتله برنامج على

SQL-Server

ويشتغل علية

و الحين أكثر من 7 مرات يطلب مني أعدل الصلاحيات للمستخدمين

مرة مستخدم A يعطيه صلاحية القراءة

و مستخدم B يمنعها عنه

و مرة طنت في راسة يبغى المستخدم A يمتنع عن الأدخال و يعطية صلاحية القراءة بس

وأنا صراحة قرفت منة

و أبغى أحد يذكرنا الساينتكس الخاص بأعطاء المستخدم بعض الحقوق علشان يقدر الرجال الي هو المدير يعدل براحتة بدون ما يرجع لي

و يتعبني في حياتي

عبر برنامج فرعي با سوية له

أعرف أن هناك أمر ال Grant

بس للأسف الظروف الي مريت بها خلتني بالكاد أذكر أسم الامر

انا أعرف الأمر بال Oracle PL/SQL

وهي كالتالي

Grant connect,resources to user1;

لكن نظيره بال SQL-SERVER و الله ناسييييييييييييييية

و لتسهيل العملية عليكم

لنفرض أن عندنا جدول أسمة Table1

و مستخدم أسمة User1

كيف هي صيغة الأمر الي أقدر أنفذة من جهاز العميل بحيث

مرة أعطية صلاحية القراءة

مرة أعطية صلاحية الكتابة

مرة أعطية صلاحية التعديل

مرة أعطية صلاحية المدير لقاعدة البيانات

مرة أمنع عنة صلاحية القراءة

مرة أمنع عنة صلاحية الكتابة

مرة أمنع عنة صلاحية التعديل

مرة أمنع عنة صلاحية المدير لو هي موجودة

أفيدونا أفادكم الله

و لكم تحياتي

أخوكم

وفوق كل ذي علم عليم

http://www.leaderstechnology.com

-------------------------------

#2
كيف أحدد الصلاحية0000?

Technical Lead Developer

My LinkedIn Profile

اللهم قنى شر الجهل و الجهلاء

( اقْتَرَبَ لِلنَّاسِ حِسَابُهُمْ وَهُمْ فِي غَفْلَةٍ مَّعْرِضُونَ ) {الأنبياء:1}

#3

شباب

الحمد لله حصلت الحل

بس حبيت أفيدكم

و أحطة لكم

و أي مساعدة أنا حاضر

------------------ Give User Permassion ------------------------

Examples

A. Grant statement permissions

This example grants multiple statement permissions to the users Mary and John, and the Corporate\BobJ Windows NT group.

GRANT CREATE DATABASE, CREATE TABLE

TO Mary, John, [Corporate\BobJ]

* * *

B. Grant object permissions within the permission hierarchy

This example shows the preferred ordering of permissions. First, SELECT permissions are granted to the public role. Then, specific permissions are granted to users Mary, John, and Tom. These users then have all permissions to the authors table.

USE pubs

GO

GRANT SELECT ON authors TO public

GO

* * *

GRANT INSERT, UPDATE, DELETE ON authors TO Mary, John, Tom

GO

* * *

C. Grant permissions to a SQL Server role

This example grants CREATE TABLE permissions to all members of the Accounting role.

GRANT CREATE TABLE TO Accounting

* * *

D. Grant permissions using the AS option

The Plan_Data table is owned by the user Jean. Jean grants SELECT permissions, specifying the WITH GRANT OPTION clause, on Plan_Data to the Accounting role. The user Jill, who is member of Accounting, wants to grant SELECT permissions on the Plan_Data table to the user Jack, who is not a member of Accounting.

Because the permission to GRANT other users SELECT permissions to the Plan_Data table were granted to the Accounting role and not Jill explicitly, Jill cannot grant permissions for the table based on the permissions granted through being a member of the Accounting role. Jill must use the AS clause to assume the grant permissions of the Accounting role.

/* User Jean */

GRANT SELECT ON Plan_Data TO Accounting WITH GRANT OPTION

/* User Jill */

GRANT SELECT ON Plan_Data TO Jack AS Accounting

------------------ Deny Permassion from the user ------------------------

Examples

A. Deny statement permissions

This example denies multiple statement permissions to multiple users. Users cannot use the CREATE DATABASE or CREATE TABLE statements unless they are explicitly granted the permission.

DENY CREATE DATABASE, CREATE TABLE TO Mary, John, [Corporate\BobJ]

* * *

B. Deny object permissions within the permission hierarchy

This example shows the preferred ordering of permissions. First, SELECT permissions are granted to the public role. After this, specific permissions are denied for users Mary, John, and Tom. These users then have no permissions to the authors table.

USE pubs

GO

GRANT SELECT ON authors TO public

GO

DENY SELECT, INSERT, UPDATE, DELETE ON authors TO Mary, John, Tom

* * *

C. Deny permissions to a SQL Server role

This example denies CREATE TABLE permissions to all members of the Accounting role. Even if existing users of Accounting have been explicitly granted CREATE TABLE permission, the DENY overrides that permission.

DENY CREATE TABLE TO Accounting

اخوكم

وفوق كل ذي علم عليم

http://www.leaderstechnology.com

-------------------------------

#4

الشكر يا أستاذ طارق إبراهيم

لكن الحمد لله

حليتها

و ما ظنيتها تنحل

و الفضل لله عز وجل

والشكر لكم على كل حال

عموما كنت أسوي الصلاحيات من خلال الأنتربرايس مانيجر

و الحين صارت من أصل البرنامج

في شاشة صغيرة أضافية

عموما الكود تجميعي

أي ملاحظة علية

أو أستفسار

أنا حاضر

أخوكم

وفوق كل ذي علم عليم

http://www.leaderstechnology.com

-------------------------------

هذا الموضوع مغلق.

مواضيع مشابهة