Hi @Tautvydas Perminas Thank you for posting your query on Microsoft Q&A and for using Azure services.
My understanding is that you are seeing App CPU billed even though database was paused.
**How do I find out what/who unpauses my database? **
The following features do not support auto-pausing but do support auto-scaling. If any of the following features are used, then auto-pausing must be disabled, and the database will remain online regardless of the duration of database inactivity:
Auto-pausing is temporarily prevented during the deployment of some service updates which require the database be online. In such cases, auto-pausing becomes allowed again once the service update completes.
Auto-pause troubleshooting
If auto-pausing is enabled, but a database does not auto-pause after the delay period, and the features listed above are not used, the application or user sessions may be preventing auto-pausing. To see if there are any application or user sessions currently connected to the database, connect to the database using any client tool, and execute the following query:
SELECT session_id,
host_name,
program_name,
client_interface_name,
login_name,
status,
login_time,
last_request_start_time,
last_request_end_time
FROM sys.dm_exec_sessions AS s
INNER JOIN sys.dm_resource_governor_workload_groups AS wg
ON s.group_id = wg.group_id
WHERE s.session_id <> @@SPID
AND
(
(
wg.name like 'UserPrimaryGroup.DB%'
AND
TRY_CAST(RIGHT(wg.name, LEN(wg.name) - LEN('UserPrimaryGroup.DB') - 2) AS int) = DB_ID()
)
OR
wg.name = 'DACGroup'
);
Source: Azure SQL Database serverless
Regards,
Oury