SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Auditing login and Database Information on servers


Auditing login and Database Information on servers

Author
Message
fosco-515896
fosco-515896
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 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.
rajankjohn
rajankjohn
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1537 Visits: 575
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.
fosco-515896
fosco-515896
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 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.
fosco-515896
fosco-515896
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search