salut a tous,
comment tester si un utilisateur a les droits sur une table (SELECT, INSERT; UPDATE; DELETE)
salut a tous,
comment tester si un utilisateur a les droits sur une table (SELECT, INSERT; UPDATE; DELETE)
1) en lisant les informations des vues systèmes :
2) en interrogeant par la fonction has_perms_by_name :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 SELECT * FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES
A +
Code : Sélectionner tout - Visualiser dans une fenêtre à part SELECT has_perms_by_name('Mon_schema.Matable', 'OBJECT', 'commandeSQL')
Frédéric Brouard - SQLpro - ARCHITECTE DE DONNÉES - expert SGBDR et langage SQL
Le site sur les SGBD relationnels et le langage SQL: http://sqlpro.developpez.com/
Blog SQL, SQL Server, SGBDR : http://blog.developpez.com/sqlpro
Expert Microsoft SQL Server - M.V.P. (Most valuable Professional) MS Corp.
Entreprise SQL SPOT : modélisation, conseils, audit, optimisation, formation...
* * * * * Expertise SQL Server : http://mssqlserver.fr/ * * * * *
merci, probleme resolu.![]()
Partager