What is the best way to calculate the total yield of a stock portfolio? 

I started managing my own investments last year and it looks like I leaned towards dividend investing. I am wondering how I can calculate the total yield of a portfolio. 

Is there a simple (less accurate) formula for estimating? 

Anyone know any online tools to do this? 


Question: sleeping SPID blocking other transactions
Answer: Use the most_recent_sql_handle in sys.dm_exec_connections to see the last statement that was executed.

SELECT  t.text,
        QUOTENAME(OBJECT_SCHEMA_NAME(t.objectid, t.dbid)) + '.'
        + QUOTENAME(OBJECT_NAME(t.objectid, t.dbid)) proc_name,
        c.connect_time,
        s.last_request_start_time,
        s.last_request_end_time,
        s.status
FROM    sys.dm_exec_connections c
JOIN    sys.dm_exec_sessions s
        ON c.session_id = s.session_id
CROSS APPLY sys.dm_exec_sql_text(c.most_recent_sql_handle) t
WHERE   c.session_id = 72;--your blocking spid


Also check if there is an open transactions for that spid 

SELECT  st.transaction_id,
        at.name,
        at.transaction_begin_time,
        at.transaction_state,
        at.transaction_status
FROM    sys.dm_tran_session_transactions st
JOIN    sys.dm_tran_active_transactions at
        ON st.transaction_id = at.transaction_id
WHERE   st.session_id = 72;--your blocking spid