Exporting and Importing Roles, Resources and Users
Is there any method or routine available to export and import the user roles and the sql table and sql procedures associated with each role?
Is there any method or routine available to export and import the user roles and the sql table and sql procedures associated with each role?
Sure... You can either do it programmatically via
Secutiry.Roles.Export()
method in %SYS namespace:http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...
or via
^SECURITY
routine in %SYS namespace:http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
Thanks for replying.
I already used the above methods. Is there any way we can see the SQL table & Procedures associated with those roles?? So far i cant able to see those in the exported files.
SQL privileges are actually separate from roles. There's a few options to export those:
1. The ^SECURITY routine which Sergei linked to.
2. The Security.System.ExportAll() method:
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...
3. The Security.SQLPrivileges.Export() method:
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...
You can find a way from Document.
Cache document > Class Reference> Security Package > Users.
(http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls)
There are Import/Export Methods and help.