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

SQL Licencing for Training databases

$
0
0
I have couple of databases that are used for training classes  every now and then,,   do i have to host these on a prod server  with SQL licence  or can they be treated as a non prod  Databases ?

what's actually CMEMTHREAD

$
0
0

https://www.sqlskills.com/help/waits/cmemthread/

what's actually "TREAD-safe-memory-object" ?

max worker thread

$
0
0

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

$
0
0

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

$
0
0

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_string

WITH 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 ) 


Msg 105083, Level 16, State 1, Line 13
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

$
0
0
how to associate a sql server database to an MSDN subscription

The operating system returned error 21

$
0
0

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

$
0
0

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

$
0
0

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

$
0
0
Does anyone have an understanding to explain a CXSYNC_PORT wait type on Azure SQL Managed Instance (MI). Or where good online information can be found?

MSSQL in-memory : snapshot or no snapshot

$
0
0

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

$
0
0

so which code is blocking this procedure to natively compile 

auto update stats : sample

$
0
0

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

$
0
0

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%+

$
0
0

Hi All

I am using Azure SQL, while performance tuning I found one of the queries generated execution plan value more than 140%

Query plan attached, Can you help me to understand if its a bug and can be fixed or something new in SQL engine.

Query Plan greater than 100%


Thanks

Saurabh Sinha

Blog TwitterLinkedInGallery Facebook 




The network name cannot be found at System.Data.SqlTypes.SqlFileStream.OpenSqlFileStream

$
0
0

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

$
0
0

I am reading this DOC. 

https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault?view=sql-server-ver15&tabs=portal

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?

$
0
0

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

$
0
0

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 ?

SQL Server soft-numa

$
0
0
If the server has 2 socket and each has 8 phyiscal core per each. and enable hardware numa. So SQL Server 2016 will still do the auto-software numa configuration during startup ?
Viewing all 15930 articles
Browse latest View live


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