Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Auditing login and Database Information on servers Expand / Collapse
Author
Message
Posted Tuesday, July 01, 2008 4:16 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2008 5:57 AM
Points: 38, Visits: 255
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.
Post #526448
Posted Tuesday, July 01, 2008 4:23 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 10:36 AM
Points: 1,199, Visits: 574
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.
Post #526451
Posted Tuesday, July 01, 2008 4:40 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2008 5:57 AM
Points: 38, Visits: 255
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.
Post #526458
Posted Tuesday, July 01, 2008 4:59 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2008 5:57 AM
Points: 38, Visits: 255
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.
Post #526467
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse