Quantcast
Channel: SQL Server Database Engine forum
Viewing all 12554 articles
Browse latest View live

Creating and deleting file groups dynamically inside Sliding Window partitioning

$
0
0

We are creating a new Database which has very less disk space . we have two tables where the data loads frequently. Retention period for this data is five years.

We have created monthly partitions for this table. and have created 12 file groups which will  be reused by new partitions.

We created a process which delete the partitions with data older than 5  year and  new partitions for the next month is created .This process runs every month.

we need to create a new process when ever there is a warning for low disk space. we need to delete the oldest partition with data.

But we  really missed out the point that deleting partition wont free  the disk space.So we have thought of creating file groups dynamically for each month and assigning this file groups to the respective partition of that month.When we delete the partition the file should also be deleted along with it.

I just need need to know is there any problem in doing this?

i didn't find any related links which do the same.Can anyone give an input on how to handle this inside a sliding window partitioning Logic..



lckmgr.cpp line=10028 Failed Assertion = 'removedEntry != NULL'

$
0
0

When we run tests where we stress sqlserver , over time it will eventually fail with errors and after that restarting doesn't help, we end up having to reboot and sometimes that doesnt help and we have to  uninstall sql server and re installing it to get things working without errors. we will eventually get errors like the following. we get this from sqlserver 13.0.5153  and have also seen it in sqlserver 2017.

any ideas on what would be the problem.

thanks

scott

12/10/2018 14:46:22,spid51,Unknown,SQL Server Assertion: File: <lckmgr.cpp><c/> line=10028 Failed Assertion = 'removedEntry != NULL'. This error may be timing-related. If the error persists after rerunning the statement<c/> use DBCC CHECKDB to check the database for structural integrity<c/> or restart the server to ensure in-memory data structures are not corrupted.

12/10/2018 11:52:53,spid29s,Unknown,SQL Server Assertion: File: <lckmgr.cpp><c/> line=10028 Failed Assertion = 'removedEntry != NULL'. This error may be timing-related. If the error persists after rerunning the statement<c/> use DBCC CHECKDB to check the database for structural integrity<c/> or restart the server to ensure in-memory data structures are not corrupted.

12/10/2018 11:17:05,spid55,Unknown,A system assertion check has failed. Check the SQL Server error log for details. Typically<c/> an assertion failure is caused by a software bug or data corruption. To check for database corruption<c/> consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup<c/> a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.

12/10/2018 11:17:05,spid55,Unknown,SQL Server Assertion: File: <xactrm.cpp><c/> line=4898 Failed Assertion = 'notifyList.IsEmpty ()'. This error may be timing-related. If the error persists after rerunning the statement<c/> use DBCC CHECKDB to check the database for structural integrity<c/> or restart the server to ensure in-memory data structures are not corrupted.

12/10/2018 10:19:13,spid58,Unknown,SQL Server Assertion: File: <qxcntxt.cpp><c/> line=1267 Failed Assertion = 'cref == 0'. This error may be timing-related. If the error persists after rerunning the statement<c/> use DBCC CHECKDB to check the database for structural integrity<c/> or restart the server to ensure in-memory data structures are not corrupted.

12/10/2018 10:18:49,spid58,Unknown,A system assertion check has failed. Check the SQL Server error log for details. Typically<c/> an assertion failure is caused by a software bug or data corruption. To check for database corruption<c/> consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup<c/> a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.

12/10/2018 10:18:49,spid58,Unknown,SQL Server Assertion: File: <lckmgr.cpp><c/> line=10028 Failed Assertion = 'removedEntry != NULL'. This error may be timing-related. If the error persists after rerunning the statement<c/> use DBCC CHECKDB to check the database for structural integrity<c/> or restart the server to ensure in-memory data structures are not corrupted.

In the database log we will get errors like this:

Microsoft SQL Server 2016 (SP2-CU2) (KB4340355) - 13.0.5153.0 (X64) <nl/>
Process 0:0:0 (0x1ef4) Worker 0x000001BF4728A160 appears to be non-yielding on Scheduler 35. Thread creation time: 13188985944346. Approx Thread CPU Used: kernel 171 ms<c/> user 23685750 ms. Process Utilization 11%. System Idle 84%. Interval: 29709971 ms.
Process 0:0:0 (0x940) Worker 0x000001BF476F6160 appears to be non-yielding on Scheduler 38. Thread creation time: 13189015307588. Approx Thread CPU Used: kernel 0 ms<c/> user 199656 ms. Process Utilization 22%. System Idle 69%. Interval: 250745 ms.
Process 0:0:0 (0x4788) Worker 0x000001BF45B60160 appears to be non-yielding on Scheduler 14. Thread creation time: 13189020839392. Approx Thread CPU Used: kernel 0 ms<c/> user 189093 ms. Process Utilization 22%. System Idle 69%. Interval: 235025 ms.
OS Error :Terminating system thread due to exception in ProcessWorker
OS Error :Terminating worker due to exception in ProcessTasks
DoMiniDump () encountered error (0x80004005) - Unspecified error
External dump process return code 0x20000001.<nl/>External dump process returned no errors.
Stack Signature for the dump is 0x000000002E762113
00007FFCCFAEEFC1 Module(ntdll+000000000006EFC1)
00007FFCCDB51FE4 Module(KERNEL32+0000000000011FE4)
00007FFCA5FF1F28 Module(sqldk+0000000000021F28)
00007FFCA5FF10E7 Module(sqldk+00000000000210E7)
00007FFCA5FF1CA0 Module(sqldk+0000000000021CA0)
00007FFCA5FF1C08 Module(sqldk+0000000000021C08)
00007FFCA5FD55A4 Module(sqldk+00000000000055A4)
* Short Stack Dump
* -------------------------------------------------------------------------------
* *******************************************************************************
*       Rip: 00007FFCA5FD55A4:  41EFD141407D8B45  02B6CE850F01E783  0000001198BB8300  8B480001C00F840F 000303E8CB8B48D6  850FC085F08B4400
*       R15: 0000000000000000:
*       R14: 00007FFCA61E4590:  0000000000000000  0000000000000000  00007FFCA61E6678  00007FFCA61E3AB0 0000000000000005  00007FFCA61E6678
*       R13: 0000000000000000:
*       R12: 0000000000000000:
*       R11: 000000744B2FFA80:  0000000000000000  00007FFCA61E4590  000001BF46297468  0000000000000000 000001BF46297468  00007FFCA5FD5586
*       R10: 0000000000000000:
*        R9: 000000744B2FF7E0:  00000000000001AF  0000000000000000  0000000000000002  000000B32FB29FE0 0000000000000000  FFFFFFFFFFFFFFFF
*        R8: 0000000000000000:
*       Rdi: 000001BF46297468:  0000000000000000  0000000000000000  0000000000000000  0000000000000000 0000000000000000  0000000000000000



























































































































execution plan estimated rows was strange

$
0
0
Just curios about following execution plan, one nested loop with two input (one estimated rows:3381 and another estimated rows:1) comes outs a estimation 27031900 rows, is it normal? 

Please Mark As Answer if it is helpful.

dbcc loginfo show vlf status = 2 always

$
0
0

Hi Guys,

I found one database have status = 2 in dbcc loginfo, and it never clears.

The log file was 40GB, and log backup runs every 15 minutes, I can see in last 2 weeks, the largest log backup is 14GB, normally 30MB.

Those are fine, the strange thing is, when DBCC SQLPERF(LOGSPACE); it shows the usage percentage is 4%. in shrink log dialog, it shows 38GB out of 40GB are free!  dbcc loginfo still shows status is 2 for all vlfs, btw log_reuse_wait_desc shows nothing:

select log_reuse_wait_desc from sys.databases where name = 'ContainerSubscriptionService'

I decided to shrink log file from 40gb to 30gb, and it worked!

 checked dbcc loginfo still shows status = 2 for all vlfs.

I manually made several log backups, log_reuse_wait_desc shows nothing, dbcc loginfo shows 2 for all. I did shrink again, now it goes to 20GB.

I manually made several log backups, log_reuse_wait_desc shows nothing, dbcc loginfo shows 2 for all. I did shrink again, now it goes to 10GB.

from now on, I cannot shrink the log file anymore even log_reuse_wait_desc shows nothing, dbcc loginfo shows 2 for all, no matter how many log backups I do.

any ideas?

Version:

Microsoft SQL Server 2014 (SP2-CU4) (KB4010394) - 12.0.5540.0 (X64) 
Jan 27 2017 03:40:25 
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

Thanks in advance!

Regards,

Albert

Unable to start execution of step 1 (reason: Variable SQLLOGDIR not found). The step failed.

$
0
0

I have Ola Hallengren's  script in place to check DB Integrity so when I run it on the dev server, it runs without any issues but when I run it on prod I get this error which is in the title. Both dev and prod server are running on the same version of SQL Server which is (Microsoft SQL Server 2008 R2 (SP2) - Enterprise Edition)

There is insufficient system memory in resource pool internal to run this query

$
0
0
Hi,
We are getting the following error. Please help on this issue.
There is insufficient system memory in resource pool 'internal' to run this query.
SQL 2012(SP1)

Error Log:
2018-12-11 05:07:51.44 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:51.44 Server      Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:51.44 Server      Error: 18054, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:51.45 Server      Error: 9602, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:51.45 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.45 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.46 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.46 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.46 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.46 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.46 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.46 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.46 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.46 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.46 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.46 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.47 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.47 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.47 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.47 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.47 spid20s     Error: 701, Severity: 17, State: 132.
2018-12-11 05:07:51.47 spid20s     There is insufficient system memory in resource pool 'internal' to run this query.
2018-12-11 05:07:51.96 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:51.96 Server      Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:51.96 Server      Error: 18054, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:51.96 Server      Error: 9602, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:56.95 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:56.95 Server      Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:56.95 Server      Error: 18054, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:07:56.95 Server      Error: 9602, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2018-12-11 05:19:07.88 spid59      Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
2018-12-11 05:19:07.89 spid59      Configuration option 'Ole Automation Procedures' changed from 0 to 1. Run the RECONFIGURE statement to install.
2018-12-11 05:19:07.93 spid59      Configuration option 'Ole Automation Procedures' changed from 1 to 0. Run the RECONFIGURE statement to install.
2018-12-11 05:19:07.94 spid59      Configuration option 'show advanced options' changed from 1 to 0. Run the RECONFIGURE statement to install.
2018-12-11 05:19:07.95 spid59      Configuration option 'show advanced options' changed from 0 to 0. Run the RECONFIGURE statement to install.
2018-12-11 05:48:53.09 Server       Failed allocate pages: FAIL_PAGE_ALLOCATION 1
2018-12-11 05:48:53.09 Server     

Best way to store the sql server errors into text file

$
0
0

What is the best way to export the SQL server errors in catch block to text file.I also  need to export some custom errors too for failures of any conditions in the try Block?

We will not be able to use CLR functions or OLE automation procedure.

Is it a good thing to execute SSIS package inside the Stored procedure and load into text File.I will be forced to write the package execution for every place where there is a condition failure?

Is there any disadvantage for using cmdshell?

Self signed cert used for one connection only, rest of connections not encrypted

$
0
0

One SQL 2016 prod database VM is being used by users for querying data, analytics, reporting, etc. users are in same domain and not using SSL. However, one database in another data center will query regularly one of the database on this first server. In order to use SSL, I can configure self-signed cert to protect communications between db servers in these 2 data centers.

AFAIK, if I force encryption on the instance, just encrypted connections are allowed, which is not what I need. or I need to separate this database into a separate instance just for this. I do not have a spare dev where to test this.

Can I enable SSL encryption that will be used by the remote server only, while regular users will not use SSL on same instance?

Thank you,




SQL Agent Schedule

$
0
0

I have many SQL Server Agents Jobs. Many were scheduled at the same time. Say 1:00 am. In the schedule lists they are duplicates. I want to delete most of them and just keep one and then I want those Agent jobs to share the schedule if these jobs are going be scheduled at that time.

How can I delete these schedules? Thanks.

SQL Server 2017 Error 926

$
0
0

Hi there,

I am getting following error msg : 

Database 'msdb' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information. (Microsoft SQL Server, Error: 926)

Please help me to resolve the issue.

Tried already starting & stopping the service but no Luck.

Regards,

TFS Queries

Random performance on SQL Server 2017 when running the same view during the day

$
0
0

We have an SQL view extracting fixed data during the day which runs in 3mn with 4'000 records even after updating index and after half an hour or less it produces the same results in 1 sec. The performance difference seems not linked to the load of the server. The server is a VM under VM Ware running Windows 2012 R2 Standard with 48 GB memory and SQL Server 2017 14.0.3035.2.

The VM Ware team has applied physical processes to that Server. The doubt comes from the SQL engine or the VM.


SQL error 5171

$
0
0
I'm getting an error while operating the SQL server. It displays as SQL server error 5171. I'm not able to resolve this error. Please, somebody, help me get out of this.

TSQL Query

$
0
0
Hi All,

Table Name: Audit
Column name: CreatedON datetime

I am looking way to find the count of records that are created in every 30 minutes based on CreatedON column. At the end of the day i will run T-SQL select script and I need output like below.

Case_Count                CreatedON
10                               12/12/2018 9:00:00
12                               12/12/2018 9:30:00
18                                12/12/2018 10:00:00
.
.
.
.
200                          12/12/2018 23:30:00

Can help me how to accomplish above task using T-SQL script.

Thanks in advance.

Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgment

$
0
0

Hi,

I am able to connect SQL server till yesterday. But today I am unable to login into SQL server.

Didn't changed anything.

SQL 2012 SP1

Thanks,

Ramaraju

SSL Certificate not visible from SQL Configuration Manager

$
0
0

Hi all,

for some reason I am not able to see the certificate from the Configuration Manager --> SQL server network configuration --> Protocols for MSSQLSERVER when I right click and select the Certificate under the dropdown.
Certificate was imported from sys admin guy and I can see it under Certificates' Personal folder of the Console Root - certificates (Local Computer). It also looks that is configured and imported properly and in line with the requirements under the Microsoft's links below:

http://technet.microsoft.com/en-us/library/ms191192.aspx
http://technet.microsoft.com/en-us/library/ms189067%28v=sql.105%29.aspx

The version of the operating system is where SQL server resides is Windows Server 2012 Standard Edition and SQL Server is 2012 developer edition.

Since my sql server services Engine is running under service account with Deny Logon Locally domain policy, I started the service as LocalSystem and open the Configuration Manager with an administrative account, but still didn't worked.

Feedbacks on this issue are highly appreciated.

Cheers


MSSQL TDE and Key Vault

$
0
0

I posted the below to Microsoft Azure  >  Azure Key Vault

https://social.msdn.microsoft.com/Forums/en-US/00ac441e-75b5-4009-aba3-b4828a23b034/mssql-tde-certificates-in-key-vault?forum=AzureKeyVault

I am posting here in case if someone has experience with this and can answer my question.

Thanks!


-------------

Hello,

I'm pretty new to the Azure space and have some questions regarding Key Vault.

I recently setup SQL Server 2017 with TDE (Transparent Data Encryption) enabled for all databases in an on-prem sql server.  I have been playing with Azure.  I'm able to perform BACKUP/RESTORE between on-prem and Azure.  Now, I'm poking around with Azure Key Vault.  Because my databases are TDE enabled, I have previously backed the TDE certificate from the source server.  I have now converted my .cert and .pvk files to .pfx.   Uploaded to Azure -> Key Vault -> Certificate and downloaded it as a backup to my on-prem machine.   My question is this: If I had a disaster on my on-prem sql server, how would restore this downloaded certificate (in pfx format) onto say, a stand-by sql server or if I had to rebuild my sql server 2017 from scratch?

Thanks!

Error: 845, Severity: 17, State: 1: One or more recovery units belonging to database 'TP1' failed to generate a checkpoint

$
0
0

Hi experts,

  I got an error message and the error message is ambiguous. I google and find a lot of discussions but I don't know how to troubleshoot.

( https://support.microsoft.com/en-za/help/310834/description-of-common-causes-of-sql-server-error-message-844-or-error )

I run our SAP on SQL with HPE DL580. Please give me a guideline and any information is appreciated. I upload my complete errorlog on google drive( https://drive.google.com/file/d/1EKLhIGBxsEFYaJ6EIEPxUREqj0HOlLSj/view?usp=sharing )

By the way, database files and transaction log both are located on PCIe SSDs.

--- systeminfo ---

Processor(s):              4 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 85 Stepping 4 GenuineIntel ~2494 Mhz
                           [02]: Intel64 Family 6 Model 85 Stepping 4 GenuineIntel ~2494 Mhz
                           [03]: Intel64 Family 6 Model 85 Stepping 4 GenuineIntel ~2494 Mhz
                           [04]: Intel64 Family 6 Model 85 Stepping 4 GenuineIntel ~2494 Mhz

Total Physical Memory:     3,145,395 MB

---

"Windows Server 2016 Version 1607(OS Build 14393.2395)"

SQL: "Microsoft SQL Server 2012 (SP3-CU10) (KB4025925) - 11.0.6607.3 (X64) 

Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 14393: )"

--- when the problem occurred ---

2018-12-07 10:15:26.97 spid20s     Error: 5901, Severity: 16, State: 1.
2018-12-07 10:15:26.97 spid20s     One or more recovery units belonging to database 'TP1' failed to generate a checkpoint. This is typically caused by lack of system resources such as disk or memory, or in some cases due to database corruption. Examine previous entries in the error log for more detailed information on this failure.
2018-12-07 10:15:26.97 spid20s     Error: 845, Severity: 17, State: 1.
2018-12-07 10:15:26.97 spid20s     Time-out occurred while waiting for buffer latch type 3 for page (16:880781), database ID 5.

--- partial errorlog ---

2018-12-07 10:15:13.93 spid20s     A time-out occurred while waiting for buffer latch -- type 3, bp 0000013662FA21C0, page 16:880781, stat 0xb, database id: 5, allocation unit Id: 72057643394072576, task 0x00000133A2455498 : 1, waittime 300 seconds, flags 0x100000001a, owning task 0x00000133A1A4D498. Not continuing to wait.
2018-12-07 10:15:13.97 spid20s     Using 'dbghelp.dll' version '4.0.5'
2018-12-07 10:15:13.98 spid20s     **Dump thread - spid = 20, EC = 0x0000009729DAA160
2018-12-07 10:15:13.99 spid20s     ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\LOG\SQLDump0002.txt
2018-12-07 10:15:13.99 spid20s     * *******************************************************************************
2018-12-07 10:15:13.99 spid20s     *
2018-12-07 10:15:13.99 spid20s     * BEGIN STACK DUMP:
2018-12-07 10:15:13.99 spid20s     *   12/07/18 10:15:13 spid 22652
2018-12-07 10:15:13.99 spid20s     *
2018-12-07 10:15:13.99 spid20s     * Latch timeout
2018-12-07 10:15:13.99 spid20s     *
2018-12-07 10:15:13.99 spid20s     *  
2018-12-07 10:15:13.99 spid20s     * *******************************************************************************
2018-12-07 10:15:13.99 spid20s     * -------------------------------------------------------------------------------
2018-12-07 10:15:13.99 spid20s     * Short Stack Dump
2018-12-07 10:15:14.03 spid20s     Stack Signature for the dump is 0x000000011415DBA4
2018-12-07 10:15:26.94 spid169     Remote harden of transaction 'user_transaction' (ID 0x000000008eadcb41 0010:ab2858a7) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18905904:250) failed.
2018-12-07 10:15:26.94 spid39s     A connection timeout has occurred on a previously established connection to availability replica 'DL580-2' with id [B85FD98F-6E3B-420B-BAD3-CBD4FF4D133D].  Either a networking or a firewall issue exists or the availability replica has transitioned to the resolving role.
2018-12-07 10:15:26.94 spid819     Remote harden of transaction 'user_transaction' (ID 0x000000008eadcbda 0010:ab2858a8) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18905969:87) failed.
2018-12-07 10:15:26.94 spid36s     Remote harden of transaction 'GhostCleanupTask' (ID 0x000000008eadcd5b 0010:ab2858ab) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906120:20) failed.
2018-12-07 10:15:26.95 spid645     Remote harden of transaction 'user_transaction' (ID 0x000000008eadcbb1 0010:ab2858ac) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906127:51) failed.
2018-12-07 10:15:26.95 spid44s     AlwaysOn Availability Groups connection with secondary database terminated for primary database 'TP1' on the availability replica with Replica ID: {b85fd98f-6e3b-420b-bad3-cbd4ff4d133d}. This is an informational message only. No user action is required.
2018-12-07 10:15:26.95 spid782     Remote harden of transaction 'user_transaction' (ID 0x000000008eace892 0010:ab2858ad) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906148:70) failed.
2018-12-07 10:15:26.95 spid1656    Remote harden of transaction 'user_transaction' (ID 0x000000008eadc933 0010:ab2858af) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906182:23) failed.
2018-12-07 10:15:26.94 Server      Error: 19419, Severity: 16, State: 1.
2018-12-07 10:15:26.94 Server      Windows Server Failover Cluster did not receive a process event signal from SQL Server hosting availability group 'AGTP1' within the lease timeout period.
2018-12-07 10:15:26.95 Server      Error: 19407, Severity: 16, State: 1.
2018-12-07 10:15:26.95 Server      The lease between availability group 'AGTP1' and the Windows Server Failover Cluster has expired. A connectivity issue occurred between the instance of SQL Server and the Windows Server Failover Cluster. To determine whether the availability group is failing over correctly, check the corresponding availability group resource in the Windows Server Failover Cluster.
2018-12-07 10:15:26.95 Server      AlwaysOn: The local replica of availability group 'AGTP1' is going offline because either the lease expired or lease renewal failed. This is an informational message only. No user action is required.
2018-12-07 10:15:26.95 Server      The state of the local availability replica in availability group 'AGTP1' has changed from 'PRIMARY_NORMAL' to 'RESOLVING_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log. 
2018-12-07 10:15:26.95 spid44s     AlwaysOn Availability Groups connection with secondary database terminated for primary database 'TP1' on the availability replica with Replica ID: {b85fd98f-6e3b-420b-bad3-cbd4ff4d133d}. This is an informational message only. No user action is required.
2018-12-07 10:15:26.95 spid934     Remote harden of transaction 'user_transaction' (ID 0x000000008eadcb69 0010:ab2858b0) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906186:137) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.178]
2018-12-07 10:15:26.95 spid2182    Remote harden of transaction 'user_transaction' (ID 0x000000008eadbfd1 0010:ab2858b1) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906217:18) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.172]
2018-12-07 10:15:26.95 spid1171    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcc25 0010:ab2858b2) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906224:63) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.172]
2018-12-07 10:15:26.95 spid620     Remote harden of transaction 'user_transaction' (ID 0x000000008e6bdf8d 0010:ab2858b3) started at Dec  7 2018 10:11AM in database 'TP1' at LSN (957263:18906246:32) failed.
2018-12-07 10:15:26.95 spid1806    Remote harden of transaction 'user_transaction' (ID 0x000000008eadc908 0010:ab2858b5) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906255:5) failed.
2018-12-07 10:15:26.95 spid281     Remote harden of transaction 'user_transaction' (ID 0x000000008ead6f6c 0010:ab2858b4) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906257:1) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.173]
2018-12-07 10:15:26.95 spid1744    Remote harden of transaction 'user_transaction' (ID 0x000000008ead9cb8 0010:ab2858b7) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906258:27) failed.
2018-12-07 10:15:26.95 spid2445    Remote harden of transaction 'user_transaction' (ID 0x000000008eadc1e6 0010:ab2858b6) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906258:29) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.174]
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.173]
2018-12-07 10:15:26.95 spid1776    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcb80 0010:ab2858b8) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906268:62) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.178]
2018-12-07 10:15:26.95 spid2059    Remote harden of transaction 'user_transaction' (ID 0x000000008eadae7b 0010:ab2858b9) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906291:57) failed.
2018-12-07 10:15:26.95 spid2315    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcab4 0010:ab2858bb) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906313:39) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.179]
2018-12-07 10:15:26.95 spid994     Remote harden of transaction 'user_transaction' (ID 0x000000008eadc886 0010:ab2858ba) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906327:51) failed.
2018-12-07 10:15:26.95 spid20s     External dump process return code 0x20000001.
External dump process returned no errors.

2018-12-07 10:15:26.95 spid866     Remote harden of transaction 'user_transaction' (ID 0x000000008eadcb18 0010:ab2858bd) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906345:151) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.174]
2018-12-07 10:15:26.95 spid1635    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcbf3 0010:ab2858be) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906379:41) failed.
2018-12-07 10:15:26.95 spid1289    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcc56 0010:ab2858bf) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906394:31) failed.
2018-12-07 10:15:26.95 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.95 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.179]
2018-12-07 10:15:26.96 spid780     Remote harden of transaction 'user_transaction' (ID 0x000000008eadcbc4 0010:ab2858c0) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906405:47) failed.
2018-12-07 10:15:26.96 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.96 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.173]
2018-12-07 10:15:26.96 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.96 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.175]
2018-12-07 10:15:26.96 spid1782    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcc09 0010:ab2858c1) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906423:58) failed.
2018-12-07 10:15:26.96 spid2130    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcc3d 0010:ab2858c2) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906445:50) failed.
2018-12-07 10:15:26.96 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.96 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.175]
2018-12-07 10:15:26.96 spid572     Remote harden of transaction 'user_transaction' (ID 0x000000008eada858 0010:ab2858c3) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906462:46) failed.
2018-12-07 10:15:26.96 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.96 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.179]
2018-12-07 10:15:26.96 spid1048    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcc8f 0010:ab2858c4) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906479:29) failed.
2018-12-07 10:15:26.96 spid1800    Remote harden of transaction 'user_transaction' (ID 0x000000008eadc99d 0010:ab2858c5) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906490:30) failed.
2018-12-07 10:15:26.96 spid1388    Remote harden of transaction 'user_transaction' (ID 0x000000008eadcc6b 0010:ab2858c6) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906501:62) failed.
2018-12-07 10:15:26.96 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.96 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.172]
2018-12-07 10:15:26.96 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.96 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.173]
2018-12-07 10:15:26.96 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.96 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.178]
2018-12-07 10:15:26.96 spid150     AlwaysOn: The local replica of availability group 'AGTP1' is preparing to transition to the resolving role in response to a request from the Windows Server Failover Clustering (WSFC) cluster. This is an informational message only. No user action is required.
2018-12-07 10:15:26.96 spid881     Remote harden of transaction 'user_transaction' (ID 0x000000008eadcb2c 0010:ab2858c7) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906524:72) failed.
2018-12-07 10:15:26.96 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.96 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.175]
2018-12-07 10:15:26.96 spid1298    Remote harden of transaction 'user_transaction' (ID 0x000000008eadccaf 0010:ab2858ca) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906549:561) failed.
2018-12-07 10:15:26.96 spid718     Remote harden of transaction 'user_transaction' (ID 0x000000008ead234b 0010:ab2858cb) started at Dec  7 2018 10:15AM in database 'TP1' at LSN (957263:18906647:64) failed.
2018-12-07 10:15:26.97 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.97 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.173]
2018-12-07 10:15:26.97 spid20s     Error: 5901, Severity: 16, State: 1.
2018-12-07 10:15:26.97 spid20s     One or more recovery units belonging to database 'TP1' failed to generate a checkpoint. This is typically caused by lack of system resources such as disk or memory, or in some cases due to database corruption. Examine previous entries in the error log for more detailed information on this failure.
2018-12-07 10:15:26.97 spid20s     Error: 845, Severity: 17, State: 1.
2018-12-07 10:15:26.97 spid20s     Time-out occurred while waiting for buffer latch type 3 for page (16:880781), database ID 5.
2018-12-07 10:15:26.97 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.97 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.174]
2018-12-07 10:15:26.97 Logon       Error: 17191, Severity: 16, State: 2.
2018-12-07 10:15:26.97 Logon       Cannot accept a new connection because the session has been terminated. This error occurs when a new batch execution is attempted on a session that is logging out, or when a severe error is encountered upon connection. Check the error log to see if this session was terminated by a KILL command or because of severe errors. [CLIENT: 192.168.28.172]
2018-12-07 10:15:26.98 spid35s     The availability group database "TP1" is changing roles from "PRIMARY" to "RESOLVING" because the mirroring session or availability group failed over due to role synchronization. This is an informational message only. No user action is required.
2018-12-07 10:15:26.98 Server      Error: 10801, Severity: 16, State: 1.
2018-12-07 10:15:26.98 Server      Failed to stop the listener for Windows Failover Cluster resource '8b8c6680-2508-45a4-823b-5d91499ed14c'. Error: 87. The parameter is incorrect. 
2018-12-07 10:15:26.99 Backup      Error: 3041, Severity: 16, State: 1.








Temp db latch wait on non allocation pages

$
0
0
I am seeing a lot of latch wait on temp db but it is not on allocation pages ( gam,sgam,pfs). application is running a stored procedure frequently and it creates local temp table. Is there any way to reduce high latch wait events for non allocation pages in tempdb 

Thanks, Nithin

Query Store Blocking

$
0
0

I am seeing blocking on my database caused by these two processes:

Excerpt from sp_who2

20   BACKGROUND                   sa  .  .CMSQUERY STORE ASYN78012/12 11:22:15                                             20   0    

127  BACKGROUND                   sa  .20   CMSQUERY STORE BACK116852296136205012/10 22:58:09                                             127  0    

Has any body else experienced this and have a solution ? This is preventing the transaction log cleanup on the database.

Thank you

Ajay


AJAY

How to list multiple herarchies in order from the data

$
0
0

hi, 

I am trying to list down all the hierarchies in a data sample, each hierarchy set having one id.

Data sample:

EmpId MgrId Dept

1	2	a
2	0	a
1	5	a
5	6	a
6	0	a
2	3	b
3	4	b
4	0	b

Expected Data: List down all the hirarchies present. All under one hieararchy should be of id 1, then next hierarchy of id 2 and so on..
Hierarchy	EmpID	Dept	MgrId	Root Mgr
1	1	a	2	2
1	2	a	0	2
2	1	a	5	6
2	5	a	6	6
2	6	a	0	6
3	2	b	3	4
3	3	b	4	4
3	4	b	0	4

thanks for the help.


To simplify the intended output:

thanks.


Viewing all 12554 articles
Browse latest View live


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