I would like to be able to fetch the name of the elastic pool that the current database belongs to using TSQL but the only DMV I can find with a column containing elastic is sys.elastic_pool_resource_stats & I don't see any reference to databases there. I also checked sys.databases to see if an extra column got sneaked on there but nothing I could recognise.
Ideally this should work like @@servername or db_name() (when on earth will they get around to creating server_name() or @@dbname so that we can code consistently ?)
Does anyone know a suitable command ?
(btw no tag for "elastic pools")