Question: There is an Old-SQL server, Running as a VM guest, that needs to be replace. The Old-SQL server will be replaced with a New-SQL server, running as a VM Guest.

Currently the Old-SQL server needs to be reviewed to see what service its providing at to which applications-- and to see what is actively being used on the server.

Are there instructions for checking which databases are being used by which applications?

Are there instructions for verifying which databases are no longer being used?

Thank you for any additional information or guidance.

Answer: 
In addition, here is another query you could use:

SELECT @@ServerName AS serverName,
 NAME AS DatabaseName
 ,COUNT(STATUS) AS NumberofConnection
 ,GETDATE() AS Time
 FROM sys.databases sd
 LEFT JOIN sysprocesses sp ON sd.database\_id = sp.dbid
 GROUP BY NAME
Have you tried sp\_who to see what processes are running on SQL server?

<https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-who-transact-sql?view=sql-server-2017>