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

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


Disadvantage of self-referencing Linked Server

$
0
0

We have consolidated our env, however quite a few sp's & other code are still using 4 part naming convention and accessing the linked server which is self-refencing now (points back to itself), I have been looking online to see if there is a performance impact of it and haven't found much other than a few CPU cycles which are used for it, and was wondering if there is a doc/ info out there which entails the disadvantages so that I can show it to the app so that they can fix the code faster, imo we should be doing it as it is to keep the env simple and because the few cpu cycles can add up , Are there any other issues of it? Thanks.


D

Restore sql server 2016 database to 2008 R2

$
0
0

Hello everyone,

I have a problem while restoring an sql server 2016 database to 2008, tha size of the database is13GO.

I tried the generate script wizard but the script is too big and it doesn't migrate all of my data , i found that some tables are still empty.

While searching i found thant i can use SSIS to migrate data but i have to match all the tables between source and destination database which is a lot of work for me because the database has a lot of tables,

Is there any method or solution to restore the database on sql server 2008 R2?

Thank you for your help

proactive performance metric list of points - threshold levels on each components

$
0
0

Hi 

I am looking  proactive performance   monitoring and thresholds to flag if something is going wrong with this.  I understand all SSMS -reports -> standared reports   ->  has bunch of reports . so none of them has say threshold level .

ex: page life  expectancy level  best level and flag in if going down 

      SQL use CPU and what is threshold level (before business call performance issue)

      TOP SQL  shows high CUPs ,but  system is responding good.  So justifying with evidence (basically threshold levels if can set)

 

If any one can advice would be  a load of thanks 

Ashwan

Filestream feature not working on cluster instance

$
0
0

Hi,

I have the new 3 node FCI SQL Server Cluster (SQL Server Enterprise 2019 on Win Server 2019). The first and second node are also the primary replica in the always on topology. Filestream were configured (level 3 remote client access) during installation without any problems. After we restored filestream database, we get error in the application (after call stored procedure for get PathName() and Get_filestream_transaction_context(). The procedure return PathName value.

======================================================

The device is not ready
=======================================================
Iznimka = System.ComponentModel.Win32Exception (0x80004005): The device is not ready
   at System.Data.SqlTypes.SqlFileStream.OpenSqlFileStream(String path, Byte[] transactionContext, FileAccess access, FileOptions options, Int64 allocationSize)
   at System.Data.SqlTypes.SqlFileStream..ctor(String path, Byte[] transactionContext, FileAccess access, FileOptions options, Int64 allocationSize)

The configuration manager values on FILESTREAM tab is all enabled, only the last one "Enable remote client access to Filestream data" is grey out but checked.

I have try to disable and then again enable the filestream in the configuration manager , and after enabling I got error

"The specified Filestream share name does not match the file share resource on the current failover cluster. Change the FIlestream share name to match (0x800713b8)"

In the registry is stored value correct value  for the share.

I can manual change the registry and then the filestream is enabled but is not working, we have same error.

In Failover manager when we want to check the properties of the file share, we get error "unable to load information for the share" and also in the SSMS, Server properties Share name is blank.

I have installed CU5 for SQL server 2019, and run repair installation of the SQL Server. In SQL log we do not have any errors.

Please help, is it  bug or something,I'm out of any idea regarding this problem.

Kind Regards

Darko



Shutdown active/active cluster

$
0
0

For disk maintenance, I need to shut down both nodes of a SQL 2014 active/active cluster (DB + AS services). Not only maintenance mode for FCI but both VMs shutdown (infrastructure requirement).

I am thinking:

  1. Shutdown applications
  2. Failover one node to other (2 instances on one node). Then can shutdown VM1.
  3. On remaining VM stop all services from SCCM
  4. Shutdown VM2

It is not clear for me if I should run PS Stop-cluster after stopping SQL services and before last VM shutdown(between step 3 and 4)

After restart instances will start on first node. Then just failover to proper nodes as needed.

Is this correct, or what are the best practices?

Thank you,

Thank you,

SQL Server 2017 (RTM-CU21) (KB4557397) getting restarted automatically without any errors in error logs and even event viewer

$
0
0
SQL Server 2017 (RTM-CU21) (KB4557397) Standard edition  getting restarted automatically without any errors in error logs and even event viewer except below posted errors. this is happening recently with a set of job steps running but when we re run the job steps again the job is running with out any issue. Could you please help me on this



Faulting application name: sqlservr.exe, version: 2017.140.3335.7, time stamp: 0x5ee471ae
Faulting module name: ntdll.dll, version: 6.3.9600.19304, time stamp: 0x5c7f684f
Exception code: 0xc0000374
Fault offset: 0x00000000000f1cd0
Faulting process id: 0x18d8
Faulting application start time: 0x01d65aa6458baa31
Faulting application path: C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 630ed0ff-c69a-11ea-8121-005056b84d69
Faulting package full name: 
Faulting package-relative application ID: 

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

$
0
0

Dear colleague's,

I run SQL Server 2019 Developer edtion on my local Windows 10 Enterprise development machine.

Full version info:

Microsoft SQL Server 2019 (RTM-GDR) (KB4517790) - 15.0.2070.41 (X64)   Oct 28 2019 19:56:59   Copyright (C) 2019 Microsoft Corporation  Developer Edition (64-bit) on Windows 10 Enterprise 10.0 <X64> (Build 18363: ) 

I loaded a backup of one of our customers because he had a problem. The select query below gives the error "There is insufficient system memory in resource pool 'internal' to run this query." My SQL Server has 11 GB Memory assigned to it. If I recompile the function "Get_LookupDescription" without changing a letter of code, the query is ready in a jiffy and returns no rows at all. Even when I try to only Display the Estimated Execution plan, I get the insufficient memory error. I thought that the query itself wasn't executed if you only wanted to know the estimated execution plan. Does anybody have any idea what might be going on? The customer can work because I recompiled the function on his system. Luckily, I had a backup of the database that reproduces the problem every time I load it.

CREATE TABLE [dbo].[FieldValues]
(
  [TableId]       int NOT NULL,
  [PrimKey]       nvarchar(255) NOT NULL,
  [FieldDefCode]  nchar(15) NOT NULL,
  [LookupValue]   nvarchar(25) NULL,
  CONSTRAINT [PK_FieldValues] PRIMARY KEY CLUSTERED ([FieldDefCode], [TableId], [PrimKey])
);
GO

CREATE TABLE [dbo].[LookupFieldDefinitions]
(
  [TableId]        int NOT NULL,
  [FieldDefCode]   nchar(15) NOT NULL,
  [RefTableId]     int NOT NULL,
  [DefaultLookup]  nvarchar(25) NULL,
  CONSTRAINT [PK_LookupFieldDefinitions] PRIMARY KEY CLUSTERED  ([TableId], [FieldDefCode])
);
GO

CREATE TABLE [dbo].[Parts]
(
  [PartCode]     nchar(15) NOT NULL,
  [Description]  nvarchar(30) NOT NULL,
  CONSTRAINT [PK_Parts] PRIMARY KEY CLUSTERED ([PartCode])
);
GO

CREATE TABLE [dbo].[Employees]
(
  [EmpId]  nchar(8) NOT NULL,
  [Name]   nvarchar(30) NOT NULL,
  CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED ([EmpId])
);
GO

CREATE FUNCTION dbo.Get_LookupDescription
  ( @TableId  int           = NULL
  , @PrimKey  nvarchar(255) = NULL
  )
RETURNS nvarchar(255)
AS   
BEGIN  
  DECLARE @LookupDesc  nvarchar(255) = N'';

  IF @TableId = 12
    SELECT @LookupDesc = [Description] FROM dbo.Parts WHERE PartCode = @PrimKey
  ELSE IF @TableId = 13
    SELECT @LookupDesc = [Name] FROM dbo.Employees WHERE EmpId = @PrimKey
  ;

  RETURN @LookupDesc;  
END;
GO

DECLARE
  @TableId  int           = 12
, @PrimKey  nvarchar(255) = N'006131-0043'
BEGIN
  SELECT dbo.Get_LookupDescription(DEF.RefTableId, ISNULL(VAL.LookupValue, DEF.DefaultLookup)) AS LookupDescValue
  FROM LookupFieldDefinitions AS DEF WITH (READUNCOMMITTED)
  LEFT OUTER JOIN dbo.FieldValues AS VAL
    ON VAL.FieldDefCode = DEF.FieldDefCode
    AND VAL.TableId = DEF.TableId
    AND VAL.PrimKey = @PrimKey
  WHERE DEF.TableId = @TableId
END;
GO



QueryStore: sys.query_context_settings

$
0
0

How to decode the set_options columns in sys.query_context_settings ?

default_schema_id is -2 means what ???

UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered. Master

$
0
0

I am getting the following event every minute in the event log:

UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered. Master

+System
-Provider
[ Name] MSSQLSERVER
-EventID17053
[ Qualifiers] 49152
Level2
Task2
Keywords0x80000000000000
-TimeCreated
[ SystemTime] 2012-07-07T10:55:22.000000000Z
EventRecordID4171276
ChannelApplication
ComputerClinSQL.clinlogix.com
Security
-EventData
UpdateUptimeRegKey
5(Access is denied.)
9D420000100000000800000043004C0049004E00530051004C000000070000006D00610073007400650072000000

Binary data:

In Words

0000: 0000429D 00000010 00000008 004C0043
0008: 004E0049 00510053 0000004C 00000007
0010: 0061006D 00740073 00720065 0000

In Bytes

0000: 9D 42 00 00 10 00 00 00 B......
0008: 08 00 00 00 43 00 4C 00 ....C.L.
0010: 49 00 4E 00 53 00 51 00 I.N.S.Q.
0018: 4C 00 00 00 07 00 00 00 L.......
0020: 6D 00 61 00 73 00 74 00 m.a.s.t.
0028: 65 00 72 00 00 00 e.r...

-<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
-<System>
<ProviderName="MSSQLSERVER" />
<EventID Qualifiers="49152">17053</EventID>
<Level>2</Level>
<Task>2</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreatedSystemTime="2012-07-07T10:55:22.000000000Z" />
<EventRecordID>4171276</EventRecordID>
<Channel>Application</Channel>
<Computer>ClinSQL.domain.com</Computer>
<Security/>
</System>
-<EventData>
<Data>UpdateUptimeRegKey</Data>
<Data>5(Access is denied.)</Data>
<Binary>9D420000100000000800000043004C0049004E00530051004C000000070000006D00610073007400650072000000</Binary>
</EventData>
</Event>

Appears to be with the Master database. I tried changing the SA password but did not correct the problem.

Any ideas?

differences in the query plan xevent ?

$
0
0

what's the following difference ?

QueryStore : MEMORYCLERK_QUERYDISKSTORE_HASHMAP

$
0
0

It what kind of situation that the MEMORYCLERK_QUERYDISKSTORE_HASHMAP memory clerk will keep growing 

suppose , the flush frequency is default 15mins 

SQL Agent fails to run via schedule but succeeds if run manually - why??

$
0
0

Hello,

I have a SQL Agent job that runs a simple stored procedure to execute "sp_send_dbmail".  I have configured the "Schedule Type" to "Start automatically when SQL Agent starts".  Essentially whenever the SQL Server is rebooted or the SQL Agent is restarted, I want to know about it via an email.  

This job always fails with this message "Unable to connect to SQL Server '(local)'.  The step failed." when it runs.  However if I manually trigger the job, it always succeeds.  Also, I logged on to the server using the same credential that runs the job and it worked fine as well.  It only fails when it's unattended.

Can someone tell me why?

Thanks


[Announcement] SQL server related Forums will be migrated to a new home on Microsoft Q&A!

$
0
0

This SQL Server related Forum will be migrated to a new home on Microsoft Q&A!

We’ve listened to your feedback on how we can enhance the forum experience. Microsoft Q&A  allows us to add new functionality and enables easier access to all the technical resources most useful to you, like Microsoft Docs and Microsoft Learn. 

Now until Aug 23, 2020:

From Aug 24, 2020 until Sep 7, 2020:

  • New posts – We invite you to post new questions in the “SQL Server” forum’s new home on Microsoft Q&A. The current forum will not allow any new questions.
  • Existing posts – Interact here with existing content, answer questions, provide comments, etc.

Sep 7, 2020 onward:

  • This forum will be closed to all new and existing posts and all interactions will be in Microsoft Q&A.

We are excited about moving to Microsoft Q&A and seeing you there.  


""SQL Server related"" forum will be migrated to a new home onMicrosoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server!
For more information, please refer to the sticky post.

What if we disable DPT_ENTRY_LOCK in SQL server 2016 in an always on replica instance?

$
0
0

Hey Team,

What if we disable 'DPT_ENTRY_LOCK' in SQL server 2016? we are facing performance issues and can see this is the top wait type during the incident. What is the impact of disabling this Lock?

I believe it can be disabled via the following trace flag.

Quote:

If you are experiencing this wait type as one of the highest waits on your AG secondaries, you can disable parallel redo by turning on trace flag 3459 using� DBCC TRACEON (3459, -1), or adding it as a startup trace flag using the Configuration Manager. The trace flag does not come into effect until the instance is restarted.

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


Regards, Ashif Shaikh


Live execution plan disappear

$
0
0

Any chance that the Live execution plan disappear option is disappear in Activity monitor ?

Restore of Sqlserver Agent jobs from system databases

$
0
0
Can sqlserver Agent jobs be restored or generated from system databases?

2016 SP2 Azure VM TDE database backup causing huge issues

$
0
0

hi folks:

  Our Azure VM SQL is using 2016 SP2 entCU8. We have a list of databases with TDE enabled and backup was using compression with the following parameters

WITH  FORMAT, COMPRESSION, MAXTRANSFERSIZE = 4194304, BLOCKSIZE = 65536, STATS = 1

for smaller databases less than 1TB , they went through without an issue. 

For bigger dbs over 1TB, one is with 2TB and the other was  8TB. It was causing huge I/O async waitype to the point it caused

locks to many processes and we have to stop it. 

has anyone  seen such issue before and any suggestions? 

We are also in contact with MSFT premier support and initial words was that at one point of time, disk performance dropped dramatically and we've asked all teams but they said no schedule jobs running during that backup time . We've verified and confirmed. 

One thing I noticed that these two big databases, VLF size is over 20G though Active VLF size is under 200MB

I know that it is not recommended to backup tlog with over 4G VLF, does that apply to full back? 

Cheers

HS


sql server 2017 very slow performance

$
0
0

Hi,

I've moved to new server with Win 2019 and SQL 2017 STD on SSD disk from old server with Win 2008 and SQL 2008 STD and my performance is very very poor. I've a query that i run on both server and on SQL 2008 it runs 1sec but on SQL 2017 it runs 5sec. what i try - install latest CU21,change comp level to 110,120,130,140 change max dop and parallelism, update stats,rebuild indexs,clear cache,try all those trace flags OPTION (QUERYTRACEON 4199,QUERYTRACEON 4136,QUERYTRACEON 4137,QUERYTRACEON 9481),restart server and more.. nothing help.. the only thing that helps is if i add to the query the OPTION  (RECOMPILE) and change the comp level to 110 it runs 1sec.

why is that? what i'm missing here?

THX


Avi.G

Check db error

$
0
0

Msg 8935, Level 16, State 1, Line 3
Table error: Object ID 1470628282, index ID 3, partition ID 72057594045333504, alloc unit ID 72057594051231744 (type In-row data). The previous link (1:34611616) on page (1:34074381) does not match the previous page (1:34659257) that the parent (1:34374925), slot 55 expects for this page.
Msg 8935, Level 16, State 1, Line 3
Table error: Object ID 1470628282, index ID 3, partition ID 72057594045333504, alloc unit ID 72057594051231744 (type In-row data). The previous link (1:34057176) on page (1:34611616) does not match the previous page (1:34659256) that the parent (1:34374925), slot 53 expects for this page.
Msg 8925, Level 16, State 1, Line 3
Table error: Cross object linkage: Page (1:34374925), slot 52, in object ID 1470628282, index ID 3, partition ID 72057594045333504, alloc unit ID 72057594051231744 (type In-row data), refers to page (1:34659256), slot 0, in object ID 1470628282, index ID 1, partition ID 72057594042318848, alloc unit ID 72057594046971904 (type In-row data).
Msg 8937, Level 16, State 1, Line 3
Table error: Object ID 1470628282, index ID 1, partition ID 72057594042318848, alloc unit ID 72057594046971904 (type In-row data). B-tree page (1:34659256) has two parent nodes (0:1), slot 0 and (1:5064304), slot 34.
Msg 8925, Level 16, State 1, Line 3
Table error: Cross object linkage: Page (1:34374925), slot 54, in object ID 1470628282, index ID 3, partition ID 72057594045333504, alloc unit ID 72057594051231744 (type In-row data), refers to page (1:34659257), slot 0, in object ID 1470628282, index ID 1, partition ID 72057594042318848, alloc unit ID 72057594046971904 (type In-row data).
Msg 8937, Level 16, State 1, Line 3

CHECKDB found 0 allocation errors and 6871 consistency errors in table 'database' (object ID 1806629479).
CHECKDB found 0 allocation errors and 6877 consistency errors in database 'database'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (database).

Completion time: 2020-08-04T15:34:41.8014673-05:00

Do we need to correct any issue with this error?

Viewing all 15930 articles
Browse latest View live


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