Quantcast
Channel: Forum SQL Server Database Engine
Viewing all 15889 articles
Browse latest View live

A network-related or instance-specific error occurred while establishing a connection to SQL Server.

$
0
0

Hi to all

I have a SQL server 2012 and I got this error when I tried  to open Ms SQL configuration manager:

Error: An error occurred: "Microsoft.Rtc.Common.Data.SqlConnectionException" 
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. 
The server was not found or was not accessible.
 Verify that the instance name is correct and that SQL Server is configured to allow remote connections. 
(provider: TCP Provider, error: 0 - The remote computer refused the network connection.)"

I have read several pages and applied different troubleshoot with not success



Warm regards MeVs


Query to calculate SQL Server Uptime Percentage

$
0
0

Hello

I am trying to find out if there is a way to calculate the percentage of uptime for a given SQL Instance. I understand that there are queries to find out when SQL Server was started and for how long, but I am looking for a percentage calculation for how long the SQL Server was up in a given time window. I see one post here with a query supposed to do that, but the query fails with syntax errors.

https://forum.red-gate.com/discussion/78955/query-for-sql-uptime

Please assist.

is there a way to automatically roll identity columns?

$
0
0

Hi we run 2017 std. sometimes I want a pk to be an identity column and with frequent truncates would prefer automatically rolling the column (say back to 1) when the max value is hit. Rather than setting the col's characteristic to bigint. Is there such a feature available in sql server?

I wouldn't want to give the service acct permission to reseed values.

Non-yielding scheduler errors and connection timeouts daily

$
0
0

SQL 2008 Standard edition, roughly 250 databases on the server (though this problem has occurred with all but one offline)

A client's SQL server is logging Non-yielding Scheduler errors and generating a minidump around the same times daily.  These are logged repeatedly and the kernel time increases slightly each time.  There is no noticable spike in CPU/memory load, however, and the only hardware bottleneck we were seeing at the time was disk IO on the log drive (SAN).   Those drives were upgraded and the iops, % disk time and disk queue length have dropped to reasonable levels, but the non-yielding errors persist.  These errors also correspond with intermittent connection issues, which log errors like "The client was unable to reuse a session with SPID 153, which had been reset for connection pooling",  that usually persist for about an hour and clear up on their own.  

The things I've read on the error point to log IO issues but I cant confirm thats the case based on any stats in perfmon or on the SAN itself.  We have not been able to consistently replicate the problem and it doesn't always happen each day, but the times are consistent between occurrances.  I've ruled out any SQL jobs running at these times, and in the example below the only thing happening before hand was a CheckDB job.  I have little visibility into what the application is doing when this occurs and I'm not entirely sure what to even look for for a cause from that end. 

Examples from the log are included below.  Has anyone run into this before that can offer any suggestions for a possible cause?

 

2011-01-11 00:00:04.25 spid21s     This instance of SQL Server has been using a process ID of 2068 since 1/10/2011 10:17:43 PM (local) 1/11/2011 3:17:43 AM (UTC). This is an informational message only; no user action is required.

2011-01-11 00:00:20.18 spid181     DBCC CHECKDB (dbname1) WITH physical_only executed by DOMAIN\UserA found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 33 seconds.  Internal database snapshot has split point LSN = 0004f06e:0000007e:0001 and first LSN = 0004f06e:0000007d:0001.

2011-01-11 00:00:39.57 spid181     DBCC CHECKDB (dbname2) WITH physical_only executed by DOMAIN\UserA found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 12 seconds.  Internal database snapshot has split point LSN = 000008da:00000022:0001 and first LSN = 000008da:00000021:0001.

2011-01-11 00:00:51.49 spid181     6 transactions rolled forward in database 'dbname' (10). This is an informational message only. No user action is required.

2011-01-11 00:00:51.56 spid181     0 transactions rolled back in database 'dbname' (10). This is an informational message only. No user action is required.

2011-01-11 00:01:12.21 Server      Using 'dbghelp.dll' version '4.0.5'

2011-01-11 00:01:12.44 Server      ***Unable to get thread context for spid 0

2011-01-11 00:01:12.44 Server      * *******************************************************************************

2011-01-11 00:01:12.44 Server      *

2011-01-11 00:01:12.44 Server      * BEGIN STACK DUMP:

2011-01-11 00:01:12.44 Server      *   01/11/11 00:01:12 spid 2656

2011-01-11 00:01:12.44 Server      *

2011-01-11 00:01:12.44 Server      * Non-yielding Scheduler

2011-01-11 00:01:12.44 Server      *

2011-01-11 00:01:12.44 Server      * *******************************************************************************

2011-01-11 00:01:12.44 Server      Stack Signature for the dump is 0x00000221

2011-01-11 00:01:15.62 Server      External dump process return code 0x20000001.

External dump process returned no errors.

 

2011-01-11 00:01:15.62 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 78 ms, user 31 ms. Process Utilization 4%. System Idle 91%. Interval: 70109 ms.

2011-01-11 00:01:36.97 spid181     DBCC CHECKDB (dbname3) WITH physical_only executed by DOMAIN\UserA found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 49 seconds.  Internal database snapshot has split point LSN = 0007bf21:00000065:0006 and first LSN = 0007bf21:0000005c:0007.

2011-01-11 00:02:01.10 spid181     DBCC CHECKDB (dbname4) WITH physical_only executed by DOMAIN\UserA found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 16 seconds.  Internal database snapshot has split point LSN = 0000054c:00000028:0001 and first LSN = 0000054c:00000027:0001.

2011-01-11 00:02:15.67 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 93 ms, user 62 ms. Process Utilization 4%. System Idle 93%. Interval: 133625 ms.

2011-01-11 00:02:39.11 spid181     5 transactions rolled forward in database 'dbname6' (10). This is an informational message only. No user action is required.

2011-01-11 00:02:39.12 spid181     0 transactions rolled back in database 'dbname6' (10). This is an informational message only. No user action is required.

2011-01-11 00:03:15.71 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 109 ms, user 62 ms. Process Utilization 4%. System Idle 93%. Interval: 193656 ms.

2011-01-11 00:03:44.50 spid181     DBCC CHECKDB (dbname5) WITH physical_only executed by DOMAIN\UserA found 0 errors and repaired 0 errors. Elapsed time: 0 hours 1 minutes 17 seconds.  Internal database snapshot has split point LSN = 0004ac9c:00000188:000a and first LSN = 0004ac9c:00000182:0004.

2011-01-11 00:04:15.75 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 125 ms, user 78 ms. Process Utilization 4%. System Idle 94%. Interval: 253703 ms.

2011-01-11 00:05:15.79 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 171 ms, user 125 ms. Process Utilization 3%. System Idle 94%. Interval: 313750 ms.

2011-01-11 00:06:15.83 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 203 ms, user 140 ms. Process Utilization 3%. System Idle 95%. Interval: 373781 ms.

2011-01-11 00:06:50.12 spid582     Error: 18056, Severity: 20, State: 29.

2011-01-11 00:06:50.12 spid582     The client was unable to reuse a session with SPID 582, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

2011-01-11 00:07:15.87 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 250 ms, user 187 ms. Process Utilization 2%. System Idle 95%. Interval: 433828 ms.

2011-01-11 00:08:15.92 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 250 ms, user 234 ms. Process Utilization 2%. System Idle 96%. Interval: 493875 ms.

2011-01-11 00:09:15.96 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 375 ms, user 328 ms. Process Utilization 2%. System Idle 96%. Interval: 553906 ms.

2011-01-11 00:10:16.00 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 437 ms, user 406 ms. Process Utilization 2%. System Idle 96%. Interval: 613953 ms.

2011-01-11 00:11:16.04 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 515 ms, user 421 ms. Process Utilization 2%. System Idle 96%. Interval: 674000 ms.

2011-01-11 00:12:16.07 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 609 ms, user 437 ms. Process Utilization 2%. System Idle 96%. Interval: 734031 ms.

2011-01-11 00:13:16.12 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 625 ms, user 484 ms. Process Utilization 2%. System Idle 96%. Interval: 794078 ms.

2011-01-11 00:14:16.17 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 687 ms, user 500 ms. Process Utilization 2%. System Idle 96%. Interval: 854125 ms.

2011-01-11 00:15:16.20 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 718 ms, user 531 ms. Process Utilization 2%. System Idle 97%. Interval: 914156 ms.

2011-01-11 00:16:16.25 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 734 ms, user 562 ms. Process Utilization 1%. System Idle 97%. Interval: 974203 ms.

2011-01-11 00:17:16.29 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 734 ms, user 593 ms. Process Utilization 1%. System Idle 97%. Interval: 1034234 ms.

2011-01-11 00:18:16.32 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 765 ms, user 671 ms. Process Utilization 1%. System Idle 97%. Interval: 1094281 ms.

2011-01-11 00:19:16.37 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 796 ms, user 703 ms. Process Utilization 1%. System Idle 97%. Interval: 1154328 ms.

2011-01-11 00:20:16.40 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 890 ms, user 718 ms. Process Utilization 1%. System Idle 97%. Interval: 1214359 ms.

2011-01-11 00:21:16.46 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 953 ms, user 796 ms. Process Utilization 1%. System Idle 97%. Interval: 1274406 ms.

2011-01-11 00:22:16.50 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1093 ms, user 828 ms. Process Utilization 1%. System Idle 97%. Interval: 1334453 ms.

2011-01-11 00:23:16.54 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1203 ms, user 875 ms. Process Utilization 1%. System Idle 97%. Interval: 1394500 ms.

2011-01-11 00:24:16.58 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1265 ms, user 953 ms. Process Utilization 1%. System Idle 97%. Interval: 1454531 ms.

2011-01-11 00:25:16.62 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1421 ms, user 953 ms. Process Utilization 1%. System Idle 97%. Interval: 1514578 ms.

2011-01-11 00:26:16.67 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1609 ms, user 1046 ms. Process Utilization 2%. System Idle 97%. Interval: 1574625 ms.

2011-01-11 00:27:16.71 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1703 ms, user 1093 ms. Process Utilization 2%. System Idle 97%. Interval: 1634671 ms.

2011-01-11 00:28:16.75 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1750 ms, user 1140 ms. Process Utilization 2%. System Idle 97%. Interval: 1694703 ms.

2011-01-11 00:29:16.79 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1812 ms, user 1250 ms. Process Utilization 2%. System Idle 96%. Interval: 1754750 ms.

2011-01-11 00:30:16.83 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 1875 ms, user 1281 ms. Process Utilization 2%. System Idle 97%. Interval: 1814796 ms.

2011-01-11 00:31:16.88 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2000 ms, user 1359 ms. Process Utilization 2%. System Idle 96%. Interval: 1874843 ms.

2011-01-11 00:32:16.92 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2093 ms, user 1437 ms. Process Utilization 2%. System Idle 96%. Interval: 1934875 ms.

2011-01-11 00:33:16.97 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2171 ms, user 1484 ms. Process Utilization 2%. System Idle 96%. Interval: 1994921 ms.

2011-01-11 00:34:17.00 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2359 ms, user 1562 ms. Process Utilization 2%. System Idle 96%. Interval: 2054968 ms.

2011-01-11 00:35:17.05 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2531 ms, user 1671 ms. Process Utilization 2%. System Idle 96%. Interval: 2115000 ms.

2011-01-11 00:36:17.08 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2687 ms, user 1718 ms. Process Utilization 2%. System Idle 96%. Interval: 2175046 ms.

2011-01-11 00:37:17.13 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2734 ms, user 1812 ms. Process Utilization 2%. System Idle 96%. Interval: 2235093 ms.

2011-01-11 00:38:17.17 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2796 ms, user 1859 ms. Process Utilization 2%. System Idle 96%. Interval: 2295125 ms.

2011-01-11 00:39:17.21 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 2875 ms, user 1906 ms. Process Utilization 2%. System Idle 96%. Interval: 2355171 ms.

2011-01-11 00:40:17.26 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 3000 ms, user 1968 ms. Process Utilization 2%. System Idle 96%. Interval: 2415218 ms.

2011-01-11 00:41:17.31 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 3140 ms, user 2031 ms. Process Utilization 2%. System Idle 96%. Interval: 2475250 ms.

2011-01-11 00:42:17.35 Server      Process 0:0:0 (0xa68) Worker 0x00EDE0D8 appears to be non-yielding on Scheduler 2. Thread creation time: 12939189420203. Approx Thread CPU Used: kernel 3203 ms, user 2109 ms. Process Utilization 2%. System Idle 96%. Interval: 2535296 ms.

2011-01-11 00:42:38.20 spid153     Error: 18056, Severity: 20, State: 29.

2011-01-11 00:42:38.20 spid153     The client was unable to reuse a session with SPID 153, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

2011-01-11 00:42:38.20 spid163     Error: 18056, Severity: 20, State: 29.

2011-01-11 00:42:38.20 spid163     The client was unable to reuse a session with SPID 163, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

2011-01-11 00:42:38.20 spid268     Error: 18056, Severity: 20, State: 29.

2011-01-11 00:42:38.20 spid268     The client was unable to reuse a session with SPID 268, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

2011-01-11 00:42:38.23 spid134     Error: 18056, Severity: 20, State: 29.

2011-01-11 00:42:38.23 spid134     The client was unable to reuse a session with SPID 134, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

2011-01-11 00:42:38.23 spid160     Error: 18056, Severity: 20, State: 29.

2011-01-11 00:42:38.23 spid160     The client was unable to reuse a session with SPID 160, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

2011-01-11 00:42:38.23 spid166     Error: 18056, Severity: 20, State: 29.

etc...

SQLServer 2016 - PolyBase - Exporting Data

$
0
0

All,

In PolyBase, can t we append data into the External Table (csv file as the source) with rows from T-SQL?

The below example seems to indicate so:

https://docs.microsoft.com/en-us/sql/relational-databases/polybase/polybase-configure-azure-blob-storage?view=sql-server-ver15#exporting-data

If this is true, then for every source that we need to append to should we also create another EXTERNAL table? The INSERT seems to be work on the newly created table.

Thanks,

rgn

Event ID 4625 is logged on Windows Security logs for every 30 minute but nothing in SQL Server logs

$
0
0

I'm using SQL Server 2008 R2.  Event ID 4625 is logged on Windows Security logs for every 30 minute but nothing is logged on SQL Server logs.

This is from the General tab of Windows Security logs:

An account failed to log on.

Subject:
 Security ID:  SYSTEM
 Account Name:  TEST$
 Account Domain:  XXX
 Logon ID:  0x3e7

Logon Type:   3

Account For Which Logon Failed:
 Security ID:  NULL SID
 Account Name:  
 Account Domain:  

Failure Information:
 Failure Reason:  The specified user account has expired.
 Status:   0xc0000193
 Sub Status:  0xc0000193

Process Information:
 Caller Process ID: 0xab4
 Caller Process Name: C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe

Network Information:
 Workstation Name: TEST
 Source Network Address: -
 Source Port:  -

Detailed Authentication Information:
 Logon Process:  Authz  
 Authentication Package: Kerberos
 Transited Services: -
 Package Name (NTLM only): -
 Key Length:  0

This event is generated when a logon request fails. It is generated on the computer where access was attempted.

The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.

The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).

The Process Information fields indicate which account and process on the system requested the logon.

The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.

The authentication information fields provide detailed information about this specific logon request.
 - Transited services indicate which intermediate services have participated in this logon request.
 - Package name indicates which sub-protocol was used among the NTLM protocols.
 - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

This is from the Details tab of Windows Security logs:

-<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
-<System>
 <ProviderName="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" />
 <EventID>4625</EventID>
 <Version>0</Version>
 <Level>0</Level>
 <Task>12544</Task>
 <Opcode>0</Opcode>
 <Keywords>0x8010000000000000</Keywords>
 <TimeCreatedSystemTime="2013-12-23T17:21:00.916876600Z" />
 <EventRecordID>2131255</EventRecordID>
 <Correlation/>
 <ExecutionProcessID="576" ThreadID="644" />
 <Channel>Security</Channel>
 <Computer>TEST.xxx.xxx</Computer>
 <Security/>
 </System>
-<EventData>
 <Data Name="SubjectUserSid">S-1-5-18</Data>
 <Data Name="SubjectUserName">TEST$</Data>
 <Data Name="SubjectDomainName">XXX</Data>
 <Data Name="SubjectLogonId">0x3e7</Data>
 <Data Name="TargetUserSid">S-1-0-0</Data>
 <DataName="TargetUserName"
/>
 <DataName="TargetDomainName"
/>
 <Data Name="Status">0xc0000193</Data>
 <Data Name="FailureReason">%%2305</Data>
 <Data Name="SubStatus">0xc0000193</Data>
 <Data Name="LogonType">3</Data>
 <Data Name="LogonProcessName">Authz</Data>
 <Data Name="AuthenticationPackageName">Kerberos</Data>
 <Data Name="WorkstationName">TEST</Data>
 <Data Name="TransmittedServices">-</Data>
 <Data Name="LmPackageName">-</Data>
 <Data Name="KeyLength">0</Data>
 <Data Name="ProcessId">0xab4</Data>
 <Data Name="ProcessName">C:\Program Files\Microsoft SQL
Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
</Data>
 <Data Name="IpAddress">-</Data>
 <Data Name="IpPort">-</Data>
 </EventData>
 </Event>

Can this be related to the owner of some databases in that instance that has expired password?  However, I really doubt that since there is another sql instance which also has some databases owned by the same owner and there is nothing logged in Windows Security logs for that instance.

Transactional log backup script error

$
0
0

We are getting the error as below:

Message
Executed as user: domain\DBAdmin. sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029).  The step failed.

The transactional logs are not deleting since Sept 2019. What is the best process of deleting the transactional logs? Can I create full backup, change the database recovery mode to simple, delete all transactional logs and run the job again.

Where can I find prepared SQL statements (sp_prepare) in the system tables/views?

$
0
0

Environment: SQL Server 2014 on Windows Server 2012 R2.

Our application uses hibernate and the jTDS JDBC driver, so we are (by default) getting generated SQL statements coming through as sp_prepare and sp_execute.  Sometimes, I am able to find the prepared queries in the cache, but sometimes I'm not.  By cache, I mean sys.dm_exec_query_stats and sys._dm_exec_cached_plans.  What's strange is that even if they seem to be gone from the cache, the prepared statements execute successfully.  I'm wondering if there is some other location where I could consistently see/find the prepared statements, hopefully by their integer handle?

Thank you,

-Peter


SQLSever 2016 - PolyBase - Datetime data

$
0
0

All,

When I query an External Table which has a datetime column why is it giving me an error even though I was able to enter data into it successfully? This table is pointing to Azure Blob Storage.

Msg 7320, Level 16, State 110, Line 28
Cannot execute the query "Remote Query" against OLE DB provider "SQLNCLI11" for linked server "(null)". Query aborted-- the maximum reject threshold (0 rows) was reached while reading from an external source: 1 rows rejected out of total 1 rows processed.
(/claim/QID639_20200107_154411_0.txt)Column ordinal: 2, Expected data type: DATETIME, Offending value: 2010-01-06 00:00:00.000  (Column Conversion Error), Error: Conversion failed when converting the NVARCHAR value '2010-01-06 00:00:00.000' to data type DATETIME.

CREATE EXTERNAL TABLE dbo.wasbs_Claim
( 
    	ID int,
    	Claim VARCHAR(128),
        Claimdate datetime
) 
WITH 
( 
    LOCATION = '/claim/',  -- see below comment 
    DATA_SOURCE = csvsource, 
    FILE_FORMAT = csvformat
)
GO
insert into dbo.wasbs_Claim(ID,Claim,Claimdate) Values (1,'Automobile','01/06/2010') -- Will fail
GO
select * from dbo.wasbs_Claim

The below T-SQL query goes through though:

DECLARE @stringdate nvarchar(100)
SET @stringdate = '2020-01-06 00:00:00.000'
DECLARE @datetime datetime
SET @datetime = @stringdate
PRINT @datetime
PRINT @stringdate

Always On availability groups VS Kubernetes Service

$
0
0
there are two different approach to create HA SQL cluster

1. Windows cluster, then sql always on availability groups,

2. Use kubernetes, such as AKS, then build ,


Which options is better or what's pro and con?


How about SQL Server 2019 big data clusters?

High Disc Latency Issue

$
0
0

Hi,

We are experiencing occasional high disc latency and high CPU utilization in the SQL Server and want to know how to check the bottlenecks.  we have a graph which describes the high disc latency and i want to know how to identify the bottlenecks from the graph.

Thanks,


dbmail alert code

$
0
0

Hi,

I am new to the SQL coding. Need help in configuring the mirroring alert when the db will go to suspect mode.

I configured dbmailprofile and succesfully i am able to send the mail through sql server .

now for alert i given the below step in job.

exec msdb.dbo.sp_send_dbmail

@profile_name='newprofile1',

@recipients='abc@xyz.com',

@query='select name,state_desc from sys.databases where state in (0,1,2,3,4,5,6)'

@subject='db status alert',

@body='status of the db'

I required the code in such a way that alert should generate when ever the database will go to suspect mode.

As of now i configured in such a way that its throwing mail with current db status.

But need mail only when db will go to suspect mode.

i configured the job schedule for every 15 min. instead of giving mail for every 15 min , i should get mail only database will go to suspect mode.

Please help me to modify the code. Its little urgent.

Thanks,

Jo


pols

The failure occurred when executing the command 'sp_cdc_create_change_table'. The error returned was 15562

$
0
0

I'm trying to enable a table for CDC and get the below error. Enabling CDC did work previously and we have added multiple tables before.
Msg 22832, Level 16, State 1, Procedure sys.sp_cdc_enable_table_internal, Line 666 [Batch Start Line 28]
Could not update the metadata that indicates table [sdm].[FLXRL_Policy] is enabled for Change Data Capture. The failure occurred when executing the command 'sp_cdc_create_change_table'. The error returned was 15562: 'The module being executed is not trusted. Either the owner of the database of the module needs to be granted authenticate permission, or the module needs to be digitally signed.'. Use the action and error to determine the cause of the failure and resubmit the request.
What I can could see was that EXEC sys.sp_cdc_enable_table is executing sys.sp_cdc_enable_table_internal and if I execute the that sp it returns
Msg 2812, Level 16, State 62, Line 26
Could not find stored procedure 'sys.sp_cdc_enable_table_internal'.
Any suggestions or guidance is appreciated

checkdb killed/rollback - stuck for 3 days

$
0
0

I have a scenarios whereby a checkdb on an 800GB database was cancelled and 3 days later, there is sessions stuck in "killed/rollback" state.

I ran 

select blocking_session_id, wait_time,wait_type, last_wait_type, open_transaction_count, percent_complete,estimated_completion_time, cpu_time,total_elapsed_time, reads, writes, granted_query_memory, parallel_worker_count
FROM SYS.DM_EXEC_REQUESTS
where session_id in (66)

and i see the wait type is EXECSYNC,  percent complete 10,05694 and doesnt change, estimated completion time is rising, cpu_time is not changing, reads and writes are not changing either.   

I dont want to restart the Instance as i am afraid the database will go into recovery and it will take the same time to recover and users will not be able to access, for now, at least users can access but it is extremely slow. 

Will it eventually complete? or its hung ?

Any advice ? 


ilikefondue

check the time of the restored database for ms sql server 2014

$
0
0

Dear,

We want to restore a ms sql database from full database backup and differential backup.

Please help to tell me how to confirm the time of restored database. Thanks!


SQL Alerts

$
0
0

I am having a requirement to send mail alerts when there is a blocking. And I am planning to use SQL alerts.

We have a counter called 'Processes Blocked'. Can it be used to capture blocking details? If so, what all information will it gather.

Also, I see an option alert if counter rises\equals to 'value'. What is the value here?

Is it the time a blocking remains or the count of blockings?

Please suggest if there are any better options.


SQL 2016 ENT Edition Database -Lock pages in memory option on VM SQL Server

$
0
0

We are almost running all our production systems in VM and almost all servers are 64 bit , currently we have an Windows Server 2012 R2 VM Server that runs with SQL2016 SP2 ENT Core based edition.

OLTP system with 32 virtual processor and 4 sockets we have 128GB RAM, now we are with vendor isolating performance issues and vendor is keen to know why we have set our SQL service account with lock pages in memory which is not an VM ware recommendation .

Since we have max server memory defined on the instance ( we use as an standard to allocate 75% to DB and 25% to OS) and on all 64 bit boxes regardless of Physical or VM we have this lock pages in memory set.

I am stressed to know if really on VM SQL Servers Lock pages in memory option should not have been set or since we have already set max server memory to 75% of servers memory we are good on this memory part or is there really an trade off so my application vendor compels to go with VM recommendation not to set LPIM 

Thanks and Reagrds

Eben

SQLServer 2019 Polybase - External access operation failed because the location URI is invalid. Revise the URI and try again.

$
0
0

All,

I tried to create an External Data Source against another SQLServer (2016) from a SQLServer 2019 server but I get the below error:

<<External access operation failed because the location URI is invalid. Revise the URI and try again.>>

NYCSQL10.nydomain.net is a SQLServer 2016 server

Configure PolyBase to access external data in SQL Server

What am I missing?

Thanks,

rgn

   CREATE EXTERNAL DATA SOURCE PolyBaseSQL
    WITH ( 
    LOCATION = 'sqlserver://NYCSQL10.nydomain.net\ACT:1488',
    -- PUSHDOWN = ON | OFF,
      CREDENTIAL = SQLServerCredentials
    );
    GO


GetDate() in SQL Server on Linux and UTC

$
0
0

Hi,

Is my understanding correct that in SQL Server on Linux we will always get UTC time when running SELECT GetDate()?

Can't find any documentation related to this at all.

Thanks

Total Server Memory VS Target Server Memory made me crazy.

$
0
0

I often see somebody use the Total Server Memory compare to Target Server Memory to decide whether the SQL Server under memory pressure. a book say:”Total and Target should be almost the same on a server with no memory pressure that has been running

 for a while. If Total is significantly less than Target, then it’s likely that SQL Server cannot grow the buffer pool due to memory pressure”;

that is to say: if Total Server Memory <Target Server Memory ,it Represents Memory Pressure .

 

but I also see a article say:”

If the SQLServer:Memory Manager: Total Server Memory (KB) counter is more or equal than the SQLServer:Memory Manager: Target Server Memory (KB) counter, this indicates that SQL Server may be under memory pressure and could use access  to more physical memory.”

http://blogs.msdn.com/b/teekamg/archive/2007/11/06/sql-server-memory-related-performance-counters.aspx 

 that is to say: if Total Server Memory >= Target Server Memory ,it Represents Memory Pressure   

 

So from those twomaterial:

if Total Server Memory <Target Server Memory ,it Represents Memory Pressure.

 if Total Server Memor>=Target Server Memory ,it still Represents Memory Pressure.

 That made me crazy,

So what's your opinion? thank you.




Viewing all 15889 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>