Applies to: Centrify DirectAudit for all versions
How to create new databases for DA every month and make the old databases read only and want to automated this if possible?
The entire process can be automated using the "Centrify DirectManage Audit SDK". The SDK has some sample PowerShell and VB scripts that can be used to rotate a new database and can run these scripts as scheduled tasks (e.g. run it on 1st day of each month) to automate the process. Here is an example - (Check below screen shot)-
In the above example:
3M --- is the name of DA installation
3MAuditStore --- is the name of the Audit Store
YD-W2K8R2-DEV\SQLEXPRESS --- is the SQL server on which new database must be created
SamplePrefix --- is the string that will be prefixed to the newly created database's name. The database name will by default use the
Please note that the user running this script (or scheduled to run as) must be a member of sysadmin role on the database server and also should have been assigned appropriate permissions on the Audit Store to rotate database (e.g. Full Control on the Audit Store). Also note that once a new database is created, older database automatically becomes read-only i.e. Collectors will not push data into older database but data will still be available for querying purpose.