Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to centralize your SQL Server Event Logs.


How to centralize your SQL Server Event Logs.

Author
Message
peleg
peleg
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 537
Geoff A (11/8/2010)
renasoursou, try this;

create an alias for RLDB2,4949\RLDB2_05 and call it something like "monitor"

then change Data Source=RLDB2,4949\RLDB2_05 to Data Source=monitor


how/where do you define this alias?
Geoff A
Geoff A
SSChasing Mays
SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)

Group: General Forum Members
Points: 606 Visits: 1791
peleg (11/8/2010)
Geoff A (11/8/2010)
renasoursou, try this;

create an alias for RLDB2,4949\RLDB2_05 and call it something like "monitor"

then change Data Source=RLDB2,4949\RLDB2_05 to Data Source=monitor


how/where do you define this alias?


http://msdn.microsoft.com/en-us/library/ms190445.aspx
rena24
rena24
SSC Rookie
SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)

Group: General Forum Members
Points: 40 Visits: 316
Its running with the allias name. Thanks a lot and its really a great and usefull Article!!! :-):-):-):-)
alen teplitsky
alen teplitsky
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1595 Visits: 4621
nice article

i've been doing something similar for 2 years and might check this out to see if it's faster than mine. in my case i run the VB from each server and dump to a central SQL server. i have a staging table for each server and there is a job that runs every hour to delete old data from the main tables and copy data from the staging tables and then truncate them. and i wrote a bunch of reports over the last year to track locked out accounts, AD Group changes, etc. each report has a SSRS subscription to email it to the right people

i've wanted to change over to powershell, but haven't found anything where it says how to dump the data directly to SQL

to make sure data is being imported i have a report that i check once a week that shows me the server name and the latest app/security log dates in the database for each server
GNUZEN
GNUZEN
SSC-Enthusiastic
SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)

Group: General Forum Members
Points: 143 Visits: 560
Great post!
I usually did the same way before SQL Server 2008.

Now I've implemented central monitor solution using PowerShell and SQL Server central management feature.

For security reason I would try not using VBS. Using native SQL Server central management also enables you to manage and configure in one place.

my two cents.
alen teplitsky
alen teplitsky
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1595 Visits: 4621
GNUZEN (11/8/2010)
Great post!
I usually did the same way before SQL Server 2008.

Now I've implemented central monitor solution using PowerShell and SQL Server central management feature.

For security reason I would try not using VBS. Using native SQL Server central management also enables you to manage and configure in one place.

my two cents.


with SQL 2008 can you import event logs from non-sql servers into a database?
peleg
peleg
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 537
vbscript is not secure enough, but powershell has it's dangerous too.
i think that doing it in PowerShell is better, if you start from Zero, beacuse it's being added more abilities all the time (while vbscript is old and not updated).

to dump data using powershell to a db, you can use a dll which will do the work for you :
Bulk import text files using .net 2.0 SqlBulkCopy class in C#
alen teplitsky
alen teplitsky
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1595 Visits: 4621
so you have to dump the log to a text file first and then use SSIS or bcp to import it?
Matt Hayes
Matt Hayes
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 54
This example seems to work a treat on two of my SQL Servers (one a 2005 box and the other a 2008 box), however I cant seem to get any events forwarding on another 2008 box.

I've enabled Event Forwarding in SQL Agent on the server and have verified the hostname and that all events are enabled but this doesnt seem to have resolved this.

Are there any common pitfulls I may have overlooked?

Thanks
Matt
Geoff A
Geoff A
SSChasing Mays
SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)SSChasing Mays (606 reputation)

Group: General Forum Members
Points: 606 Visits: 1791
Matt Hayes (11/8/2010)
This example seems to work a treat on two of my SQL Servers (one a 2005 box and the other a 2008 box), however I cant seem to get any events forwarding on another 2008 box.

I've enabled Event Forwarding in SQL Agent on the server and have verified the hostname and that all events are enabled but this doesnt seem to have resolved this.

Are there any common pitfulls I may have overlooked?

Thanks
Matt


Hi Matt,

more than likely, MSDTC is not configured.
On the server that IS set to forward events and it is not working, look at the application event log to confirm.
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