Hi Naga Durga Devi Kannuri - AdminTo be able to query the sys.dm_os_sys_info
DMV the user that you are using to get connected to the server requires VIEW SERVER STATE permission on the server or have administrative privileges on the SQL server.
To create a new login in Azure SQL Database with administrative authentication, I executed the following script in the master database:
create login1 with password = '<password>'
Create a user with above login in my required database and assigned role to the user.
USE [database]
GO
CREATE USER <user> FOR LOGIN <login>
GO
ALTER ROLE db_owner ADD MEMBER <user>
GO
Login into master database with admin authentication and add below role to the new login
ALTER SERVER ROLE ##MS_ServerStateReader##
ADD MEMBER login1;
GO
And open up a new query window as an admin account privileges and enter the following:
GRANT VIEW SERVER STATE TO [login]