September 7, 2007 at 12:21 pm
Hello
For Oracle we have OEM (Oracle Enterprise Manager). I would appreciate if any of you can let me know the following ( i am new to this SQL Server stuff)
1. what Tool i can use for Health Checking of the SQL Server database
2. Does this tool scan the logs for any errors etc
TIA
SQL Sever Newbee
September 7, 2007 at 2:08 pm
For db health check have a look at "dbcc checkdb" (not GUI, but T-SQL). http://msdn2.microsoft.com/en-us/library/aa258278(SQL.80).aspx
it does not go through the error log, but writes there too if there is an error.
Concerning error logs, you can check them via: Enterprise Manager -> Management->Error Logs (I assume you are using SQL Server 2000)
Andras
September 9, 2007 at 1:39 pm
Thank you Andras. Is there a way to avoid manual checking. Since it will not be possible to keep checking the error log manually frequently, is there any tool which can scan for any errors?
Would appreciate any feedback.
Thanks
September 11, 2007 at 6:17 am
Enerprise Manager is very similar to Oracle's Enterprise Manager. Look into the Agent. You can configure all sorts of alerts that look for Errors, performance conditions, etc.
Read the Books On Line (BOL) You will find what you need.
September 12, 2007 at 7:15 am
For SQL Server 2000, I use a windows script to check for errors in the error logs and send an e-mail if errors are found. I converted an old unix script I had to check Oracle alert logs for ORA- errors, it works the same way. You can also use Embarcadero's DBArtisan.
For SQL Server 2005, Management Studio will work just as well.
September 12, 2007 at 7:24 am
I also just saw this featured script on the post which may be helpful:
http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1925
September 12, 2007 at 9:25 am
Hello Ronda
How do you mail / page the dba. There is no mailx equivalent in windows AFAIK. Would you mind sharing the script you are using?
Thanks
September 12, 2007 at 10:03 am
Here's the script that I found on this site:
Can anyone show me how to generate an error as I'm trying to test this script on a test box?
If exists(select * from dbo.sysobjects where id = object_id(N'Verifyerrorlog') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure Verifyerrorlog
go
CREATE proc Verifyerrorlog
as
begin
set nocount on
set quoted_identifier off
/* Procedure to scan past one hour errorlog for the keyword "Error"
--Vidhya Sagar--kvs1983@gmail.com
--This procedure is for Sqlserver 2000
*/
--TABLE TO COPY ALL DESCRIPTION FROM CURRENT ERRORLOG FILE
declare @curdate varchar(25)
set @curdate = datepart(hh,getdate())
CREATE TABLE #fullerrlog(Description varchar(500) Not null,contin bit)
insert #fullerrlog
exec master..xp_readerrorlog
set rowcount 7
delete #fullerrlog
set rowcount 0
delete #fullerrlog where substring(description,12,2)<>@curdate-1
delete #fullerrlog where description not like ('%error%')
select * from #fullerrlog
drop TABLE #fullerrlog
end
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply