July 1, 2008 at 4:16 am
Hi all,
Am trying to do a migration of some servers from 2000 to 2005 but need to do some auditing on each server to retrieve some useful information. I need to write queries to supply the info below
1. Login information at server and and database levels: i.e
-Server name
-Database,
-sql server login name/database login name as "login name"
-type of login (sql user, nt user or nt group)
-date created
-date updated
2. Database information at server level: i.e
-Server name
-Database
-Database owner login name as 'login name'
-'database owner' as 'type of login'
-date created
-last database backup as 'date update'
3. I also need 'surname' and 'initials' to be created manually as a temporary as part of the query by looking them up in outlook "Global Address List".
4. Results from these temporary table should then be exported to Excel.
Any assistance would be appreciated such as tsql to help query the servers to supply above info, also the temporary table and exporting to excel.
July 1, 2008 at 4:23 am
you can write sql-dmo scripts embedded in vb/java script to collect all the information and write directly to excel. I dont knopw whether (3) can be achieved b TSQL or dmo; I havent tried that.
July 1, 2008 at 4:40 am
Yes, no 3 has to be done manually, I think I need to create a table, then insert the surnames and initials. I have checked syslogins and sysdatabases and they give some info but not all what I need, especially for the database audits.
July 1, 2008 at 4:59 am
The 'login name' column from sql server should be used to find the 'surname' and 'initials' in outlook. Need to find a way of doing that.
The results in the login and database tables need to be formatted in CSV to export into excel.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply