xp_msver returns version information about Microsoft SQL Server
Execute master.dbo.xp_msver <OPTNAME> [<OPTNAME> , <OPTNAME>, ... ]
An Example:
Execute master.dbo.xp_msver ProductVersion , ProcessorType , ProcessorCount , PhysicalMemory
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/xp-msver-transact-sql?view=sql-server-ver15
SELECT [object_name],
[counter_name],
[cntr_value] AS PLE -- in seconds
FROM sys.dm_os_performance_counters
WHERE [object_name] LIKE '%Manager%'
AND [counter_name] = 'Page life expectancy'
-- with formatings:
; with PLE AS
(
SELECT [object_name],
[counter_name],
[cntr_value] AS PLE,
[cntr_value] / 86400 AS PLEDays,
[cntr_value] - (([cntr_value] / 86400) * 86400) AS PLESecondsInLastDay
FROM sys.dm_os_performance_counters
WHERE [object_name] LIKE '%Manager%'
AND [counter_name] = 'Page life expectancy'
)
SELECT [object_name], [counter_name],
PLE AS PLESec,
PLEDays,
PLESecondsInLastDay, PLESecondsInLastDay / 60,
( RIGHT('0' + CAST(PLESecondsInLastDay / 3600 AS VARCHAR),2) + ':' +
RIGHT('0' + CAST((PLESecondsInLastDay / 60) % 60 AS VARCHAR),2) + ':' +
RIGHT('0' + CAST(PLESecondsInLastDay % 60 AS VARCHAR),2)
) AS PLEInLastDay,
CAST(PLEDays AS VARCHAR) + 'd ' +
( RIGHT('0' + CAST(PLESecondsInLastDay / 3600 AS VARCHAR),2) + ':' +
RIGHT('0' + CAST((PLESecondsInLastDay / 60) % 60 AS VARCHAR),2) + ':' +
RIGHT('0' + CAST(PLESecondsInLastDay % 60 AS VARCHAR),2)
) PLENiceFormat
FROM PLE;
-- buffer cache usage per database
SELECT d.database_id,
d.name AS database_name,
COUNT(*) * 8 / 1024 AS mb_used
FROM sys.dm_os_buffer_descriptors osb
INNER JOIN sys.databases d ON d.database_id = osb.database_id
GROUP BY d.database_id, d.name
ORDER BY COUNT(*) DESC;
-- buffer cache usage for whole instance
SELECT COUNT(*) * 8 / 1024 AS mb_used
FROM sys.dm_os_buffer_descriptors osb
INNER JOIN sys.databases d ON d.database_id = osb.database_id;
What happened?
Can't connect to RS but can connect to ASE in the same server:
C:\SAPRS>isql64 -S RSSERVERNAME -Usa -Ppassword
CT-LIBRARY error:
ct_connect(): user api layer: internal Client Library error: Read from the server has timed out.
CT-LIBRARY error:
ct_connect(): network packet layer: internal net library error: Net-lib operation timed out
C:\SAPRS>isql64 -S ASESERVERNAME -Usa -Ppassword
1>
Error message:
Check in the RS log:
I. 2020/04/22 20:34:47. Check the log for error messages from RSSD.
I. 2020/04/22 20:34:47. Message from server: Message: 7412, State 2, Severity 10 -- 'Space available in the log segment has fallen critically low in database 'RS_RSSD'. All future modifications to this database will be suspended until the log is successfully dumped and space becomes available..
Cause:
Log space of the RSSD database (of the RS) is full.
Check it using:
sp_helpdb <RSSDNAME>
sp_helpdevice <RSSDLOGDEVICENAME>
Solution:
Add space to the RSSD log:
http://copypastenet.blogspot.com/2020/01/sap-ase-sybase-transaction-log-in.html