Health Checks

Jul 15, 2004

I'm starting to collect and develop some scripts that will tell me the health and welfare of my MSSQL 2k server. I have a few for blocks, db size, who is on and what they are currently running. I was wondering if you guys could share some of the scripts you guys use to watch the health of your servers.

Thanks,
DMW

View 1 Replies


ADVERTISEMENT

Health Checks On SQL

Jul 15, 2004

I'm starting to collect and develop some scripts that will tell me the health and welfare of my MSSQL 2k server. I have a few for blocks, db size, who is on and what they are currently running.

I was wondering if you guys could share some of the scripts you guys use to watch the health of your servers.

Thanks,
DMW

View 1 Replies View Related

Health Monitoring And IIS

Feb 5, 2007

Hi,
I have implemented health monitoring for my web-site, using the SQL provider.
Health monitoring works fine when the website is run from VS2005, using the built in web server, all the expected events are inserted into the aspnet database.  However when I deploy the site onto IIS, no events are ever inserted into the database. 
I would appreciate some help figuring out why this is happening!  The code that implements the health monitoring in my web.config file is:1 <healthMonitoring
2 enabled="true"
3 heartbeatInterval="0">
4 <bufferModes>
5
6 <remove name="Analysis"/>
7
8 <add name="Analysis"
9 maxBufferSize="10"
10 maxFlushSize="2"
11 urgentFlushThreshold="2"
12 regularFlushInterval="00:00:02"
13 urgentFlushInterval="00:00:01"
14 maxBufferThreads="1"/>
15
16 </bufferModes>
17
18 <providers>
19
20 <remove name ="SqlWebEventProvider"/>
21
22 <add name="SqlWebEventProvider" type="System.Web.Management.SqlWebEventProvider,
23 System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
24
25 connectionStringName="SQL_ASPNET"
26 maxEventDetailsLength="1073741823"
27 buffer="true"
28 bufferMode="Analysis"
29
30 />
31
32 </providers>
33
34 <eventMappings>
35
36 <remove name ="All Events"/>
37 <add name="All Events"
38 type="System.Web.Management.WebBaseEvent, System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/>
39
40 </eventMappings>
41
42 <profiles>
43
44 <remove name="Default"/>
45 <add name="Default"
46 minInstances="1"
47 maxLimit="Infinite"
48 minInterval="00:10:00"
49 />
50 </profiles>
51
52 <rules>
53
54 <add name="All Events"
55 eventName="All Events"
56 provider="SqlWebEventProvider"
57 profile="Default"
58 minInterval="00:00:01"
59 minInstances="1" />
60
61 </rules>
62
63 </healthMonitoring>
64

 Thank you in adance!
 Jon

View 2 Replies View Related

Database Health

Feb 28, 2006

What all are the command , or what for should one look out to confirm if nothing is wrong with the DB & its the application that is creating a prob..
I mean command for checking the health of the DB.


Thanks,

View 4 Replies View Related

Reporting On Health Of Db??

Jan 17, 2007

Hey all
I am new here and fairly new to SQL server. And yes i have a question, that maybe dumb.
My boss wants me to reporting to him the health of the DB each week. So here are a few questions.
1. What really defines the "health" of a DB? What elements should I be reporting to him?
2. Is there any utilities out there that would be helpful or can SQL provide enough info?
3. I am using 2005 standard, so I have the shipped reports in summary page. But is this enough? and can I customize them?
Sorry I am having a hard time even asking the questions cause I am not really sure what to ask. Any help or pointing down t he correct path
would be greatly appreciated.
Thanks,
jason

View 1 Replies View Related

SQL Server Health And History

Oct 5, 2004

Anyone had time to play with this yet? Wanna know if it was worth playing around with.

View 2 Replies View Related

How To See Health Check In Sql Server

Apr 9, 2008

Hi,

can anybody help me that how can we see sql server Health check with t-sql.Because i am trying to make script for this
Basically i need these info..
1.Current Date
2.Current time
3.Session,id
4.Session name
5.all locks
6.cpu utilization
7.how much disk space is used inside the database
8.how much space is free inside the database
9.Date read
10 Date write
11.how can we see process information with t-sql or with stored procedure

and i have solved 6 problems from this list i made queries for this .
will u plz help me
thaxxx

jagpal singh

View 2 Replies View Related

Trusted Connection - Health Monitoring - Please :-)

Apr 10, 2006

Help Please!!! I am killing myself already...... the code is like this;
Read the code, and the error.... this is bull, because every page in the site, including base page, and opther classes in the same assembly as this class use the exact same connection string call and open. And it always works!!!! However, when going thorgyugh health monitoring, i get the error:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
 
public class GBMSQLEventProvider : SqlWebEventProvider
{
private GBMErrorLog elog;
private System.Data.SqlClient.SqlConnection db = null;

public override void Initialize(string name, NameValueCollection config)
{
elog = new GBMErrorLog();
elog.Write("GBMSQLEventProvider Process Initialize");
db = (SqlConnection)GBMDB.Open("HealthMonitoring");  <------ THIS LINE CAUSES ERROR
base.Initialize(name, config);
}
 
ERROR:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.Source Error:



Line 30: elog = new GBMErrorLog();
Line 31: elog.Write("GBMSQLEventProvider Process Initialize");
Line 32: db = (SqlConnection)GBMDB.Open("HealthMonitoring");
Line 33:
Line 34: base.Initialize(name, config);Source File: C:GCMProjectsGBMFrameworkGBM.Web.UIEventsBufferedProvider.cs    Line: 32 Stack Trace:
Regards, and thank you in advance,
Jonathan

View 10 Replies View Related

Database Server Health Check

May 9, 2007

I want to run Profiler Traces, Perfmon Checks and whatever else to see what hits the server the hardest in order to work out where I can make performance improvements. We don't have any massive problems other than more timeouts than I would expect from web users no-and-then when they do pretty simple free-text searches. I just want to see if I can lighten the load on the server in general.

Where does a DBA get the most ROI? I don't want to drift into the realm of diminishing returns where I am making changes that have no noticeable impact.

What should I start measuring first and how do you measure it? (E.g. if I should monitor disk writes in Profiler, how many writes are too high for a statement? 100? If so, is one 100-write statement per hour OK but one 100-write statement per second is not OK?)

If there is already an article for this, my apologies. I'd be grateful if you can point me to it.
Is http://www.sql-server-performance.com/ a sufficient one-stop-shop for this question? If so, have you found some articles there to be more useful than others?

View 5 Replies View Related

Microsoft Cluster Server Health Check.

Jun 29, 2005

Hello,

View 2 Replies View Related

Microsoft SQL Server Health And History Tool Version 2

Sep 15, 2004

Recently I've installed Microsoft SQL Server Health and History Tool Version 2

and The SQLH2 Reports are a set of reports that provide different views on the data

that the tool collects. But unfortunately I can be able to see Data on Performone counters

Report. I can not find optional component SQLH2 Performance Collector is a stand-

alone service of Microsoft Windows that collects and stores performance counter data from

selected servers.

The Deployment guide tells :

Performance Collector is optional, and is available for download from the Microsoft Download Center (search for SQL Server with keyword SQLH2): http://www.microsoft.com/downloads/search.aspx


But it does not give result

Where can I find the missing component ?

Thanks

Oleg


:(

View 1 Replies View Related

SQL Server 2000: Replication Latency Health Check

May 25, 2004

Hi Everybody,
Can anybody tell me how to get the number of commands delivered per minute in case of Merge Replication with Publisher and subscribers.
This way, we can be sure that even if there is a latency (due to high volume transaction processing), replication is in good shape and things will catch up soon.
Also if there are any other similar measures which can be monitored to make sure that replication is going on fine, it would be great

Please let me know If anyone has got information on same.

View 1 Replies View Related

SQL 2012 :: Approximate Hours Per Month To Monitor And Maintain Health Of Databases?

Jul 8, 2014

Based on the description below on average how many hours a month would it take to monitor and maintain the MSSQL Server databases?

Description of IT infrastructure.All Windows Servers and MSSQL Servers are up to date on patches and best practices.

Corporate site with 3 remote sites.

All remote sites have one DC and one MSSQL Server.

The corporate site has one MSSQL Server.

Replication is performed between the remote MSSQL databases and the corporate office MSSQL database.

There is no in-house DBA. All DBA services will have to be outsourced. I am trying to determine what is reasonable in budgeting for time involved for this service.

There is one project written in MS Access using Visual Basic for Applications (VBA) with the backend residing on these database.

The question is on average approximately how many hours a month would it take to monitor and maintain the health of the MSSQL Servers database by a MSSQL DBA. The DBA will not have to create any user reporting, queries, etc. Just maintain the existing MSSQL Servers database.

View 9 Replies View Related

FK Checks

Jul 20, 2005

Suppose you have two (or more) tables with foreign key constraints. Myquestion is thus:Is it better to check if the fk exists before you try to perform theinsert or let SQL do it for you?On one hand, if you check yourself and the key does not exist you cangracefully handle it (maybe exit out of method with error). If you letSQL do it, the server will throw an error which cannot be suppressed.On the performance side, you doing the check will incur a slight (VERYslight) hit since SQL will ALSO check anyways.

View 3 Replies View Related

Integrity Checks

Aug 21, 2002

On weekends I have Integrity Checks scheduled to run. Many of these fail for individual databases because users do not log off and the databases cannot be switched to single user mode.

I have checked Books-on-line and have not yet stumbled onto a TSQL command that breaks the connections.

Is there a TSQL command to do this? If not, how can these connections be broken?

View 2 Replies View Related

Rules Vs Checks?

Jan 23, 2007

Hi experts,

What is the difference between, Creating rules and creating checks on a field?

They both look the same.

Regards
sachin

Don't sit back because of failure. It will come back to check if you still available. -- Binu

View 9 Replies View Related

Integrity Checks Failing

Apr 21, 2003

I have a few databases on this Windows 2000 Server running
SQL 2000 which were detached from SQL 7.0 and attached to
SQL 2000.
The problem is the Maintenance Plans (Integrity Checks
keep failing on SQL 2000. I 'DTS'ed a SQL 7.0 database to
this SQL 2000 server and ran the Maintenance Plans on that
database. Works fine only for the DTS'ed database.
What am I missing ???
:confused:

View 5 Replies View Related

Integrity Checks Job Failed

Jul 29, 2004

Hello, I had a DB Maintenance plan, the schedule is every day, but today I found teh 'Integrity checks job is failed". What is that mean? How to check this. Thanks.

View 14 Replies View Related

Num Of Checks Written In 4 Day Period For More Than $400

Apr 25, 2006

I have a transaction table which has Date as datetime field, amount and account number. i want to find out count of checks that were written in a period of 4 days which exceeded i.e. > $400, between 401 and 500, > 501 for a single month. the table has data for more than a year and i want the results then grouped in monthly format like in
OCT between 300 & 400 #30 (30 customers gave checks total worth $300-$400 within any 4 consecutive days period in the month of OCT )
between 400 & 500 # 20
> 501 # 10

NOV between 300 & 400 #30
between 400 & 500 # 20
> 501 # 10

and so on for a 6 month period.

View 1 Replies View Related

Integrity Checks Job Failed

May 10, 2006

Activity: Check Data and Index Linkage
Error Number: 3624
Severity: 20
State: 1

The errorlog has this:

SQL Server Assertion: File: <p:sqltdbmsstorengdrsinclude
ecord.inl>, line=1447
Failed Assertion = 'm_SizeRec > 0 && m_SizeRec <= MAXDATAROW'.

There is a dump file generated also.

I had run DBCC CHECKDB and no error is found.

Any help is appreciated.

Thanks

View 3 Replies View Related

Integrity Checks Job Failing

May 7, 2007

Hi,

SQl Server 7

I have Daily User DB Integrity Checks job running daily
From past 2 days i am getting below error.

[Microsoft][ODBC SQL Server Driver][SQL Server]CHECKDB found 0 allocation errors and 35 consistency errors in table 'Prod_Hist' (object ID 2098106515).
[Microsoft][ODBC SQL Server Driver][SQL Server]CHECKDB found 0 allocation errors and 99 consistency errors in database 'Ucatalog'.
[Microsoft][ODBC SQL Server Driver][SQL Server]repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (Ucatalog repair_fast).
[Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.


Please suggest..

Thanks in Advance
Adil

View 1 Replies View Related

Daily/Weekly Checks

Jun 24, 2008

What daily/weekly checks do you guys currently perform on your servers and databases?

I recently ran across with an article from SQLServerCentral that listed a couple of daily checks that I'm thinking about implementing on my environment, and some of them are:
DB Missing Recent Backup - Report
DB Missing Recent Log Backup - Report
Drives Low on Disk Space - Report
Error Log Messages Report - Report
Instance Recently Restarted - Report
Job Failures - Report
Large Databases Log File - Report

I already have in place:
Verify is SQL Agent Service is running
Check Disk Space Available

Since I'm going to spend some time on this, I was wondering if there's anything else that you guys have in place or any other 'nice to have' that you guys also might have, so I don't leave anything behind...

Thanks!


---
http://www.ssisdude.blogspot.com/

View 5 Replies View Related

Conditional Checks In SSIS.

Apr 11, 2007

I have two connections in a package pointing to two different databases
on the same server. I have to insert records from 'DB1' table 'Gender1'
to 'DB2' table 'Gender2'. Before I do that though, I have to make sure
the minimum value (of all the Gender Keys that are going to be
inserted) of 'DB1' 'GenderKey' (which is an identity field) is greater than the
maximum value of DB2-GenderKey (which is a primary key but not an
identity field). How can I do this simple check? I have to do this process for many different tables ....... Gender table is just an example. If someone can give an detailed explanation on which tasks to use and how to use them (as I am relatively new to SSIS) that'd be great.

View 17 Replies View Related

Constraint Checks After Insert

Feb 27, 2008



Hi all,

I'm trying to use a custom check constraint to insert into a table. I have created a function that checks an item against a authorization date as well and I've coupled this into the constraint. So for example, my function starts:




Code Snippet
ALTER FUNCTION {function1} (@ItemID INT, @AuthDate DATETIME)
RETURNS INT
AS
BEGIN

DECLARE @Ret INT
SET @Ret = 0
IF NOT EXISTS(SELECT top 1 ItemID FROM {table1}
Where b1.ItemID = @ItemID
AND @AuthDate <= ISNULL(b1.expirydate, @AuthDate))
BEGIN
SET @Ret = 1
END
ELSE
BEGIN
SET @Ret = 0
END

RETURN(@Ret)
END
GO



Now i couple that into a check constraint for the same table:




Code Snippet
ALTER TABLE {table1} ADD CONSTRAINT {contraint_name} CHECK (([function1]([ItemID], [AuthorizedDate])=(1)))
GO








Now, when i insert a record into this table with an Authorized Date greater than the ItemDate it should set the @ret value to 1. This is being passed back to the constraint should set 1=1 which is true and therefore should allow an insert, however, i cannot do this. I think this is because it inserts the record and THEN does the check which makes it fail. Is there anyway to do this check before the INSERT without having to use a trigger? I dont want to use a trigger because when we're doing an insert for bulk rows, performance decreases correct?



View 3 Replies View Related

Help - Conditional Checks Within A SQL Query - Other Ways Of Doing It?

Jun 13, 2007

I'm trying to simplify a SQL Stored Procedure.The query accepts an int, @ItemTypeID intI have the Query:SELECT ... FROM ItemList WHERE ItemTypeID = @ItemTypeIDor, if @ItemTypeID is 0,SELECT ... FROM ItemList Is there a way to do this query without doing:IF @ItemTypeID = 0BEGIN   ...SELECT QUERY...ENDELSEBEGIN   ...SELECT QUERY...END? 

View 5 Replies View Related

SQLMaint Integrity Checks Failure

Aug 30, 2005

My SQLMaint integrity checks consistently fail when the "Repair any minor problems" option is checked. The reported reason is that the database must be in single user mode. This doesn't seem practical. Am I missing an option somewhere?

View 1 Replies View Related

Help - Script That Checks For OFFLINE Database

Sep 21, 2006

Hello ,

I have got a script which checks for the databases that are offline. and mails the dba when any of the database is offline.

When I schedule the job , for every hour , it gives me an blank mail only with the subject ' status of database on testsql' even though no databases are offline.

So how can I change the script , so that it mails the dba only when a database is offline even though its scheduled every hour or half an hour.

The script is:

Set NoCount on
DECLARE @dbname VARCHAR(100)
deCLARE @Status varchar(100)
Declare @Message VARCHAR(8000)
DECLARE @date varchar(100)
set @date = convert(varchar(100), getdate(),109)
set @Message = ''DECLARE dbname_cursor
CURSOR FOR SELECT [name], CONVERT(varchar(30),DATABASEPROPERTYEX(name,'Statu s'))
as [Status] FROM master..sysdatabases WHERE CONVERT(varchar(30),DATABASEPROPERTYEX(name,'Statu s')) = 'OFFLINE'
order by name
OPEN dbname_cursor
FETCH NEXT FROM dbname_cursor INTO @dbname, @Status
WHILE
@@FETCH_STATUS = 0
BEGIN select @message = @message + @@Servername + '-' + @dbname + ' - ' + @Status + Char(13)+ ‘- ‘ + @date
FETCH NEXT FROM dbname_cursor INTO @dbname, @Status
END
CLOSE dbname_cursor
DEALLOCATE dbname_cursor

print @message
EXEC master.dbo.xp_smtp_sendmail
@FROM = N'testsql2000@is.depaul.edu',
@TO = N'dvaddi@depaul.edu',
@server = N'smtp.depaul.edu',
@subject = N'Status of the Database on Testsqlserver!',
@type = N'text/html',
@message = @message


Thanks

View 8 Replies View Related

Dev Code For Database Exists Checks

Mar 1, 2006

I want to check to see if a database exists in SQL Server 2005 Express... using VB.NET (or C#)... Can not use the SQLConnection Object... because I get a Failed Login Attempt... regardless if the DB does not exist or if it is because the User Login is incorrect

Is there some way to check to see if the Database exists (is attached) to the SQL Server 2005 Express Engine?

ward0093

View 3 Replies View Related

Integrity Checks Job Question In Sql 2000

Dec 3, 2007

The integrity checks job on the user databases failed over the weekend and here is the error I got from the report:
Database DB_Stores: Check Data and Index Linkage...
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 7919:
[Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed.
Database needs to be in single user mode.
The following errors were found:
[Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed.
Database needs to be in single user mode.
** Execution Time: 0 hrs, 0 mins, 1 secs **
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft][ODBC SQL Server Driver][SQL Server]
Database state cannot be changed while other users are using the database 'DB1'
[Microsoft][ODBC SQL Server Driver][SQL Server]ALTER DATABASE statement failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]sp_dboption command failed.
Googled the issue and found some articles on this issue, but wanted to also run it by you.
I looked at the maint plan properties and under the integrity tab of the maint plan attempt to repair any problems is checked, this is what I think:
Since attempt to repair is checked, the db was trying to repair the issue and since users were logged into the system
it could'nt repair the issue as the system needs to be in single user mode. I think if we uncheck the attempt to repair
option, then the job would run fine.
But is this the best way to do? how about the errors it was trying to repair? Do we have to fix the error's it was trying to
fix later by changing the db to single user mode.
PLease let me know your ideas, thanks!!

View 1 Replies View Related

TSQL Checks File Existence?

Sep 3, 2007

Hi,


Does TSQL provide methods to check if a file exists?


For example, a TSQL script will read data in a .dbf file into SQL Server. It will check if the file exists before read. How to do this check?


Thank you.

View 1 Replies View Related

SQL 2012 :: Optimal Settings For DBCC Checks?

Aug 5, 2014

I have a VM set up for offloading DBCC checks. Specs are below. I've read through this, but I'm not seeing the performance gains by enabling the trace flags and using the physical only switch.

Is the whole drawback that I'm on SATA storage? Is there a VM configuration with the CPU I can/should change? I've been playing with MAXDOP trying to see if I can get any benefits but I'm not seeing a much.

wait_type wait_time_spctrunning_pct
CXPACKET 561191.4228.7128.71
OLEDB 387136.7619.8148.52
PAGEIOLATCH_SH 340674.5817.4365.95
TRACEWRITE 321598.8416.4682.41

[code].....

View 9 Replies View Related

SQL 2012 :: Backup Job And Integrity Checks Are Failing?

Sep 27, 2015

I am using sql server 2012 with HADR (Always on with sql cluster).

We have database maintenance plans through wizard for full backup & DBCC CHECK DB. It was running successfully but it failed with the below error

Execute SQL Task Description: Failed to acquire connection "Local server connection". Connection may not be configured correctly or you may not have the right permissions on this connection.

(A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)).

(A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)).

I can able to take the backup from query window. It is succesful. The Sql Agent has full permissions. I don't think there are any recent changes happen.

View 9 Replies View Related

Automating Process Of Database Integrity Checks

Feb 1, 2007

Hi,
I want to automate the process of database integrity checks in sql server any suggestions how to do

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved