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

SSMS restore database: no full database backup found

$
0
0

I am using SSMS version 17.9.1 to do a restore from two backup files from a database to a new database on the same server (SQL server 2017)

The two backup files is a full backup on Sunday, and a differential backup on Monday. They are on the chain of a database backup.   

I do the following steps.

1.  create a new database called TestRestore

2. using SSMS to restore the full backup first with no recovery mode,  it succeeded.

3.  The I tried to restore the differential backup.  After add the file,  I got an error:no full database backup is selected to be restored.

I downloaded the newest version SSMS and tried again, it has the same error.

I also tried to use to restore a database using restore to a point of time using ssms, it choses the same two backups, and no failure.

So i just  want to know if my steps are wrong, or is it a bug in SSMS?



Thanks,





Querying Protocols for MSSQLSERVER Properties (Certificate Tab)

$
0
0

Is there any table / view that will show the values for the certificate under Protocols for <server> instance?

Referring to this article

Or values after implementing below (steps and pictures can be found from this article).

Configure MS SQL Server to use the certificate.

    Open SQL Server Configuration Manager.
    Expand SQL Server Network Configuration.
    Right-Click Protocols for SQL Instance and select Properties.
    Select the Certificates Tab.
    Select certificate from the pulldown list.
        If the certificate is missing from the list, then:
            The common name in the certificate is something other than FQDN of the SQL Server
                The best solution is to generate a new certificate.
    Click OK.
    Exit the SQL Server Configuration Manager.




SQL Agent Not Visible Inside SSMS For SQLAgentOperatorRole User

$
0
0

Hello,

SQL2k12 ent edition. Tried both domain user and sql server account. Granted the SQLAgentOperatorRole of MSDB database to the said user. No issues logging into the Database Engine using the credentials. However, cannot view SQL Server Agent. The goal was to allow the concerned user to manage sql server agent jobs, but cannot view it. I tried https://docs.microsoft.com/en-us/sql/ssms/agent/configure-a-user-to-create-and-manage-sql-server-agent-jobs?view=sql-server-2017 . Still cannot see inside the SSMS gui. I even granted db_owner rights to the MSDB and still no luck. Will great appreciate your input. Thanks. Victor


Victor

Frequent Message in Error Log SQL Server has encountered occurrence of cachestore flush

$
0
0

Hi,

We are using SQL Server Enterprise Evaluation 2016 (13.0.1601.5). In Error log we are continuously getting error message

'SQL Server has encountered occurrence of cachestore flush for the 'Object_Plan' cachestore (part plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations.

'SQL Server has encountered occurrence of cachestore flush for the SQL Plan' cachestore (part plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations.

'SQL Server has encountered occurrence of cachestore flush for the 'Bound Trees' cachestore (part plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations.

ALL Database property AUTO_CLOSE is set to FALSE

Requesting you to please assist on this.

Regards,

Nikhil P Desai,


Performance degradation after in-place upgrade from SQL server 2016 to SQL server 2019 CTP 3.2

$
0
0

After performing in-place upgrade from SQL server 2016 to SQL server 2019 CTP 3.2 we have observed performance degradation with CPU utilization  peaked to 90% and above which was averaged to 50% in SQL 2016

would like to understand query optimizer differences from SQL2016 to SQL2019. We have tried below options.

Changing compatibility from 150 to 130 : CPU behavior is same(90%)

Tried rebuilding indexes and update statistics as best practice after upgrade : CPU behavior is same(90%)

Did someone tried this approach and are aware of similar behavior. Any suggestions in this regard would be of great help

Can we get details of lost records after repairing table with dbcc checktable

$
0
0

Hi Folks,

I got IO related error on one of our server, below is the error: 

SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x1146771b; actual: 0x8a5d0c69). It occurred during a read of page (1:1308235) in database ID 25 at offset 0x0000027ec96000 in file 'E:\DataFile\abc_data.mdf'.

 Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately.

Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

when i executed DBCC CHECKDB command it shows that one table has corrupted with 118 inconsistency error.

I have taken backup of that database and restored it on test server and repaired that table.

After checking count for rows, I got the difference of 54 rows. I want to know is there any way from which I can get to know what were those 54 rows.?

Regards,

Yashwant

Free Space in TempDB counter

$
0
0

Hello!

Would you please help me clarify the following questions:

Q1: Does the counter 'Free Space in TempDB' displays the same megabytes as the EmptySpaceinMB column derived from the sys.database_files view?

Q2: Each night when nobody uses any database and only nightly backups are being taken the alert on the picture above fires up - is it normal that the free space in TempDB reduces during backups?

Thank you in advance,
Michael

Polybase SQL Server 2019 : External Table Query Result Issue

$
0
0

We have couple of CSV files on Azure Container Folder and accessing those files with Polybase External Table.

All the files has the same structure, data of each file can be queried when accessed  separately. 

CREATE EXTERNAL TABLE [dbo].[dbs_ACC_DATA]
(

[Account Number] [varchar](50) NULL,[Client ID] [varchar](100) NULL,[Active?] [varchar] (10) NULL,[Individual or Entity Account] [varchar] (10) NULL)

WITH (DATA_SOURCE = [AzureDS],LOCATION = N'/client_files_dbs/file_1.csv',FILE_FORMAT =[az_storage_files],REJECT_TYPE = VALUE,REJECT_VALUE = 1)

SELECT * FROM dbs_ACC_DATA

We are running into the following issues when accessing all the files in the folder

CREATE EXTERNAL TABLE [dbo].[dbs_ACC_DATA]
(

[Account Number] [varchar](50) NULL,[Client ID] [varchar](100) NULL,[Active?] [varchar] (10) NULL,[Individual or Entity Account] [varchar] (10) NULL)

WITH (DATA_SOURCE = [AzureDS],LOCATION = N'/client_files_dbs/',FILE_FORMAT =[az_storage_files],REJECT_TYPE = VALUE,REJECT_VALUE = 1)

Error : 

Cannot execute the query "Remote Query" against OLE DB provider "MSOLEDBSQL" for linked server "(null)". 107090;Query aborted-- the maximum reject threshold (1 rows) was reached while reading from an external source: 2 rows rejected out of total 2 rows processed.

Error log from DWEngine_server log file. 

CREATE EXTERNAL TABLE [dbo].[dbs_ACC_DATA]
(
	[Account Number] [varchar](50) NULL,	[Client ID] [varchar](100) NULL,	[Active?] [varchar] (10) NULL,	[Individual or Entity Account] [varchar] (10) NULL,	[Single or Joint Account] [varchar] (10) NULL,
	[Number of Account Holders] [varchar] (10) NULL,	[Entity Name] [varchar](300) NULL,	[DBA/Disregarded Entity Name] [varchar](100) NULL,	[Country of Organization/Incorporation] [varchar](2) NULL,
	[First Name] [varchar](300) NULL,	[Middle Name] [varchar](300) NULL,	[Last Name] [varchar](300) NULL,	[Citizenship Country] [varchar](2) NULL,	[Country of Birth] [varchar](2) NULL,	[Date of Birth] [varchar](100) NULL,
	[PR Address - Street 1] [varchar](150) NULL,	[PR Address - Street 2] [varchar](150) NULL,	[PR Address - City] [varchar](100) NULL,	[PR Address - Postal Code] [varchar](50) NULL,	[PR Address - State] [varchar](100) NULL,	[PR Address - Country] [varchar](2) NULL,
	[Mailing Address - Street 1] [varchar](150) NULL,	[Mailing Address - Street 2] [varchar](150) NULL,	[Mailing Address -  City] [varchar](100) NULL,	[Mailing Address - Postal Code] [varchar](50) NULL,	[Mailing Address - State] [varchar](100) NULL,
	[Mailing Address - Country] [varchar](2) NULL,	[Additional Mailing Address Countries] [nvarchar](100) NULL,	[Phone Number] [nvarchar](30) NULL,	[Standing Instructions Country] [varchar](2) NULL,
	[Account Opening Date] [datetime] NULL,	[Classification of a U.S. Person] [int] NULL,	[Foreign TIN Type] [nvarchar](6) NULL,
	[U.S. TIN] [varchar](9) NULL,	[U.S. TIN Type] [nvarchar](6) NULL,	[Registration Code] [nvarchar](100) NULL,	[Email Address] [varchar](200) NULL,	[Title] [varchar](100) NULL,
	[Town of Birth] [varchar](50) NULL,	[Reporting FI Jurisdiction] [varchar](2) NULL,	[Tax Residence] [nvarchar](2) NULL,	[POA Country] [varchar](2) NULL,
	[Hold Mail Country] [varchar](2) NULL,	[CIC Code] [int] NULL,	[FILER1] [varchar](100) NULL,	[FILER2] [varchar](100) NULL,	[FILER3] [varchar](100) NULL,	[FILER4] [varchar](100) NULL,	[FILER5] [varchar](100) NULL,
	[FILER6] [varchar](100) NULL,	[FILER7] [varchar](100) NULL,	[FILER8] [varchar](100) NULL,	[FILER9] [varchar](100) NULL,	[FILER10] [varchar](100) NULL
)
WITH (DATA_SOURCE = [AzureDS],LOCATION = N'/client_files_dbs/',FILE_FORMAT =[az_storage_files],REJECT_TYPE = VALUE,REJECT_VALUE = 1)
 SID333:QID507 [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [ServerInterface:InformationEvent] (Info, Normal): Starting processor SqlFrontEndWorkProcessor. [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [ExternalHadoopBridge:InformationEvent] (Info, Normal): Initializing bridge... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [JavaBridge:InformationEvent] (Info, Normal): LoadOrAttachJVM: Getting created JVMs if any... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [JavaNativeInterface:InformationEvent] (Info, Normal): Attaching JVM to current thread... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [ExternalHadoopBridge:InformationEvent] (Info, Normal): Attached to JVM... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [HdfsBridgeFileAccess:InformationEvent] (Info, Normal): GetFileMetadata... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [JavaBridge:InformationEvent] (Info, Normal): LoadOrAttachJVM: Getting created JVMs if any... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [JavaNativeInterface:InformationEvent] (Info, Normal): Attaching JVM to current thread... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [ExternalHadoopBridge:InformationEvent] (Info, Normal): Attached to JVM... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:05 AM [Thread:3652] [HdfsBridgeJniWrapper:InformationEvent] (Info, Normal): Acquired JvmCreationLock... [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:10 AM [Thread:3652] [HdfsBridgeFileAccess:InformationEvent] (Info, Normal): Getting file info for each file in a directory containing total 4 files [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:10 AM [Thread:3652] [HdfsBridgeFileAccess:InformationEvent] (Info, Normal): File info obtained for each file. [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:10 AM [Thread:3652] [ServerInterface:InformationEvent] (Info, Normal): Query SID333:QID507 completed. [Session.SessionId:SID333][Session.IsTransactional:False][Query.QueryId:QID507]
8/23/2019 12:28:10 AM [Thread:4960] [EngineInstrumentation:EngineStopSessionBeginEvent] (Info, Low): Stopping session, in reset connection: False. [Session.SessionId:SID333][Session.IsTransactional:False]
8/23/2019 12:28:10 AM [Thread:4960] [EngineInstrumentation:TdsRemoveConnectionEvent] (Info, Low): Stopping TDS connection: 2609209822992 
8/23/2019 12:28:10 AM [Thread:4556] [TdsRequestProcessor:InformationEvent] (Info, Normal): CancelBatch request started [Session.SessionId:SID333] 
8/23/2019 12:28:10 AM [Thread:4556] [EngineInstrumentation:TdsRemoveConnectionEvent] (Info, Low): Stopping TDS connection: 2609209824864 
8/23/2019 12:28:10 AM [Thread:4556] [EngineInstrumentation:EngineStopSessionBeginEvent] (Info, Low): Stopping session, in reset connection: False. [Session.SessionId:SID333][Session.IsTransactional:False]
8/23/2019 12:28:12 AM [Thread:4556] [PdwTdsNativeToManagedInterop:InformationEvent] (Info, Normal): Incoming TDS connection, Client TDS version: 7 (TDS74). 
8/23/2019 12:28:12 AM [Thread:4556] [EngineInstrumentation:TdsAddConnectionEvent] (Info, Low): Starting TDS connection: 2609209822992 Client: 192.168.10.49:51536, isFromDataSecurityProxy: False, isVnetAddress: False, clientAddressSafe: 192.168.10.49:51536 
8/23/2019 12:28:12 AM [Thread:4556] [DataClassificationConfig:InformationEvent] (Info, Normal): Returning FeatureSwitch DataClassificationCoreEnabled status: False [Session.SessionId:SID334][Session.IsTransactional:False]
8/23/2019 12:28:12 AM [Thread:4556] [EngineInstrumentation:ServerStartSessionEvent] (Info, Low): Started new session, in reset connection: False. [Session.SessionId:SID334][Session.IsTransactional:False]
8/23/2019 12:28:12 AM [Thread:4556] [TdsRequestProcessor:InformationEvent] (Info, Normal): Processing login, authentication scheme: "Ntlm", client application name: "87E0B5F8-7B5A-776E-2D52-AA5CB888E28D" 
8/23/2019 12:28:12 AM [Thread:4556] [PdwTdsNativeToManagedInterop:InformationEvent] (Info, Normal): Data Classification TDS Extension Requested=False, FS Enabled=False, Enabled=False. [Session.SessionId:SID334][Session.IsTransactional:True][Query.QueryId:QID508]
8/23/2019 12:28:12 AM [Thread:1668] [EngineInstrumentation:TdsAddConnectionEvent] (Info, Low): Starting TDS connection: 2609209824864 Client: , isFromDataSecurityProxy: False, isVnetAddress: False, clientAddressSafe:  
8/23/2019 12:28:12 AM [Thread:4556] [EngineInstrumentation:EngineStopSessionBeginEvent] (Info, Low): Stopping session, in reset connection: False. [Session.SessionId:SID334][Session.IsTransactional:False]
8/23/2019 12:28:12 AM [Thread:4556] [EngineInstrumentation:TdsRemoveConnectionEvent] (Info, Low): Stopping TDS connection: 2609209824864 
8/23/2019 12:28:12 AM [Thread:4556] [TdsRequestProcessor:InformationEvent] (Info, Normal): CancelBatch request started [Session.SessionId:SID334] 
8/23/2019 12:28:12 AM [Thread:4636] [EngineInstrumentation:EngineCancelQueryBeginEvent] (Info, Low): Cancel requested. [Session.SessionId:SID334][Session.IsTransactional:False]
8/23/2019 12:28:12 AM [Thread:4556] [EngineInstrumentation:TdsRemoveConnectionEvent] (Info, Low): Stopping TDS connection: 2609209822992 
8/23/2019 12:28:12 AM [Thread:4556] [EngineInstrumentation:EngineStopSessionBeginEvent] (Info, Low): Stopping session, in reset connection: False. [Session.SessionId:SID334][Session.IsTransactional:False]
8/23/2019 12:28:12 AM [Thread:4556] [PdwTdsNativeToManagedInterop:InformationEvent] (Info, Normal): Incoming TDS connection, Client TDS version: 7 (TDS74). 
8/23/2019 12:28:12 AM [Thread:4556] [EngineInstrumentation:TdsAddConnectionEvent] (Info, Low): Starting TDS connection: 2609209822992 Client: 192.168.10.49:51537, isFromDataSecurityProxy: False, isVnetAddress: False, clientAddressSafe: 192.168.10.49:51537 
8/23/2019 12:28:12 AM [Thread:4556] [DataClassificationConfig:InformationEvent] (Info, Normal): Returning FeatureSwitch DataClassificationCoreEnabled status: False [Session.SessionId:SID335][Session.IsTransactional:False]
8/23/2019 12:28:12 AM [Thread:4556] [EngineInstrumentation:ServerStartSessionEvent] (Info, Low): Started new session, in reset connection: False. [Session.SessionId:SID335][Session.IsTransactional:False]
8/23/2019 12:28:12 AM [Thread:4556] [TdsRequestProcessor:InformationEvent] (Info, Normal): Processing login, authentication scheme: "Ntlm", client application name: "87E0B5F8-7B5A-776E-2D52-AA5CB888E28D" 
8/23/2019 12:28:12 AM [Thread:4556] [PdwTdsNativeToManagedInterop:InformationEvent] (Info, Normal): Data Classification TDS Extension Requested=False, FS Enabled=False, Enabled=False. [Session.SessionId:SID335][Session.IsTransactional:True][Query.QueryId:QID509]
8/23/2019 12:28:12 AM [Thread:1668] [EngineInstrumentation:TdsAddConnectionEvent] (Info, Low): Starting TDS connection: 2609209824864 Client: , isFromDataSecurityProxy: False, isVnetAddress: False, clientAddressSafe:  
8/23/2019 12:28:12 AM [Thread:4556] [ServerInterface:InformationEvent] (Info, Normal): Incoming Query:  SID335:QID510 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:12 AM [Thread:3652] [ServerInterface:InformationEvent] (Info, Normal): Starting processor ExecuteMemoProcessor. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [OptimizedStatement:InformationEvent] (Info, Normal): Memo compilation time: 142.5795 ms [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [OptimizedStatement:InformationEvent] (Info, Normal): Sql Server Optimization Clock: 0 s, CPU: 0.002 s. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [OptimizedStatement:InformationEvent] (Info, Normal): SQL Server XML generation Clock : 0.011 s, CPU: 0.01 s [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [ExternalHadoopBridge:InformationEvent] (Info, Normal): Initializing bridge... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [JavaBridge:InformationEvent] (Info, Normal): LoadOrAttachJVM: Getting created JVMs if any... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [JavaNativeInterface:InformationEvent] (Info, Normal): Attaching JVM to current thread... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [ExternalHadoopBridge:InformationEvent] (Info, Normal): Attached to JVM... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [HdfsBridgeFileAccess:InformationEvent] (Info, Normal): GetFileMetadata... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [JavaBridge:InformationEvent] (Info, Normal): LoadOrAttachJVM: Getting created JVMs if any... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [JavaNativeInterface:InformationEvent] (Info, Normal): Attaching JVM to current thread... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [ExternalHadoopBridge:InformationEvent] (Info, Normal): Attached to JVM... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:13 AM [Thread:3652] [HdfsBridgeJniWrapper:InformationEvent] (Info, Normal): Acquired JvmCreationLock... [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [HdfsBridgeFileAccess:InformationEvent] (Info, Normal): Getting file info for each file in a directory containing total 4 files [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [HdfsBridgeFileAccess:InformationEvent] (Info, Normal): File info obtained for each file. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [ReaderHashCost] has been initialized. Source provider: LocalFileSettingsProvider. Value: 0.00021. Default: 0.00021 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [WriterCost] has been initialized. Source provider: LocalFileSettingsProvider. Value: 2.4E-05. Default: 2.4E-05 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [InsBulkCpyCost] has been initialized. Source provider: LocalFileSettingsProvider. Value: 0.00024. Default: 0.00024 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [NetworkCost] has been initialized. Source provider: LocalFileSettingsProvider. Value: 1E-09. Default: 1E-09 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [ExternalReadCost] has been initialized. Source provider: LocalFileSettingsProvider. Value: 4.8E-05. Default: 4.8E-05 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [ExternalHadoopWriteCost] has been initialized. Source provider: LocalFileSettingsProvider. Value: 0.00024. Default: 0.00024 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [StreamWriteCost] has been initialized. Source provider: LocalFileSettingsProvider. Value: 0.00024. Default: 0.00024 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [LimitNumberOfScaOpConst:InformationEvent] (Info, Normal): The number of literals in the query: 0. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [DwServiceSoftLimitSchemaEnabled] has been initialized. Source provider: Microsoft.SqlServer.DataWarehouse.Configuration.FeatureSwitchSettingsProvider. Value: False. Default: False [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [DwServiceSoftLimitQueryOptEnabled] has been initialized. Source provider: Microsoft.SqlServer.DataWarehouse.Configuration.FeatureSwitchSettingsProvider. Value: False. Default: False [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:14 AM [Thread:3652] [OptimizedStatement:InformationEvent] (Info, Normal): Distributed QO time: 1541.9893 ms [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [ExternalFile:InformationEvent] (Info, Normal): For file format DelimitedText, max # of external readers per node has been set to 8 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [ExternalFile:InformationEvent] (Info, Normal): For file format DelimitedText, max # of external readers per node has been set to 8 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [HadoopFile:InformationEvent] (Info, Normal): Total # of files: 4, Total file splits: 4 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [ExternalFile:InformationEvent] (Info, Normal): For file format DelimitedText, max # of external readers per node has been set to 8 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): [BuildExternalMoveReaders] Total 4 split lists for 1 compute nodes each can use up-to 8 external readers. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): [BuildExternalMoveReaders]
Node [SQLEXT2016M01:1433]; # of readers used: 4; Reader 0, # of splits: 1; Reader 1, # of splits: 1; Reader 2, # of splits: 1; Reader 3, # of splits: 1;
 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSPlanBuilder:InformationEvent] (Info, Normal): Table has clustered indexes, or this is a streaming plan. Parallel writers will be disabled during this operation. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [AppConfigPropertyResolver:InformationEvent] (Info, Normal): Configuration property [DwDmsHighResourcePlanPercentage] has been initialized. Source provider: Microsoft.SqlServer.DataWarehouse.Configuration.XdbSettingsProvider. Value: -1. Default: -1 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DmsConcurrency:InformationEvent] (Info, Normal): DwDmsHighResourcePlanPercentage is loaded: [-1]. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DmsConcurrency:InformationEvent] (Info, Normal): Check if this instance is DwService Gen1 : [False]. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSManager:InformationEvent] (Info, Normal): ExecuteCommand Query:SID335 Plan:a55cf35f-387a-46de-bb2a-4bf6791c925b [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:16 AM [Thread:3652] [DMSManager:InformationEvent] (Info, Normal): DMS Manager starting query: SID335, plan: a55cf35f-387a-46de-bb2a-4bf6791c925b. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:23 AM [Thread:4328] [DMSManager:InformationEvent] (Info, Normal): ExecuteCommand Query:SID335 Plan:61ddf166-0d34-4537-b799-09b2e7f65aa8 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:23 AM [Thread:4328] [DMSManager:InformationEvent] (Info, Normal): DMS Manager starting query: SID335, plan: 61ddf166-0d34-4537-b799-09b2e7f65aa8. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:23 AM [Thread:4296] [DMSManager:InformationEvent] (Info, Normal): Handle de-registered PBQTable{0F05B8EF-B910-4F5B-976E-40AF27BF85DA} 
8/23/2019 12:28:27 AM [Thread:4296] [CommandWorker:InformationEvent] (Info, Normal): QueryId QID510 PlanId a55cf35f-387a-46de-bb2a-4bf6791c925b StepId 3: Canceling plan due to reject threshold reached. 
8/23/2019 12:28:27 AM [Thread:3812] [CommandWorker:InformationEvent] (Info, Normal): Cancel triggered for data movement 
8/23/2019 12:28:28 AM [Thread:360] [CommandWorker:ErrorEvent] (Error, High): Plan failed with DMS CommandWorker Exception: 
Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.MppSqlException[107090:1]: 107090;Query aborted-- the maximum reject threshold (1 rows) was reached while reading from an external source: 2 rows rejected out of total 2 rows processed. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:28 AM [Thread:3652] [AbstractDataMovementExecutable`1:ErrorEvent] (Error, High): Data movement error detected- Code: 0
Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.MppSqlException[107090:1]: 107090;Query aborted-- the maximum reject threshold (1 rows) was reached while reading from an external source: 2 rows rejected out of total 2 rows processed. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:28 AM [Thread:3652] [AbstractDataMovementExecutable`1:InformationEvent] (Info, Normal): DMS Manager finishing query: SID335, plan: a55cf35f-387a-46de-bb2a-4bf6791c925b, queryId: QID510 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:28 AM [Thread:3652] [EngineInstrumentation:QueryStepExecuteErrorEvent] (Error, Critical): 
Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.MppSqlException[107090:1]: 107090;Query aborted-- the maximum reject threshold (1 rows) was reached while reading from an external source: 2 rows rejected out of total 2 rows processed. ---> Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.MppSqlException[107090:1]: 107090;Query aborted-- the maximum reject threshold (1 rows) was reached while reading from an external source: 2 rows rejected out of total 2 rows processed.
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.AbstractDataMovementExecutable`1.HandleError()
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.AbstractDataMovementExecutable`1.OnExecute(ISessionContext Session)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.AbstractExecutable`1.Execute(ISessionContext session)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.<>c__DisplayClass40_0.<ExecuteExecutable>b__0(IList`1 propagationTokens)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.ExecuteActionInDistributedTransactions(Int32 transactionsCount, Action`1 action, IList`1 propagationTokens)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.ExecuteExecutable(EngineExecutionPlan plan, IExecutable executable, ExecutionContext context)
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.ExecutePlan(EngineExecutionPlan plan, ExecutionContext context)
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.RunExecutables(EngineExecutionPlan plan, IList`1 executables)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.MultiStreamingExecutable.OnExecute(ISessionContext session) [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:28 AM [Thread:4328] [AbstractDataMovementExecutable`1:InformationEvent] (Info, Normal): DMS Manager finishing query: SID335, plan: 61ddf166-0d34-4537-b799-09b2e7f65aa8, queryId: QID510 [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:28 AM [Thread:4328] [MultiStreamingExecutable:InformationEvent] (Info, Normal): Early terminate other operations in stream. [Session.SessionId:SID335][Session.IsTransactional:False][Query.QueryId:QID510]
8/23/2019 12:28:28 AM [Thread:3812] [CommandWorker:WarningEvent] (Warning, Normal): Cannot cancel this Plan:61ddf166-0d34-4537-b799-09b2e7f65aa8, due to the uncancellable State:Completed 
8/23/2019 12:28:28 AM [Thread:3812] [CommandWorker:InformationEvent] (Info, Normal): Cancel triggered for data movement 
8/23/2019 12:28:28 AM [Thread:3652] [MultiStreamingExecutable:InformationEvent] (Info, Normal): One or more exceptions hit. Generating aggregated exception summary
===========================================
Exception summary
Exception Message: 107090;Query aborted-- the maximum reject threshold (1 rows) was reached while reading from an external source: 2 rows rejected out of total 2 rows processed.
Exception stack trace
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.AbstractDataMovementExecutable`1.HandleError()
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.AbstractDataMovementExecutable`1.OnExecute(ISessionContext Session)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.AbstractExecutable`1.Execute(ISessionContext session)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.<>c__DisplayClass40_0.<ExecuteExecutable>b__0(IList`1 propagationTokens)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.ExecuteActionInDistributedTransactions(Int32 transactionsCount, Action`1 action, IList`1 propagationTokens)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.ExecuteExecutable(EngineExecutionPlan plan, IExecutable executable, ExecutionContext context)
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at Microsoft.SqlServer.DataWarehouse.Engine.Executables.ExecutableProcessor.ExecutePlan(EngineExecutionPlan plan, ExecutionContext context)
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()

I would like know the reason for the error, which is not very clear from any of the error log files.


XQuery Cluster Diagnostic files (SQLDiag)

$
0
0

I need to parse Cluster Diagnostic files. 

I need the query to bring all the distinct names  from data elements of one of event type (lets say "scheduler_monitor_non_yielding_ring_buffer_recorded" ) under the RingBufferTarget . ex: 

Event                                                                           Name Attribute

==================================     =============
scheduler_monitor_non_yielding_ring_buffer_recordedid
scheduler_monitor_non_yielding_ring_buffer_recorded      timestamp
scheduler_monitor_non_yielding_ring_buffer_recorded      opcode
......



Shortened XML below:

<event name="component_health_result" package="sql_cluster_resource" timestamp="2019-08-12T14:06:12.454Z">
  <data name="state">
    <value>0</value>
  </data>
  <data name="failure_condition_level">
    <value>3</value>
  </data>
  <data name="creation_time">
    <value>2019-08-12 10:06:12.453</value>
  </data>
  <data name="component_type">
    <value>instance</value>
  </data>
  <data name="component">
    <value>events</value>
  </data>
  <data name="state_desc">
    <value>unknown</value>
  </data>
  <data name="data">
    <value>
      <events>
        <session startTime="2019-07-13T01:55:50.300" droppedEvents="0" largestDroppedEvent="0">
          <RingBufferTarget truncated="0" processingTime="3891" totalEventsProcessed="46481" eventCount="43" droppedCount="0" memoryUsed="24560">
            <event name="scheduler_monitor_non_yielding_ring_buffer_recorded" package="sqlos" timestamp="2019-07-31T13:42:46.283Z">
              <data name="id">
                <type name="uint32" package="package0" />
                <value>0</value>
              </data>
              <data name="timestamp">
                <type name="uint64" package="package0" />
                <value>1604342839</value>
              </data>
              <data name="opcode">
                <type name="event_opcode" package="sqlos" />
                <value>0</value>
                <text>Begin</text>
              </data>
              <data name="node_id">
                <type name="uint16" package="package0" />
                <value>0</value>
              </data>
              <data name="scheduler">
                <type name="uint32" package="package0" />
                <value>5</value>
              </data>
              <data name="worker">
                <type name="ptr" package="package0" />
                <value>0x00000005238f8160</value>
              </data>
              <data name="yields">
                <type name="uint64" package="package0" />
                <value>195936512</value>
              </data>
              <data name="worker_utilization">
                <type name="uint32" package="package0" />
                <value>99</value>
              </data>
              <data name="process_utilization">
                <type name="uint32" package="package0" />
                <value>25</value>
              </data>
              <data name="system_idle">
                <type name="uint32" package="package0" />
                <value>66</value>
              </data>
              <data name="user_mode_time">
                <type name="uint64" package="package0" />
                <value>100156250</value>
              </data>
              <data name="kernel_mode_time">
                <type name="uint64" package="package0" />
                <value>0</value>
              </data>
              <data name="page_faults">
                <type name="uint32" package="package0" />
                <value>12</value>
              </data>
              <data name="working_set_delta">
                <type name="int64" package="package0" />
                <value>8192</value>
              </data>
              <data name="memory_utilization">
                <type name="uint32" package="package0" />
                <value>99</value>
              </data>
              <data name="call_stack">
                <type name="callstack" package="package0" />
                <value />
              </data>
            </event>
            <event name="scheduler_monitor_non_yielding_ring_buffer_recorded" package="sqlos" timestamp="2019-07-31T13:42:51.298Z">
              <data name="id">
                <type name="uint32" package="package0" />
                <value>0</value>
              </data>
              <data name="timestamp">
                <type name="uint64" package="package0" />
                <value>47382888</value>
              </data>
              <data name="opcode">
                <type name="event_opcode" package="sqlos" />
                <value>1</value>
                <text>End</text>
              </data>
              <data name="node_id">
                <type name="uint16" package="package0" />
                <value>0</value>
              </data>
              <data name="scheduler">
                <type name="uint32" package="package0" />
                <value>5</value>
              </data>
              <data name="worker">
                <type name="ptr" package="package0" />
                <value>0x00000005238f8160</value>
              </data>
              <data name="yields">
                <type name="uint64" package="package0" />
                <value>195936526</value>
              </data>
              <data name="worker_utilization">
                <type name="uint32" package="package0" />
                <value>99</value>
              </data>
              <data name="process_utilization">
                <type name="uint32" package="package0" />
                <value>25</value>
              </data>
              <data name="system_idle">
                <type name="uint32" package="package0" />
                <value>66</value>
              </data>
              <data name="user_mode_time">
                <type name="uint64" package="package0" />
                <value>100156250</value>
              </data>
              <data name="kernel_mode_time">
                <type name="uint64" package="package0" />
                <value>0</value>
              </data>
              <data name="page_faults">
                <type name="uint32" package="package0" />
                <value>12</value>
              </data>
              <data name="working_set_delta">
                <type name="int64" package="package0" />
                <value>8192</value>
              </data>
              <data name="memory_utilization">
                <type name="uint32" package="package0" />
                <value>99</value>
              </data>
              <data name="call_stack">
                <type name="callstack" package="package0" />
                <value />
              </data>
            </event>
            <event name="security_error_ring_buffer_recorded" package="sqlserver" timestamp="2019-08-08T19:47:51.170Z">
              <data name="id">
                <type name="uint32" package="package0" />
                <value>0</value>
              </data>
              <data name="timestamp">
                <type name="uint64" package="package0" />
                <value>47264855</value>
              </data>
              <data name="session_id">
                <type name="int16" package="package0" />
                <value>82</value>
              </data>
              <data name="error_code">
                <type name="uint32" package="package0" />
                <value>1332</value>
              </data>
              <data name="api_name">
                <type name="unicode_string" package="package0" />
                <value>LookupAccountSid</value>
              </data>
              <data name="calling_api_name">
                <type name="unicode_string" package="package0" />
                <value>LookupAccountSidInternal</value>
              </data>
              <data name="call_stack">
                <type name="callstack" package="package0" />
                <value />
              </data>
            </event>
            <event name="security_error_ring_buffer_recorded" package="sqlserver" timestamp="2019-08-08T19:48:41.554Z">
              <data name="id">
                <type name="uint32" package="package0" />
                <value>0</value>
              </data>
              <data name="timestamp">
                <type name="uint64" package="package0" />
                <value>47264855</value>
              </data>
              <data name="session_id">
                <type name="int16" package="package0" />
                <value>82</value>
              </data>
              <data name="error_code">
                <type name="uint32" package="package0" />
                <value>1332</value>
              </data>
              <data name="api_name">
                <type name="unicode_string" package="package0" />
                <value>LookupAccountSid</value>
              </data>
              <data name="calling_api_name">
                <type name="unicode_string" package="package0" />
                <value>LookupAccountSidInternal</value>
              </data>
              <data name="call_stack">
                <type name="callstack" package="package0" />
                <value />
              </data>
            </event>
           </RingBufferTarget>
        </session>
      </events>
    </value>
  </data>
  <data name="instance_name">
    <value>InstanceName</value>
  </data>
  <data name="node_name">
    <value>ServerName</value>
  </data>
</event>

Finding columns to join from database that has no relationships between tables designated

$
0
0

Hello -

I am working with a database that does not have a database diagram.  When I try to create one, it doesn't show any relationships at all.  

I need to join tables.  Looking for matching columns in tables is like the ol' needle in a haystack.

Any suggestions will be appreciated!

junior mint

how MinLSN works in Database Rollback?

$
0
0

When I search what MinLSN, I see many articles saying "The MinLSN is the log sequence number of the oldest log record that is required for a successful database-wide rollback". 

But no one explains how MinLSN works in Database-wide rollback? Can anyone give details about how MinLSN was used in database rollback?


SQL 2014 CU and GDR

$
0
0

There are lastest CU4 for SQL 2014 SP3

and another lastest GDR which is relase at 7 Sept

CU

SQL Server 2014 SP3 CU4 12.0.6329.1 (Latest build)KB4500181July 29, 2019
SQL Server 2014 SP3 CU312.0.6259.0KB4491539April 16, 2019

GDR

Description of the security update for SQL Server 2014 SP2 GDR: July 9, 2019

https://support.microsoft.com/en-us/help/4505422/security-update-for-sql-server-2014-sp3-cu3

So Am I correct the CU4 won't include the GDR for GDR: July 9, 2019?

And can we applied back the GDR after CU4 ??

need help in deadlock

$
0
0
Hi Experts,

We are seeing repeated deadlocks on one of our prod servers. Can anyone please tell me why deadlock is occuring and what can be done to fix or atleast minimize these deadlocks.
Attaching the deadlock graph. I tried to pull out deadlock information from system health session.

Environment details
===================
<deadlock><victim-list><victimProcess id="process237485b868" /></victim-list><process-list><process id="process237485b868" taskpriority="0" logused="0" waitresource="KEY: 34:72058363954855936 (e795f34fdfa7)" waittime="503" ownerId="9642762791" transactionname="implicit_transaction" lasttranstarted="2019-08-22T22:36:51.997" XDES="0x5c93fb6a8" lockMode="U" schedulerid="1" kpid="2388" status="suspended" spid="446" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2019-08-22T22:36:51.997" lastbatchcompleted="2019-08-22T22:36:51.870" lastattention="1900-01-01T00:00:00.870" clientapp="Microsoft JDBC Driver for SQL Server" hostname="sjc4mdmappp01.corp.service-now.com" hostpid="0" loginname="cmx_ors" isolationlevel="read committed (2)" xactid="9642762791" currentdb="34" lockTimeout="4294967295" clientoption1="671219744" clientoption2="128058"><executionStack><frame procname="adhoc" line="1" stmtstart="310" sqlhandle="0x0200000004296002253d1e77f9e6736ee848e3316b90c0000000000000000000000000000000000000000000">
UPDATE C_REPOS_APPLIED_LOCK SET LOCK_QUERY_SQL=@P0, LOCK_EXCLUSIVE_IND=@P1, JOB_TYPE_STR=@P2, MODULE_NAME=@P3, INTERACTION_ID=@P4, LAST_UPDATE_DATE=@P5, UPDATED_BY=@P6 WHERE ROWID_TABLE = @P7 AND LOCK_GROUP_STR=@P8    </frame><frame procname="unknown" line="1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
unknown    </frame></executionStack><inputbuf>
(@P0 nvarchar(4000),@P1 bit,@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 varchar(8000),@P5 datetime2,@P6 nvarchar(4000),@P7 nvarchar(4000),@P8 nvarchar(4000))UPDATE C_REPOS_APPLIED_LOCK SET LOCK_QUERY_SQL=@P0, LOCK_EXCLUSIVE_IND=@P1, JOB_TYPE_STR=@P2, MODULE_NAME=@P3, INTERACTION_ID=@P4, LAST_UPDATE_DATE=@P5, UPDATED_BY=@P6 WHERE ROWID_TABLE = @P7 AND LOCK_GROUP_STR=@P8                                                                           </inputbuf></process><process id="process237f7e6928" taskpriority="0" logused="480" waitresource="KEY: 34:72058363954659328 (838cbf52070e)" waittime="508" ownerId="9642762806" transactionname="implicit_transaction" lasttranstarted="2019-08-22T22:36:52.003" XDES="0x456415d6a8" lockMode="X" schedulerid="3" kpid="25708" status="suspended" spid="438" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2019-08-22T22:36:52.003" lastbatchcompleted="2019-08-22T22:36:51.907" lastattention="1900-01-01T00:00:00.907" clientapp="Microsoft JDBC Driver for SQL Server" hostname="sjc4mdmappp01.corp.service-now.com" hostpid="0" loginname="cmx_ors" isolationlevel="read committed (2)" xactid="9642762806" currentdb="34" lockTimeout="4294967295" clientoption1="671219744" clientoption2="128058"><executionStack><frame procname="adhoc" line="1" stmtstart="40" sqlhandle="0x020000002fb7d6119a0168bacfcfccca5c361149704f8e940000000000000000000000000000000000000000">
DELETE FROM C_REPOS_APPLIED_LOCK WHERE LOCK_GROUP_STR=@P0    </frame><frame procname="unknown" line="1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
unknown    </frame></executionStack><inputbuf>
(@P0 nvarchar(4000))DELETE FROM C_REPOS_APPLIED_LOCK WHERE LOCK_GROUP_STR=@P0           </inputbuf></process></process-list><resource-list><keylock hobtid="72058363954855936" dbid="34" objectname="cmx_ors.dbo.C_REPOS_APPLIED_LOCK" indexname="PK_APPLIED_LOCK" id="lock10c7de7600" mode="X" associatedObjectId="72058363954855936"><owner-list><owner id="process237f7e6928" mode="X" /></owner-list><waiter-list><waiter id="process237485b868" mode="U" requestType="wait" /></waiter-list></keylock><keylock hobtid="72058363954659328" dbid="34" objectname="cmx_ors.dbo.C_REPOS_APPLIED_LOCK" indexname="C_REPOS_ROWID_JOBTYPE_IND" id="lock4ee7479400" mode="U" associatedObjectId="72058363954659328"><owner-list><owner id="process237485b868" mode="U" /></owner-list><waiter-list><waiter id="process237f7e6928" mode="X" requestType="wait" /></waiter-list></keylock></resource-list></deadlock>


Microsoft SQL Server 2012 (SP4) (KB4018073) - 11.0.7001.0 (X64)
    Aug 15 2017 10:23:29
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)


Thanks,
Sam

Query Store option

$
0
0

One option in query store I get very confused .

Statistics Collection Interval

what does it acutally do ? the default interval is 60mins.

so which mean every 60 mins the execution plan will gather once?

Low performance in ApexSql recovery

$
0
0

Hi every one,

I have server for recovering data with apexsql recovery software.the configuration of server is :

Hardware

Core 2.0 GHz CPU ( 2 Socket + 2 Core ) 8 GB memory

100 GB disk space

SQL Server

SQL Server 2016

OS

Windows Server 2016

Software

.NET Framework 4.7.2 

I have problem when I used apexsql recovery for recoveringdata from full backup file. The software works slowly .    I have some error in performance monitoring of server :

how can I  increse performance of apexsql recovery for large databases???








SQL alwayON on machines with two SQL instances

$
0
0

I have two SQL servers with two instances each (2012 and 2016), both machine are in windows 2012 fail over cluster. I am able to have the named instance (2016) created Alwayson group and the listener with a port 5023. it works fine. but I cannot get the default instance to have the AlwaysON group working, the AlwaysOn group created and the listener created on 5022(later tried 5024....), but the secondary always shows disconnected. I tried swap the two nodes for primary and secondary, no luck.

replica_server_nameendpoint_urlconnected_state_desclast_connect_error_descriptionlast_connect_error_numberlast_connect_error_timestamp
mySecondaryServer    TCP://mySecondaryServer.esclhin.on.ca:5024DISCONNECTEDNULLNULLNULL

myPrimaryServer TCP://myPrimaryServer .esclhin.on.ca:5024CONNECTEDNULLNULLNULL

Does it support two instances on a machine for AlwaysON group?

thank you Mighty O for replying and reminding check cp_endpoints. I like to add further more. 

The is no firewall factor in my case for domain computers. 

the error on secondary shows refused it. Connection attempt failed with error: '10061(No connection could be made because the target machine actively refused it.)'. firewall is not a factor.

The sql error log shows connection timeout(googled a few posts, not applicable or solve my case)
A connection timeout has occurred while attempting to establish a connection to availability replica ' ' with id [21A23CD0-A5E0-49C1-BB57-37B39742829D]. Either a networking or firewall issue exists, or the endpoint address provided for the replica is not the database mirroring endpoint of the host server instance.

The problem is that what my default instance cannot listen all TCP ports, but not sure why. 

an TCP end points info screenshot attached fyi, thanks for every replies.


Theory questions on Extended Events

$
0
0

Hello,

Please help me with the following questions:

1)I created the AcquiredLocks session, ran it for ~1-2 minutes and displayed the results from both targets:

Q1: I thought the number of events would be the same for both targets but the histogram target always shows 296 and this value does not change when I restart the session (the file target displays the more and more events after each restart) - am I missing anything here?


Q2: Is it possible to save session data to pairing target in SSMS - seems there's no such option in the New Session wizard... ?

Thank you in advance,
Michael


EMC DDboost cleanup of expired backups

$
0
0

Hi ,

Can you please let me know the process/configuration if cleanup process of expired backups of ddboost . 

Currently most of the databases write backups to Data Domain (ddboost), we are writing backups with different retention times.
1)      Daily full backup 14 Days
2)      Weekly full backup 60 Days
3)      Monhtly full backup 760 Days

4)Tlog backups with 2 days retention 

So would like to setup automatic process to delete expired backups on ddboost, we need to find a way to do that.

Please help me soon

save eml file

$
0
0

Good morning to everybody,

I am looking to find the best way to save eml file to sql server.

Do they have to be saved as stream or there is another way?

Thanks

Marco Dell'Oca

“There is insufficient system memory in resource pool 'default' to run this query” ERROR when using large in-memory table variable

$
0
0

I am testing the ability of In-memory table variables and set up the below test. Then I have the error message like this:

The statement has been terminated.
Msg 701, Level 17, State 103, Line 80
There is insufficient system memory in resource pool 'default' to run this query.
** An error was encountered during execution of batch. Continuing.

The error happens a little bit randomly. When I put a smaller number into the in-memory table variable, Sometimes the error shows up, other times the batches went through smoothly. By the way, I am using SQL Server 2016 developer edition, so there should not be a memory limit what so ever. And in fact, I think my computer at least has 4 GB RAM left when this error happened.

I am not familiar with the "resource pool", could anyone explain to me why this happens? And how can I avoid this issue or maybe know the edge limit of in-memory table variables?

PS: Not sure this information should help but I <g class="gr_ gr_22 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="22" id="22">checked </g>perfmon<g class="gr_ gr_22 gr-alert gr_gramm gr_inline_cards gr_disable_anim_appear Style multiReplace" data-gr-id="22" id="22"> and</g> found for most of the time,IOPagePool64K Total Allocated drops down to 1 <g class="gr_ gr_23 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="23" id="23">and </g>IOPagePool64K Free List Count<g class="gr_ gr_23 gr-alert gr_gramm gr_inline_cards gr_disable_anim_appear Style multiReplace" data-gr-id="23" id="23"> has</g> value 0 when I get the error. So if I have to guess, for a certain time period, the allocated memory somehow get released or cleaned up? Even though it will allocate back to it later, but at the time it gets released, allocated memory will be insufficient since the allocated memory is 0? Can someone confirm that? Thank you in advance!

CREATE TYPE dbo.GEN_UDT_INT_mem ASTABLE(
           Id INT NOTNULLindex i1 NONCLUSTERED(Id))WITH( MEMORY_OPTIMIZED =ON);
GOCREATEPROCEDURE dbo.ASelectFunctionUsingTVP (@Filter dbo.GEN_UDT_INT_mem READONLY,@Result INT OUTPUT)ASBEGINSELECT@Result = t.IdFROM            dbo.TABLEA  tINNERJOIN@Filter     f ON t.Id= f.Id;END;
GODECLARE@Vmem dbo.GEN_UDT_INT_mem ,@rst  INT;INSERTINTO@VmemSELECT IdFROM#Temp -- Contain 510000 recordsEXEC dbo.ASelectFunctionUsingTVP @Vmem,@rst OUTPUT;


GO 1000
Viewing all 15911 articles
Browse latest View live


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