How to join all these tables

  • Hi,

    Hello how can we see the result of this query in single table . I am new with this and i dont know how to use join and all syntax.

    SELECT request_session_id,resource_type,

    request_status, request_type,request_reference_count,

    resource_database_id FROM sys.dm_tran_locks

    go

    select getdate () as Date,@@servername as servername, name ,size*8/1024 as size_MB

    from sys.master_files;

    go

    SELECT request_session_id,resource_type,

    request_status, request_type,request_reference_count,

    resource_database_id FROM sys.dm_tran_locks

    select cpu ,memusage,hostname from sysprocesses

    CREATE PROCEDURE dbo.usp_ShowAvailableSpace

    AS

    SELECT name AS NameOfFile,

    size/128.0 -CAST(FILEPROPERTY(name, 'SpaceUsed' )AS int)/128.0 AS AvailableSpaceInMB

    FROM dbo.SYSFILES

    GO

    EXEC usp_ShowAvailableSpace

    select * from sys.sysprocesses

    SELECT (a.cntr_value * 1.0 / b.cntr_value) * 100.0 [BufferCacheHitRatio]

    FROM (SELECT *, 1 x FROM sys.dm_os_performance_counters

    WHERE counter_name = 'Buffer cache hit ratio')

    a

    ,

    (SELECT *, 1 x FROM sys.dm_os_performance_counters

    WHERE counter_name = 'Buffer cache hit ratio base')

    b

    select * from sys.dm_exec_sessions

    select creation_time ,last_execution_time,execution_count ,

    total_physical_reads,last_physical_reads,min_physical_reads,

    max_physical_reads,total_logical_writes,

    last_logical_writes,min_logical_writes,max_logical_writes,

    last_elapsed_time,min_elapsed_time,max_elapsed_time

    from sys.dm_exec_query_stats

    Thaxx

  • What exactly would you like to see in the joined result set?

    You need a way to correlate the result sets returned by all the queries.

    Please, provide an example of the result you want, or explain the business requirement in more detail.

    ML

    ---
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply