SQL Clone
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 Veteran
SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)

Group: General Forum Members
Points: 205 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
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1074 Visits: 1802
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-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

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

Group: General Forum Members
Points: 2731 Visits: 4670
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 (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)

Group: General Forum Members
Points: 147 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
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2731 Visits: 4670
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 Veteran
SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)SSC Veteran (205 reputation)

Group: General Forum Members
Points: 205 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
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2731 Visits: 4670
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
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1074 Visits: 1802
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