Which protocol is being used for client-server connectivity in SQL Server?
Result :
SELECT net_transport FROM sys.dm_exec_connections WHERE session_id = @@SPID;
Above query return our server connection protocol. There are 4 protocol there for connect database server with client.Result :
Important Query : Client-server connectivity in SQL Server |
Determine Free Disk Space in SQL Server with T-SQL Code
select a.FILEID, [FILE_SIZE_MB] = convert(decimal(12,2),round(a.size/128.000,2)), [SPACE_USED_MB] = convert(decimal(12,2), round(fileproperty(a.name,'SpaceUsed')/128.000,2)), [FREE_SPACE_MB] = convert(decimal(12,2), round((a.size-fileproperty(a.name,'SpaceUsed')) /128.000,2)) , NAME = left(a.NAME,15), FILENAME = left(a.FILENAME,30) from dbo.sysfiles a;
No comments:
Post a Comment