Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
saps
Starting Member
2 Posts |
Posted - 2013-02-01 : 03:03:52
|
We are using SQLSERVER2008 and i have never touch this before, Now I am suppose to handle it and to start with I have to add the monitoring of this new_db monitoring checks to a monitoring tool with the help of batch scripts.The DB resides on a Windows Box.I am wondering how can I first 1. Test the connection to DB if it is up and running.2. How many processes are running for SQL server (what shd be the minimum when no user is connected)NEW SQL DBA |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-01 : 03:37:15
|
1. open SQL Server Management studio which is the client tool for connecting to db. Then click connect-> database engine and give name of server in format machinename\instancename. If its connects server is up and running.You can also check service status from SQL Server configuration manager and checking if sqlserver service is running2. use below query for checking processessp_who2 'active'run this and you would see currently active processes in the server------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
saps
Starting Member
2 Posts |
Posted - 2013-02-01 : 03:51:48
|
Thanks for the reply -Wondering if i can check the status through command line which will help me in integrating the same to batch.quote: Originally posted by visakh16 1. open SQL Server Management studio which is the client tool for connecting to db. Then click connect-> database engine and give name of server in format machinename\instancename. If its connects server is up and running.You can also check service status from SQL Server configuration manager and checking if sqlserver service is running2. use below query for checking processessp_who2 'active'run this and you would see currently active processes in the server------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
NEW SQL DBA |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-01 : 04:20:37
|
try thisxp_servicecontrol 'querystate', 'MSSQLSERVER'go------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2013-02-01 : 13:10:58
|
You can also use Powershell , so to check the SQL Server service , it would be:--check the service status $svc = Get-Service ‘MSSQL$MyInst1’$svc.status--You can also do things likeStop-Service 'MSSQL$MyInst1'Start-Service 'MSSQL$MyInst1'--Restart the serviceRestart-Service 'MSSQL$MyInst1'Jack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
|
|
|