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

Page Life Expectency on Numa Node 0 (1 of 2 Numa nodes) resets to 0 every minute for SQL Server 2012 Instance

$
0
0
The SQL instance RPT01 is consistently under internal memory pressure on 1 of the 2 Numa nodes. This is best represented by the PLE perfmon counters:
PLE on Numa Node 0 resets to 0 every 60secs
- Intermittently this causes “A significant part of sql server process memory has been paged out. This may result in a performance degradation….”
PLE on Numa Node 1 keeps growing as expected
- No problem

The Cluster Configuration
· 2 Server Node Windows Server 2012 Failover Cluster
· 9 SQL clustered instances (ranging from SQL 2008 R2 - 2016)
· Each Server Node has 512GB of RAM (typically 300GB always available - every instance has Max Memory constrained)
· 2 Numa Nodes with 12 Core / node with HT enabled (total of 48CPUs)

Problem SQL Instance (RPT01)
· SQL Server 2012 Enterprise Edition (11.0.3000.0)
· Min Memory 0, Max Memory 8GB
· Lock Pages in Memory (LPiM)
· 3 user databases (total size less than 100MB)
· Very low usage

The following changes attempted in troubleshooting(without success)
1. Offlined user databases, stopped SQL Agent (i.e. stopped all known connections to instance)
2. Switched to other node and back again
3. Removed LPiM
4. Increased Max Memory from 8GB to 10GB
5. Cleared Buffer Pool & Cache repeatedly (DROPCLEANBUFFERS & FREEPROCCACHE)



 

performance report

$
0
0

Hi,

We are using SQL Server 2016.

I want to check the performance of server (CPU,Memory,Disk) during 10pm to 4am(night)

How could i get these reports.

Thanks




deadlocks after crash

$
0
0

Hi,

We have our application running fine on SQL Server 2012.

Few days before there was a crash in the server. 

After we restarted the servers and the instance came up. We  are now getting  deadlocks during nightly batch jobs which results in job failures.

Please suggest.





SQL Server 2012 slow startup

$
0
0

Hello-

I recently got a new Windows 10 workstation and our help desk installed SQL Server 2012 SSMS. When try to open SSMS it takes roughly 25-30 to come up. The workstation I had before was running Windows 7 and I had the same problem. I recall that I did some research and discovered that I had to disable/uncheck "Check for server certificate revocation" and "Check for publisher's certificate revocation" in the IE advanced tab. Unfortunately this has not resolved the slow startup of SQL Server on Windows 10. I even went as far as disabling the SQL Server splash screen during execution of SSMS and that basically did nothing. I also tried editing the host file by adding 127.0.0.1 crl.microsoft.com and didn't help either.

I think this has to do with SQL Server attempting to connect to MS website for possible updates, but I could be completely wrong.

I've researched high and low on the internet and I cannot seem to find a solution. 

Does anyone here have any other ideas how to get around this?

Thanks much!

    


Insufficient disk space in filegroup

$
0
0

I have SQL Server 2012 and Windows Server 2012 R2 Standard. I have a database with 108 GB. The log file with 16GB. The log Hard disk has 200Gb and it has free almost 86Gb. The data hard disk has 1,26 TB and it has free more than 256 Gb.

When I try to do anything with the database, just create indexes for example, or compress indexes or tables, I get this error:

Msg 1101, Level 17, State 12, Line 29
Could not allocate a new page for database '' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

When I try to increase the size of the file of the database I get the next error

Msg 5149, Level 16, State 3, Line 5
MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to expand the physical file

In the SQL Instance properties the limit of server memory is more than 2 million GB. 

With a backup it doesn't decrease the log file.

I have cleaned of stuff the data and log database. The hard disk is 5% fragmented.

How could I turn operative again the database?


Linked server using latest OLEDB driver

$
0
0

Hi, I m using the latest oledb driver for linked servers so that it supports multisubnet FCI\AGs and came across this error message:

"Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction."

I get this error message only if I use "Begin distributed transaction", It works well otherwise. Is that the desired behavior?

Thank you!

Default trace retention

$
0
0
Is there a way to change the retention settings on the default trace? For example increase file size or number of files?

Chuck

sql server 2014 cu10

$
0
0

Hi <g class="gr_ gr_104 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="104" id="104">ihav</g> tying to <g class="gr_ gr_31 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="31" id="31">appying</g> cu10 on <g class="gr_ gr_50 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="50" id="50">sql</g> server 2014 sp2 but following error <g class="gr_ gr_97 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="97" id="97">occured</g>

Failed to <g class="gr_ gr_112 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="112" id="112">retrive</g> data for this update


extended event for deadlock graph

$
0
0

are there any way I can get the deadlock graph just like the previous sql profiler trace?

I setup the extended event with database_xml_deadlock_report, but it seems only show the report like in ERROR log.

<deadlock><victim-list><victimProcess id="process7ccb5aaca8" /></victim-list><process-list><process id="process7ccb5aaca8" taskpriority="0" logused="0" waitresource="RID: 5:1:1752:1" waittime="3650" ownerId="18618888" transactionname="user_transaction" lasttranstarted="2018-08-14T15:06:11.257" XDES="0x7ccdd2c458" lockMode="U" schedulerid="1" kpid="42700" status="suspended" spid="106" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2018-08-14T15:06:17.330" lastbatchcompleted="2018-08-14T15:06:17.313" lastattention="1900-01-01T00:00:00.313" clientapp="Microsoft SQL Server Management Studio - Query" hostname="VM-PC" hostpid="23348" loginname="AzureAdmin" isolationlevel="read committed (2)" xactid="18618888" currentdb="5" currentdbname="Salesdb" lockTimeout="4294967295" clientoption1="671090784" clientoption2="390200"><executionStack><frame procname="unknown" queryhash="0x6676cb53aa262ec5" queryplanhash="0x915081bcb99cc4ec" line="2" stmtstart="38" stmtend="164" sqlhandle="0x02000000a783881ed189dae924244024e004c6c09374520e0000000000000000000000000000000000000000"> unknown </frame></executionStack><inputbuf> --4. tran 2: select value, * from B WITH (updlock) where value = 1 or id = 1 --=&gt; DEADLOCK </inputbuf></process><process id="process7cd7225468" taskpriority="0" logused="372" waitresource="RID: 5:1:1744:0" waittime="6874" ownerId="18618247" transactionname="user_transaction" lasttranstarted="2018-08-14T15:06:08.427" XDES="0x7ccdd48458" lockMode="U" schedulerid="1" kpid="35796" status="suspended" spid="109" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2018-08-14T15:06:14.123" lastbatchcompleted="2018-08-14T15:06:14.110" lastattention="1900-01-01T00:00:00.110" clientapp="Microsoft SQL Server Management Studio - Query" hostname="VM-PC" hostpid="23348" loginname="AzureAdmin" isolationlevel="read committed (2)" xactid="18618247" currentdb="5" currentdbname="Salesdb" lockTimeout="4294967295" clientoption1="671090784" clientoption2="390200"><executionStack><frame procname="unknown" queryhash="0x98ced444e1fbfb22" queryplanhash="0x5c32ce3217b0a498" line="2" stmtstart="38" stmtend="120" sqlhandle="0x0200000091486601073a7105abb0cb792ba20da3d8c30d280000000000000000000000000000000000000000"> unknown </frame><frame procname="unknown" queryhash="0x98ced444e1fbfb22" queryplanhash="0x5c32ce3217b0a498" line="2" stmtstart="8" stmtend="80" sqlhandle="0x02000000d38eed0b967f40145435e8a850eaa55d678b338c0000000000000000000000000000000000000000"> unknown </frame></executionStack>

…….

I use the following query :

;with cte AS
(
SELECT object_Name as event_name,event_data=convert(xml,event_data) FROM sys.fn_xe_file_target_read_file('https://myazurestorage20.blob.core.windows.net/xevent/FileName_0_131786986708900000.xel', null, null, null)
)
select 
event_data.value('(event/@timestamp)[1]','datetime') as [eventtime],
event_data.value('(event/data[@name="xml_report"]/value)[1]', 'varchar(max)') as [xmlreport]
from cte where event_name='database_xml_deadlock_report'

and results like the following , and seems the report is broken

SQL Server does not restart after moving TempDB

$
0
0

I attempted to move TempDB to new drives using the following code:

USE master; 
GO 
ALTER DATABASE tempdb  
MODIFY FILE (NAME = tempdev, FILENAME = 'E:\tempdb.mdf'); 
GO 
ALTER DATABASE tempdb  
MODIFY FILE (NAME = templog, FILENAME = 'F:\templog.ldf'); 
GO 
However, when restarting, SQL would not restart.  Modifying the file name back to the original location resulted in SQL Server starting normally again.  I have run the scripts as sa and as an NT Authenticated user with sysAdmin privileges. I have used the code before on other systems and have never had an issue restarting SQL Server.

What other things can I look at to determine why SQL Server will not restart and recognize the new tempDB directories.  As a side note, I also moved a couple of log files for a couple of databases to that F: drive using detach and attached databases and SQL didn't seem to have any issues working with those files. 


Lou Davis Software Engineer E2B Teknologies

SQL server installation Failed

$
0
0

Hi,

we are getting below error while installing SQL server 2012 Enterprise edition on new windows 2012 server.

1) The server was unable to initialize encryption because of a problem with a security library. The security library may be missing. Verify that security.dll exists on the system.

2) TDSSNIClient initialization failed with error 0x139f, status code 0x80. Reason: Unable to initialize SSL support. The group or resource is not in the correct state to perform the requested operation. 

3) TDSSNIClient initialization failed with error 0x139f, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The group or resource is not in the correct state to perform the requested operation. 

4) Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.

5) SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

Regards,

karthik B

sql 2017 - distributed tx timeout

$
0
0

We have legacy app running since SQL, 2012, 2016 and now as of few days ago, SQL 2017. Many tables have triggers that write the 'deleted' row to a separate audit database.  Why separate?  Mostly to simplify backup and DR strategy.

Many of our 'business transactions' involve multiple table updates and so wrapped with BEGIN TRANSACTION and COMMIT (or ROLLBACK) as necessary. It's all worked fine since 2008. Except now as of SQL 2017:  if the business transaction is wrapped in a SQL TRANSACTION then the 'audit' statement times out:

     INSERT auditdb.dbo.tbxXXX SELECT * FROM deleted;

If there is no TRANSACTION then the 'audit' statement works correctly.  This is a crisis issue for us - either we remove TRANSACTION support -  a major change and data integrity exposure, or we are forced to merge the databases - another major change with backup / DR risks

Anyone else having this issue?


Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Error 5120

$
0
0

I am trying to attach a database to SQL 2005. This database has not previously been attached. I have only just installed SQL.

 

I get the following message: Unable to open physical file "C:\ArrowSQL\Arr@Data\Arrow_data.mdf" Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".

 

I have loaded SQL and the database fiel and directory with the same user acccount which is a local adminstrator ont hsi machine. I have checked that I have read/write access to the file.

 

The machine runs Windows Vista Business. SQL has SP 2 loaded.

 

What causes this?

What is this wait_resource?

$
0
0

Greetings. I have a service broker process that does integrity checks on several tables at once, as opposed to one at a time like a normal maintenance plan.

I was just trying to diagnose where any bottlenecks may lie, and notice a lot of the following:

wait_type, wait_resource

LCK_M_X , FILE: 10:0

I know 10 is my database ID, but what is the 0? Typically this value is the file ID, but there is no file ID 0. I've been googling this for a while to no avail.


Thanks in advance! ChrisRDBA

DB file shrink is not happening !!

$
0
0

Hi Experts,

In one of our database, Apps team has deleted huge number of records to free some space in the DB and now Available free space in DB is ~ 274 GB but we are not able to shrink file and release its space to OS.

Shrink is really required now as we are running out of space on the drive and Storage addition is a big challenge for some limitations in our case.




we tried DBCC SHRINKFILE with reorganize option,we cannot rebuild all indexes now since we are already running out of space.

Can you please advise,what is the best possible option to take this forward and complete shrink process and reclaim its space to OS ?

Regards,

Naren poosa.


Narendar Poosa



SQL Server Audit

$
0
0
 Hi, I m trying to find the best way to audit the tables usage in a database. Something like log all the select statements, Loginame and time of the query start into a file or table. Created SQL Server Audit for few tables and it works great. But the question is how scalable this solution is? Is there any performance impact if we enable this on few databases on a busy server? 

SQL Server GDR vs CU

$
0
0

Nowadays, is the GDR patch including previous CU ?

for example SQL 2016

SQL Server 2017 CU9 (14.0.3035.2) MODIFY FILE encountered operating system error 31(A device attached to the system is not functioning.) while attempting to expand the physical file

$
0
0

Hello, 

I'm trying to restore a database to Linux SQL Server, The drive is formated as XFS so is under the list of supported items, however, I'm getting the following error:

Msg 5149, Level 16, State 3, Line 1
MODIFY FILE encountered operating system error 31(A device attached to the system is not functioning.) while attempting to expand the physical file '/var/opt/mssql/data/TestDB.mdf'.

Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

My Command for restore:

RESTORE DATABASE TestDB
FROM DISK = '/var/opt/mssql/backup/TestDB.bak'
WITH MOVE 'TestDB' TO '/var/opt/mssql/data/TestDB.mdf',
MOVE 'TestDB_Log' TO '/var/opt/mssql/data/TestDB_Log.ldf'

Anyone able to help with this?

Thank you.


Urgent 2005: Linked Server data doesn’t match expected length for column

$
0
0

 

I’m hoping someone can help me here because I’ve hit a HUGE issue migrating from SQL Server 2000 to 2005. We just upgrade TEST to SQL 2005 (on Prod we are still 2000). On both I have a linked server pointed to the same Cache database (InterSystems Cache - not a fan, but the vendor uses it).

 

On PROD everything works fine but on TEST we are seeing a huge issue. On some of the cache tables they under state the actual length of the data to be returned. In turn we are seeing the following error message being returned by SQL Server:

 

**********************

Msg 7347, Level 16, State 1, Line 1

OLE DB provider 'MSDASQL' for linked server '-X-' returned data that does not match expected data length for column '[MSDASQL].SecurityText'. The (maximum) expected data length is 32, while the returned data length is 35.

**********************

 

This is apparently tied to inaccurate Meta Data being sent to SQL. I even used Cache Monitor (a tool for quering Cache database) to verify the Meta Data and it does show the Cache database is stating the data will be no longer than 32 (though some of the data returned is of length 35).

 

Okay, Cache shouldn’t be returning in accurate Meta Data for sure. However, I can’t do anything about this. I can’t make changes on the Cache side due to vendor related matters.

 

With all that said, SQL 2000 (we have the latest SP) has no issue with the bad Meta Data, it just ignores it. So I did some checking around and found out that SQL 2000 had the same issue. Here is a link to the KB article (http://support.microsoft.com/kb/920930) with the exact error message we are seeing for the exact situation. There is a fix but for SQL 2000.

 

I also found others are running into the same issue with linked servers on 2005. Here a link to one of a few I found (http://www.sqlservercentral.com/Forums/Topic473552-146-1.aspx).

 

Does anyone have any ideas as to what I can/should do? I have no options on the Cache side so I have to find some way to make SQL Server 2005 behave as 2000 did when running into this issue.

 

This is a show stopper for our production environment because we pull so much information out from the vendor database over the linked server. So I am desperate.

 

Thank you in advance for any help or feedback you can provide.

 

Steve 

INSERT statement conflicted with the FOREIGN KEY constraint. The statement has been terminated.

$
0
0

Hi all,

I get this error when inserting data...

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Participant_Log_BiometricInstance_Participant_Activities". The conflict occurred in database "ProvantCustomerPortal", table "dbo.Activities", column 'Id'.
The statement has been terminated.

My query looks like this 

insert into [dbo].[Participant_BiometricInstance](ParticipantId, ActivityId, ProviderTypeId, Fasting, ExternalSystemId, ResultsDate, ModifiedBy, ModifiedDate)
select participantID,'','','',NULL,getdate(),NULL,getdate() from [dbo].[Participant_Profile]
union all 
select '',id,'','','','','','' from [dbo].[Activities]
union all
select '','',id,'','','','','' from [dbo].[Log_ProviderType]

ParticipantID, ActivityId, ProviderTypeId are Foreign Keys.

Id is primary key in Activity table

Id is primary key in Log_ProviderType.

Does anyone know how can we solve this?


Viewing all 15264 articles
Browse latest View live


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