NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - debzidoodle

Pages: 1 ... 5 6 [7]
91
Web Server - Ask For Help / Re: SQL Sleeping Connections Part 2
« on: February 03, 2014, 07:51:32 PM »
What version of SQL are you running?  I think for the dynamic management views (the ones that start with dm_) you have to be running at least 2008.  But the code below is what you need. 

My performance tab has been 0's since I upgraded to 7.32, it worked it 7.25.  But the logging in the embeds in the MultiHost demo app was more helpful to me than the performance tab.


Code: [Select]

CREATE View [dbo].[dv_ActiveTransactions]
as


SELECT
    [s_tst].[session_id],
    [s_es].[login_name] AS [Login Name],
    DB_NAME (s_tdt.database_id) AS [Database],
    dtat.transaction_begin_time AS [Begin Time],
    [s_tdt].[database_transaction_log_bytes_used] AS [Log Bytes],
    [s_tdt].[database_transaction_log_bytes_reserved] AS [Log Rsvd],
    [s_est].text AS [Last T-SQL Text],
    [s_eqp].[query_plan] AS [Last Plan],
    s_er.blocking_session_id
FROM
    sys.dm_tran_database_transactions [s_tdt]
JOIN
    sys.dm_tran_session_transactions [s_tst]
ON
    [s_tst].[transaction_id] = [s_tdt].[transaction_id]
Join sys.dm_tran_active_transactions DTAT
on s_tdt.transaction_id = dtat.transaction_id
JOIN
    sys.[dm_exec_sessions] [s_es]
ON
    [s_es].[session_id] = [s_tst].[session_id]
JOIN
    sys.dm_exec_connections [s_ec]
ON
    [s_ec].[session_id] = [s_tst].[session_id]
LEFT OUTER JOIN
    sys.dm_exec_requests [s_er]
ON
    [s_er].[session_id] = [s_tst].[session_id]
CROSS APPLY
    sys.dm_exec_sql_text ([s_ec].[most_recent_sql_handle]) AS [s_est]
OUTER APPLY
    sys.dm_exec_query_plan ([s_er].[plan_handle]) AS [s_eqp]
Where DATEDIFF(mi,dtat.transaction_begin_time,GETDATE())>=2



GO





Code: [Select]
Create View [dbo].[dv_CursorSessions]
as
select  login_time,status,last_request_start_time,last_request_end_time,
ses.transaction_isolation_level, ses.lock_timeout,row_count, c.*, t.text
from sys.dm_exec_sessions ses
cross apply sys.dm_exec_cursors(ses.session_id) c
CROSS APPLY sys.dm_exec_sql_text (c.sql_handle) t
where ses.is_user_process=1  and ses.session_id <> @@SPID

GO

92
Web Server - Ask For Help / Re: SQL Sleeping Connections
« on: February 03, 2014, 04:08:11 PM »
Make sure you are not just checking for sleeping connections.  Look for Active Transactions.  Look at the code I (debraballenger) posted earlier.  Adding this as a view will let you easily see what code was executed to create that connection in most cases... sometimes it just tells you the cursor.  In the cases that it shows the cursor you are generally safe to kill the transaction without it killing your app. It is actually important for you to understand if you have sleeping connections or active transactions.  If they are active transactions killing the connection causes a roll back and you loose the data changes associated with that transaction.  So make sure you try to trace down any active transactions by looking at the statements that generated them.

I ended up writing a separate app that I can view stats of my main website, namely the historical response time, and memory utilized so I can spot spikes. And most importantly the active transactions using the view.  I filter the active transactions to show if the transaction has been open for more than 2 minutes.  The other things I have done is to turn on the logging that is found in the Multi Host app, and write a log of when my app restarts.  With the above history I can see what all was happening on the server at the time of the freeze.  One scenario that this helped me track down was in the log from the multi host app I could see that a request was sent to a particular field on a form, the server never sent back a response to the browser and the app hung.  So I knew exactly which field and form was causing my non responsive app and fixed it.  You can do the same thing with the active transactions based on the transaction start time, you will know what was happening on the server to create that transaction.
So in summary, create an admin site for yourself... the history it creates will save you a lot of frustration of tracking down impossible bugs.

93
Web Server - Ask For Help / Re: Disable Save after click?
« on: February 03, 2014, 05:13:19 AM »
No not a typo, makes it so the event only fires once, even if it is clicked again.

http://api.jquery.com/one/

94
Web Server - Ask For Help / Re: Disable Save after click?
« on: January 31, 2014, 10:59:51 AM »
I have the same issue. Try adding this code to your xhtml tab of the form, and set the location to "Before <form>"

Code: [Select]
<script>$("button[name=save_btn]").one("click", function() {
   $(this).attr("disabled","disabled");
});
</script>

Hope that helps,
Debra

95
Is it indicating 0.5 of a second?

96
Hi All,

Does anyone know what the buckets in the performance breakdown section on the web server performance tab mean?
e.g < 0.5 , <1, <2, <5, >5

Thanks!
Debra

97
Web Server - Ask For Help / Re: more Google maps questions
« on: January 23, 2014, 01:00:57 PM »
I did something similar in my app, and I created a netWebPage procedure that outputs xml of the map items and the URL(s) that I want... links to forms for the specific record usually.  Then used those urls for buttons or whatever on my map pins.  Consuming the xml data via javascript of course.

98
Web Server - Ask For Help / Menu CSS Options - LivIcons
« on: January 23, 2014, 06:17:26 AM »
Hi All,

I am wondering how I could use these vector icons on my Menu items.  I am fine with using the javascript implementation or the HTML implementation.  But I do not see how I can do either at the moment as the HTML implementation requires data options after the class, and the javascript requires a div or class identifier.  Any suggestions?

Quote
1)Copy two or three scripts to your server.
2)In your html or php reference the location to these scripts.
3)And use LivIcons with just one string of code...
Code: [Select]
<i class="livicon" data-...></i>
  or
<span class="livicon" data-...></span>
  or
<div class="livicon" data-...></div>
  or
<li class="livicon" data-...></li>
Additional way is to work with LivIcons 'on the fly' with help of three Javascript methods
Code: [Select]
$('my_cool_icon').addLivicon(...options...);
  or
$('my_cool_icon').removeLivicon(...option...);
  or
$('my_cool_icon').updateLivicon(...options...);
  or even
$('.my_cool_icons_class').addLivicon(...options...);
http://codecanyon.net/item/livicons-303-truly-animated-vector-icons/full_screen_preview/4618985

Pages: 1 ... 5 6 [7]