March 3, 2011 at 2:21 pm
i have 30 databases in 5 iInstances. (2 are sql server 2000 and 3 are sql server 2005) i want to ping all the databases for every 15 min. through a job to know that all the databases are online. how to do that? can any body help me?
March 3, 2011 at 2:45 pm
theres an application out there called What's Up!, which does what you are asking for...tests servers and services on those servers, and notifies people if anything goes down.
last i heard that app was free, and there was a more enhanced version you could pay for.
to do it yourself,
i think once you connect you don't have to worry about specific databases, so SELECT @@VERSION is enough to test the SQL server, but you could simply run SELECT @@VERSION FROM EachLinkedServer.DATABASE1.sys.tables on each linked server to test connectivity to a db as well.
Lowell
April 13, 2011 at 12:27 pm
Create linked servers to each of your instances and run the following code on them:
Here is the Status column description:
1 = autoclose; set with ALTER DATABASE.
4 = select into/bulkcopy; set with ALTER DATABASE RECOVERY.
8 = trunc. log on chkpt; set with ALTER DATABASE RECOVERY.
16 = torn page detection, set with ALTER DATABASE.
32 = loading.
64 = pre recovery.
128 = recovering.
256 = not recovered.
512 = offline; set with ALTER DATABASE.
1024 = read only; set with ALTER DATABASE.
2048 = dbo use only; set with ALTER DATABASE RESTRICTED_USER.
4096 = single user; set with ALTER DATABASE.
32768 = emergency mode.
4194304 = autoshrink , set with ALTER DATABASE.
1073741824 = cleanly shutdown.
QUIGROUP- Need a Certified experienced DBA for a project or troubleshooting? Need help with programming, database recovery, performance tuning, ETL, SSRS or developing new databases? Contact us.. 1-786-273-9809
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply