SQL Licencing for Training databases
what's actually CMEMTHREAD
https://www.sqlskills.com/help/waits/cmemthread/
what's actually "TREAD-safe-memory-object" ?
max worker thread
If I have a server have 16 cores , 64 bits, can I tune max worker thread (instance setting) to 1000 ?
And if calculating max worker thread will be using physical core or logical core or the CPU ?
sys.dm_os_memory_pools pool_id
https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-os-memory-pools-transact-sql?view=sql-server-ver15
By default pool_id 0 is internal pool and pool_id 1 is default pool ?
PolyBase : Access Data in cosmodb using mongodb fails with error
Hi All,
I am trying to access data in my azure cosmosdb using SQL Server PolyBase (cosmosdb was created using "Azure Cosmos DB for MongoDB API)
I am able to connect and access documents using mongo shell. However when trying to create external table, getting below error.
Searched though PolyBase logs and could not find any useful information which can help troubleshoot the issue.
Hence posting it here.
SQL Server version : Microsoft SQL Server 2019 (RTM-CU4) (KB4548597)
CREATE DATABASE SCOPED CREDENTIAL azure_cosmos_db_cred_using_mongodb_connect_stringWITH IDENTITY = 'username',
Secret = 'Key';
CREATE EXTERNAL DATA SOURCE AZ_CosmosDB_mongodb_connect
WITH (
LOCATION = 'mongodb://comsodb.mongo.cosmos.azure.com:10255',
CREDENTIAL = azure_cosmos_db_cred_using_mongodb_connect_string )
CREATE EXTERNAL TABLE Cosmosdb_doc_mongodb_test (
[_id] NVARCHAR(24) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[id] NVARCHAR(100) COLLATE SQL_Latin1_General_CP1_CI_AS
)
WITH
(
LOCATION='sgcosdb.sgcosdbcnt',
DATA_SOURCE = AZ_CosmosDB_mongodb_connect )
105083;The following columns in the user defined schema are incompatible with the external table schema for table 'Cosmosdb_doc_mongodb_test': user defined column: 'id' was not found in the external table. The detected external table schema is: ([_id] NVARCHAR(24) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL).
MSDN subscription
The operating system returned error 21
The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset 0x00000000440000 in file 'T:\Trans\ReportServer.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level 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.
How do I correct this issue?
USE
master;
SELECT
name'Logical Name',
physical_name
'File Location'
FROM
sys.master_files;
Logical Name File Location
ReportServer T:\Trans\ReportServer.mdf
ReportServer_log F:\Log\ReportServer_log.ldf
There is no T:\Trans\ReportServer.mdf path in the database server
Online rebuild index
for online rebuild index , I am reading the following links
https://docs.microsoft.com/en-us/sql/relational-databases/indexes/how-online-index-operations-work?view=sql-server-ver15
And see if which part will be using tempdb ? source ? target ?
Multipage allocation vs Large Pageallocation
May I know Multipage allocation vs Large Pageallocation are the same concept ?
Any example of what type of Multipage allocation are?
I check in my sys.dm_os_memory_clerks that column page_sizes_in_bytes are all 8192 .
Azure MI SQL Server Wait Type CXSYNC_PORT
MSSQL in-memory : snapshot or no snapshot
For select/update a memory optimized table, what's the difference of having or not having table hints SNAPSHOT ?
How to interpret Native Compilation Advisor report
so which code is blocking this procedure to natively compile
auto update stats : sample
Are there any threshold that the auto update stats will use FULL scan or default sample size ?
I see some small tables, (around 10k rows), will trigger auto update stats with full scan.
Index Reorganize during Database Full Backup
Index Maintenance usually starts 3 Hours before the database full backup and ends before the Full Backup Start.
The Database is in Simple Recovery Model.
Last weekend the Index Maintenance took more than 5 Hours and the Full backup was running at the same time.
We have noticed that since the Full backup started the Transaction Log File started to grow every 30 Seconds until it filled the Disk and Both Full Backup and Maintenance was failed due to insufficient Disk space for log file.
Why when the Backup started while Index Reorganize is running made this happen to the Transaction Log File?
Regards
Cost in Execution Plan summing up more than 100% , its some where 140%+
The network name cannot be found at System.Data.SqlTypes.SqlFileStream.OpenSqlFileStream
Hi,
I have 3 Node SQL AOAG Cluster.
Recently , while trying to check the Application status , I started seeing below error in previous primary (AG Replica1) where as the status is working in now primary (previous secondary AG Replica2). Please share some thoughts on the issue below.
Internal error occurred in sync. Please see details for contextual information.
Organisation.RE.APP.Sync.Common.Exceptions.SyncCriticalSqlException: Critical issue requires administrative attention. ---> System.REta.SqlClient.SqlException: The network name cannot be found ---> System.ComponentModel.Win32Exception: The network
name cannot be found
at System.REta.SqlTypes.SqlFileStream.OpenSqlFileStream(String path, Byte[] transactionContext, FileAccess access, FileOptions options, Int64 allocationSize) at System.REta.SqlTypes.SqlFileStream..ctor(String path, Byte[] transactionContext, FileAccess
access, FileOptions options, Int64 allocationSize) at System.REta.SqlTypes.SqlFileStream..ctor(String path, Byte[] transactionContext, FileAccess access) at Organisation.RE.APP.Framework.Implementation.REta.SqlFileStreamHelper.GetSqlFileStream(String
PstrFileStreamPath, Byte[] PabyTransactionContext, FileAccess PeFileAccess)
CreateChangeBatch: Critical issue requires administrative attention.
The network name cannot be found
The network name cannot be found
Best Regards,SQLBoy
TDE with Keyvault
I am reading this DOC.
Just not quite understand the following steps?
Why it's required to have another login to map for the credential to open the keyvault ?
And TDE_Login is a sql login,,,, can use Domain login ?
So this is the private key or public key ? and which steps in the docs really create a key in the key vault ?
Safely stop full text catalog population?
SQL Server 2008 R2
We noticed that one of our full text catalogs was incorrectly set to "Do not track changes" with a "Last population date" set months ago. As soon as we set the Track changes setting to "Automatic", the Population status went to "Incrementally populating catalog"
The issue for us is that this is early morning of a work-day and it has rendered all file I/O access to result in Timeouts.
Is there a way to safely stop the population and resume it at a later time?
This catalog has a single table with 2 fields selected that are of data type: nvarchar(1000) and Image, which are BLOB's that represent the files our user's are now unable to access.
max worker thread
If I have a server have 16 cores , 64 bits, can I tune max worker thread (instance setting) to 1000 ?
And if calculating max worker thread will be using physical core or logical core or the CPU ?