<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Login Procedure Deadlock in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837701#M4868544</link>
    <description>&lt;P&gt;Without knowing more details: Could the &lt;EM&gt;DBA.ReplicationIdentifier()&lt;/EM&gt; stored function lead to any locks in conjunction with SQL Remote? (I.e. when omitting the COMMIT call, using sa_conn_info() and sa_locks() should help to identify locking issues.)&lt;/P&gt;
&lt;P&gt;FWIW, another way to log connections is by use of the &lt;STRONG&gt;&lt;A href="http://dcx.sybase.com/index.html#1201/en/dbadmin/events-events.html"&gt;system events&lt;/A&gt; like Connect, ConnectFailed and Disconnect&lt;/STRONG&gt; - by definition, they run on their own connection and may be more appropriate to log other connections...&lt;/P&gt;</description>
    <pubDate>Sun, 30 Sep 2012 11:17:42 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2012-09-30T11:17:42Z</dc:date>
    <item>
      <title>Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaq-p/13837698</link>
      <description>&lt;P&gt;SQLA 12.0.1&lt;/P&gt;
&lt;P&gt;I was putting together a procedure to audit login events, the basic components are provided below.  During testing, I found that the when dbRemote runs the database would deadlock, consistently.  The fix was to add a commit statement on the line before CALL sp_login_environment in the procedure ECO.UsersLogin().&lt;/P&gt;
&lt;P&gt;My question is..... Why?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;CREATE&lt;/SPAN&gt; &lt;SPAN class="n"&gt;TABLE&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ECO&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;UsersLogins&lt;/SPAN&gt; &lt;SPAN class="p"&gt;(&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;LoginId&lt;/SPAN&gt;         &lt;SPAN class="n"&gt;CHAR&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="mi"&gt;128&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="n"&gt;NOT&lt;/SPAN&gt; &lt;SPAN class="n"&gt;NULL&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;LoginTimestamp&lt;/SPAN&gt;  &lt;SPAN class="n"&gt;TIMESTAMP&lt;/SPAN&gt; &lt;SPAN class="n"&gt;NOT&lt;/SPAN&gt; &lt;SPAN class="n"&gt;NULL&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;LoginLocation&lt;/SPAN&gt;   &lt;SPAN class="n"&gt;INTEGER&lt;/SPAN&gt;       &lt;SPAN class="n"&gt;NULL&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;PRIMARY&lt;/SPAN&gt; &lt;SPAN class="n"&gt;KEY&lt;/SPAN&gt; &lt;SPAN class="n"&gt;CLUSTERED&lt;/SPAN&gt; &lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;LoginId&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;LoginTimestamp&lt;/SPAN&gt; &lt;SPAN class="p"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="p"&gt;);&lt;/SPAN&gt;

&lt;SPAN class="n"&gt;CREATE&lt;/SPAN&gt; &lt;SPAN class="n"&gt;PROCEDURE&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ECO&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;UsersLogin&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;/SPAN&gt;
&lt;SPAN class="k"&gt;BEGIN&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;DECLARE&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginId&lt;/SPAN&gt;        &lt;SPAN class="n"&gt;CHAR&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="mi"&gt;128&lt;/SPAN&gt;&lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;DECLARE&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginTimestamp&lt;/SPAN&gt; &lt;SPAN class="n"&gt;TIMESTAMP&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;DECLARE&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginLocation&lt;/SPAN&gt;  &lt;SPAN class="n"&gt;INTEGER&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;

  &lt;SPAN class="n"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginId&lt;/SPAN&gt;        &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;CONNECTION_PROPERTY&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="s"&gt;'Userid'&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginTimestamp&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;CURRENT&lt;/SPAN&gt; &lt;SPAN class="n"&gt;UTC&lt;/SPAN&gt; &lt;SPAN class="n"&gt;TIMESTAMP&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginLocation&lt;/SPAN&gt;  &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;DBA&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;ReplicationIdentifier&lt;/SPAN&gt;&lt;SPAN class="p"&gt;();&lt;/SPAN&gt;  &lt;SPAN class="o"&gt;--&lt;/SPAN&gt; &lt;SPAN class="n"&gt;this&lt;/SPAN&gt; &lt;SPAN class="n"&gt;provides&lt;/SPAN&gt; &lt;SPAN class="n"&gt;unique&lt;/SPAN&gt; &lt;SPAN class="n"&gt;database&lt;/SPAN&gt; &lt;SPAN class="n"&gt;identifier&lt;/SPAN&gt;

  &lt;SPAN class="n"&gt;INSERT&lt;/SPAN&gt; &lt;SPAN class="n"&gt;INTO&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ECO&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;UsersLogins&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="n"&gt;LoginId&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;LoginTimestamp&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;LoginLocation&lt;/SPAN&gt; &lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ON&lt;/SPAN&gt; &lt;SPAN class="n"&gt;EXISTING&lt;/SPAN&gt; &lt;SPAN class="n"&gt;UPDATE&lt;/SPAN&gt; &lt;SPAN class="n"&gt;VALUES&lt;/SPAN&gt; &lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginId&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginTimestamp&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginLocation&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;

  &lt;SPAN class="n"&gt;CALL&lt;/SPAN&gt; &lt;SPAN class="n"&gt;sp_login_environment&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="k"&gt;END&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 Sep 2012 15:50:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaq-p/13837698</guid>
      <dc:creator>JimDiaz</dc:creator>
      <dc:date>2012-09-28T15:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837701#M4868544</link>
      <description>&lt;P&gt;Without knowing more details: Could the &lt;EM&gt;DBA.ReplicationIdentifier()&lt;/EM&gt; stored function lead to any locks in conjunction with SQL Remote? (I.e. when omitting the COMMIT call, using sa_conn_info() and sa_locks() should help to identify locking issues.)&lt;/P&gt;
&lt;P&gt;FWIW, another way to log connections is by use of the &lt;STRONG&gt;&lt;A href="http://dcx.sybase.com/index.html#1201/en/dbadmin/events-events.html"&gt;system events&lt;/A&gt; like Connect, ConnectFailed and Disconnect&lt;/STRONG&gt; - by definition, they run on their own connection and may be more appropriate to log other connections...&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2012 11:17:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837701#M4868544</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-09-30T11:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837699#M4868542</link>
      <description>&lt;P&gt;SQL Anywhere 12 contains deadlock detection and reporting functionality. See the LOG_DEADLOCKS option. Also take a look at the deadlock detection and correction tutorial &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbusage/ug-appprofiling-secta-5445778.html"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;What activity is performed by this connection after the login procedure completes? What isolation level are you using?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2012 14:08:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837699#M4868542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-30T14:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837702#M4868545</link>
      <description>&lt;P&gt;If memory serves, SQL Remote establishes more than one connection, so they might be inserting and updating the same row in UsersLogins. IMO the primary key should be DEFAULT AUTOINCREMENT if you really want one one row per connection.&lt;/P&gt;
&lt;P&gt;Are you positive it is a deadlock condition, or is it the simpler case of one connection being blocked by another?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2012 17:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837702#M4868545</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2012-09-30T17:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837703#M4868546</link>
      <description>&lt;P&gt;Your memory is fine: SQL Remote &lt;EM&gt;does&lt;/EM&gt; use more than one connection (separate ones for its worker threads, methinks), though I can't tell whether they all connect at exactly the same timestamp value - and that would decide whether they are logged as one or more logins here, I suspect.&lt;/P&gt;
&lt;P&gt;Besides that, a timestamp as part of a primary key &lt;EM&gt;might&lt;/EM&gt; lead to problems in general, as the resolution is dependent on database options like default_timestamp_increment... just a warning:)&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 05:22:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837703#M4868546</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-10-01T05:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837700#M4868543</link>
      <description>&lt;P&gt;A bit more information this only occurs when -w &amp;gt; 1 or more precisely with -w 5.  Below is what I am seeing.  dbremote hangs when this occurs.  No deadlocks are reported using SELECT * FROM sa_report_deadlocks () after setting LOG_DEADLOCKS.&lt;BR /&gt;
&lt;/P&gt;
&lt;P&gt;My dbremote config is as follows
-r 
-b 
-o "E:Application Log FilesSybase ASA 12.0XXXXX.log" 
-os 1M 
-c "eng=Emprise-DB7-ASA12; dbn=XXXXX; uid=dbRemote; pwd=XXXXX" 
-dl
-k
-w 5
-m 50M
"E:Sybase ASA 12.0Database Mirror Log FilesXXXXX"&lt;/P&gt;
&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Re Login Procedure Deadlock"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/189657iC2AB918255FDCB72/image-size/large?v=v2&amp;amp;px=999" role="button" title="Re Login Procedure Deadlock" alt="Re Login Procedure Deadlock" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 10:14:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837700#M4868543</guid>
      <dc:creator>JimDiaz</dc:creator>
      <dc:date>2012-10-01T10:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837704#M4868547</link>
      <description>&lt;P&gt;Breck/Volker
DBA.ReplicationIdentifier() performs a simple select.   Thanks much for the system events tip there is lots to learn.  I assumed this was a deadlock but not identified as such see my post below.  I'm going to look into the timestamp as well as the on existing update&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 08:19:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837704#M4868547</guid>
      <dc:creator>JimDiaz</dc:creator>
      <dc:date>2012-10-01T08:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837705#M4868548</link>
      <description>&lt;P&gt;I fairly sure this is a issue of poor table design.  I changed the procedure to remove on existing update then changed the default for the timestamp column to default Current UTC Timestamp.  I queried the table when dbremote hangs and got the following.  The last two are identical values&lt;/P&gt;
&lt;P&gt;LoginId,LoginTimestamp,LoginLocation
'dbRemote','2012-10-01 12:30:37.010',512
'dbRemote','2012-10-01 12:30:37.026',512
'dbRemote','2012-10-01 12:30:37.057',512
'dbRemote','2012-10-01 12:30:37.073',512
'dbRemote','2012-10-01 12:30:37.073',512&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 08:36:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837705#M4868548</guid>
      <dc:creator>JimDiaz</dc:creator>
      <dc:date>2012-10-01T08:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837706#M4868549</link>
      <description>&lt;P&gt;Interesting I changed the procedure to&lt;/P&gt;
&lt;P&gt;INSERT INTO ECO.UsersLogins( LoginId, LoginLocation ) VALUES ( @LoginId, @LoginLocation );&lt;/P&gt;
&lt;P&gt;after setting the table default same issue.  Maybe this is a bug&lt;/P&gt;
&lt;P&gt;LoginId,LoginTimestamp,LoginLocation
'dbRemote','2012-10-01 12:38:19.032',512
'dbRemote','2012-10-01 12:38:19.047',512
'dbRemote','2012-10-01 12:38:19.079',512
'dbRemote','2012-10-01 12:38:19.094',512
'dbRemote','2012-10-01 12:38:19.094',512&lt;/P&gt;
&lt;P&gt;ALTER PROCEDURE "ECO"."UsersLogin"()
  BEGIN
    DECLARE @LoginId        CHAR(128);
    DECLARE @LoginTimestamp TIMESTAMP;
    DECLARE @LoginLocation  INTEGER;&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginId&lt;/SPAN&gt;        &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;CONNECTION_PROPERTY&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt; &lt;SPAN class="s"&gt;'Userid'&lt;/SPAN&gt; &lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginTimestamp&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;CURRENT&lt;/SPAN&gt; &lt;SPAN class="n"&gt;UTC&lt;/SPAN&gt; &lt;SPAN class="n"&gt;TIMESTAMP&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@LoginLocation&lt;/SPAN&gt;  &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;DBA&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;ReplicationIdentifier&lt;/SPAN&gt;&lt;SPAN class="p"&gt;();&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;--    INSERT INTO ECO.UsersLogins( LoginId, LoginTimestamp, LoginLocation ) ON EXISTING UPDATE VALUES ( @LoginId, @LoginTimestamp, @LoginLocation );
    INSERT INTO ECO.UsersLogins( LoginId, LoginLocation ) VALUES ( @LoginId, @LoginLocation );
--    COMMIT;&lt;/P&gt;
&lt;P&gt;--    CALL dbo.sp_login_environment;
    CALL sp_login_environment;
  END&lt;/P&gt;
&lt;P&gt;CREATE TABLE "ECO"."UsersLogins" (
    "LoginId" CHAR(128) NOT NULL,
    "LoginTimestamp" TIMESTAMP NOT NULL DEFAULT CURRENT UTC TIMESTAMP,
    "LoginLocation" INTEGER NULL,
    PRIMARY KEY ( "LoginId" ASC, "LoginTimestamp" ASC )
) IN "system";&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 08:41:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837706#M4868549</guid>
      <dc:creator>JimDiaz</dc:creator>
      <dc:date>2012-10-01T08:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837707#M4868550</link>
      <description>&lt;P&gt;Well, obviously the 5 worker threads (dbremote -w 5) start almost at the same time to do their work. This is surely expected behaviour.&lt;/P&gt;
&lt;P&gt;The question that seems more interesting to me is: What exactly are you trying to log? Do you want to log how dbremote internally uses several connections, or are you interested in logging user activity and/or replication activity in general?&lt;/P&gt;
&lt;P&gt;If the latter is true, I guess there will be better approaches than the one you're currently dealing with. One (besides system events) would be &lt;STRONG&gt;to use &lt;A href="http://dcx.sybase.com/index.html#1201/en/sqlremote/client-event-hook-ml-ref.html"&gt;SQL Remote hook procedures&lt;/A&gt; like sp_hook_dbremote_begin&lt;/STRONG&gt; to do whatever you want each time SQL Remote is started. That may be helpful to log when SQL Remote is running, how many messages it is receiving/sending, how long it took and so on...&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 08:56:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837707#M4868550</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-10-01T08:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837708#M4868551</link>
      <description>&lt;P&gt;My intent was to log user activity, dbremote was a side effect.  I will most likely change this to use the event however what interests me now is the behavior.  Notice above the query returned two rows with the same primary key value. &lt;/P&gt;
&lt;P&gt;Subsequently I changed the table to default timestamp rather than default current utc timestamp and eco.userlogins records only one connection.&lt;BR /&gt;
&lt;/P&gt;
&lt;P&gt;As always thanks to everyone for the help.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 10:40:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837708#M4868551</guid>
      <dc:creator>JimDiaz</dc:creator>
      <dc:date>2012-10-01T10:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837709#M4868552</link>
      <description>&lt;P&gt;"Notice above the query returned two rows with the same primary key value." - impossible, did not happen, can never happen, not ever, not in this life or the next &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What you may be seeing is a lack of precision in the displayed value, perhaps governed by imprecise default value stored in the timestamp_format option... change that to YYYY-MM-DD HH:NN:SS.SSSSSS, or use SELECT DATEFORMAT ( ... ) with similar formatting.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 10:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837709#M4868552</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2012-10-01T10:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837710#M4868553</link>
      <description>&lt;P&gt;"What exactly are you trying to log?" - that is the important question.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 10:55:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837710#M4868553</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2012-10-01T10:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Login Procedure Deadlock</title>
      <link>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837711#M4868554</link>
      <description>&lt;P&gt;Couldn't agree more with Breck - though I'm sure the next life won't hurt us with valid or invalid PKs, thank God:)&lt;/P&gt;
&lt;P&gt;As to &lt;STRONG&gt;DEFAULT TIMESTAMP&lt;/STRONG&gt;: Note that this special value (at least when used as column default) &lt;STRONG&gt;is specified to deliver unique values&lt;/STRONG&gt;, even if otherwise two rows would be inserted/modified at exactly  the same fraction of time, so this is expected behaviour. Confine the quote from the docs on the TIMESTAMP special value:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Columns declared with DEFAULT TIMESTAMP contain unique values so that applications can detect near-simultaneous updates to the same row. If the current timestamp value is the same as the last value, it is incremented by the value of the default_timestamp_increment option. &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The same is true for DEFAULT UTC TIMESTAMP, however, it is not true for the CURRENT variants:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Unlike DEFAULT TIMESTAMP, columns declared with DEFAULT CURRENT TIMESTAMP do not necessarily contain unique values. If uniqueness is required, consider using DEFAULT TIMESTAMP instead.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 01 Oct 2012 11:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/login-procedure-deadlock/qaa-p/13837711#M4868554</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-10-01T11:15:09Z</dc:date>
    </item>
  </channel>
</rss>

