1.

Solve : To check whether SQL Server is intalled.?

Answer»

Hi, All

I have to check whether sql server is installed on the machine where the batch script is executing by using Batch script.

Can anyone please give me the solution.

Thanks.I'm worried that you sound like a wannabee hacker. The following are trivial tasks:

(a) to find out if SQL server is installed.
(b) to find out how to find out if SQL server is installed.

Please ADVISE REASON why you have asked this.

Quote from: Dipu on October 10, 2007, 04:32:39 AM

Hi, All

I have to check whether sql server is installed on the machine where the batch script is executing by using Batch script.

Can anyone please give me the solution.

Thanks.
if you want to see whether its installed, you can go to Program files and search for its installation path.
however, if you just want to check whether its up and running...a few ways
1) SQL server usually runs on port 1433. So using a combination of NETSTAT with options, findstr and using errorlevels, you can check whether its up
2) using the sc command , #hint: type sc /? to see how to query mssql service.
3) using command line mssql CLIENT like osql, isql. Try to connect to the server, if RETURNS error, then mssql is not up or not set up properly....


Discussion

No Comment Found