# List the db connections in MSSQL-CN

**URL:** <https://discourse.nodered.org/t/list-the-db-connections-in-mssql-cn/76283>\
**Category:** General\
**Tags:** database, node-red-contrib-mssql-plus\
**Created:** [8 March 2023 09:42 UTC](https://discourse.nodered.org/t/list-the-db-connections-in-mssql-cn/76283 "2023-03-08T09:42:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoobX](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@NoobX](https://discourse.nodered.org/u/NoobX)\
**Post date:** [8 March 2023 09:42 UTC](https://discourse.nodered.org/t/list-the-db-connections-in-mssql-cn/76283/1 "2023-03-08T09:42:42Z")

</div>

Hello Everyone !

I have quite a few connections in MSSQL-CN, established with databases to use the MSSQL PLUS node.  
I would like to regularly check the list of these connections, as well as their properties:  
name , server, port, username, and if it is possible the connection status (if the db is reachable or not).  
The connection are all on SQL server DB.

After days of research, I still have no clue how to do it ! With a function node ? Or there is an existing node that can do it ?

Any advice will be welcome !

Thanks for your help

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 March 2023 11:37 UTC](https://discourse.nodered.org/t/list-the-db-connections-in-mssql-cn/76283/2 "2023-03-08T11:37:14Z")

</div>

> [@NoobX](#):
>
> I would like to regularly check the list of these connections, as well as their properties:  
> name , server, port, username, and if it is possible the connection status (if the db is reachable or not).  
> The connection are all on SQL server DB.

You could form a simple query like `SELECT @@SERVERNAME as server, SERVERPROPERTY('Edition') AS Edition, GetDate() as serverTime` and a [whole bunch more](https://spgeeks.devoworx.com/get-sql-server-info-using-serverproperty/)

If you get a response, the server is online (full end 2 end check)

If you do not get a response, it is not.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 May 2023 11:37 UTC](https://discourse.nodered.org/t/list-the-db-connections-in-mssql-cn/76283/3 "2023-05-07T11:37:27Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
