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

Error while applying Cu10

$
0
0

Hi,

I have Production on 4 node cluster: Node1,Node2,Node3 and Node4.

I moved all the database to Node1 and Node4 and start applying cu10 on Node2 and Node3 parallely.

The status for all the databases in Failed, and the logfile has below messages

--------------------------------------------------------------------

=== Verbose logging started: 8/16/2014  7:11:54  Build type: SHIP UNICODE 5.00.7601.00  Calling process: c:\18d302220e5db0e596\x64\ScenarioEngine.exe ===
MSI (c) (5C:10) [07:11:54:132]: Resetting cached policy values
MSI (c) (5C:10) [07:11:54:132]: Machine policy value 'Debug' is 0
MSI (c) (5C:10) [07:11:54:132]: ******* RunEngine:
           ******* Product: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Update Cache\KB2954099\QFE\1033_ENU_LP\x64\setup\sqlsupport_msi\SqlSupport.msi
           ******* Action: 
           ******* CommandLine: **********
MSI (c) (5C:10) [07:11:54:132]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (5C:10) [07:11:54:132]: Grabbed execution mutex.
MSI (c) (5C:10) [07:11:54:148]: Cloaking enabled.
MSI (c) (5C:10) [07:11:54:148]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (5C:10) [07:11:54:148]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (78:14) [07:11:54:148]: Running installation inside multi-package transaction C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Update Cache\KB2954099\QFE\1033_ENU_LP\x64\setup\sqlsupport_msi\SqlSupport.msi
MSI (s) (78:14) [07:11:54:148]: Grabbed execution mutex.
MSI (s) (78:B0) [07:11:54:164]: MainEngineThread is returning 1603
MSI (s) (78:14) [07:11:54:164]: User policy value 'DisableRollback' is 0
MSI (s) (78:14) [07:11:54:164]: Machine policy value 'DisableRollback' is 0
MSI (s) (78:14) [07:11:54:164]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (78:14) [07:11:54:164]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (78:14) [07:11:54:164]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (78:14) [07:11:54:164]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s) (78:14) [07:11:54:164]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s) (78:14) [07:11:54:164]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (s) (78:14) [07:11:54:164]: Restoring environment variables
MSI (c) (5C:10) [07:11:54:164]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (5C:10) [07:11:54:164]: MainEngineThread is returning 1603
=== Verbose logging stopped: 8/16/2014  7:11:54 ===

-----------------------------------------------------------------------------------------------

Please help

REgards


Bilal


Link Server temp table

$
0
0

Hi All. Any one if we have a link server. Can we select a temp table from a link server?

like the follwing:

select * from serverA.tempdb.dbo.#temptable??

Query optimizer and techniques

$
0
0

This is a general/generic question, if there is a clustered index and multiple non-clustered indexes which index does the query optimizer pick to retrieve the results.

I guess query optimizer picks non-cluster index scan over clustered index scan for a "select count(*) from table" if that is so which non-clustered index does it pick? I don't have any table to exemplify. So let me know what happens in general. Thanks in advance.


svk

SQLServer Memory Architecture

$
0
0

Hi All,

How To check How much Buffer cache using query in sqlserver.

Splitting TempDB into multiple data files.

$
0
0
To avoid contention we have to split tempdb into multiple data files. But as for case suppose, there is 20 GB total space is on the drive containing 1 tempdb data file of 15 GB. And I have to create 3 more tempdb data files, and as recommendation all files should be of same size.Then how to handle this situation and configure all data files with same size?

Pranshul Gupta

Foreign Key Constraint

$
0
0
When I try to add Foreign key (Graphically & using query),it shows this error-
Msg 547, Level 16, State 0, Line 1
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "tblePerson_GenderId_FK". The conflict occurred in database "dbnews", table "dbo.tblGender", column 'id'.
How to solve this problem?
I am using SQL SERVER-2012

restore database to azure blob failed

$
0
0

Hi experts,

  I create a test db in SQL on Azure VM and backup to my storage account successfully. However, when I delete the database and restore using the T-SQL below, it failed. Please help.

--- query ---

USE [master]
RESTORE DATABASE [test] FROM  
URL = N'https://sa1qcisapdr.blob.core.windows.net/tcd-sql2014/test_backup_2014_08_18_013128.bak' 
WITH  CREDENTIAL = N'AzureCredential' ,  FILE = 1,  
MOVE N'test' TO N'https://sa1qcisapdr.blob.core.windows.net/tcd-sql2014//test.mdf',  
MOVE N'test_log' TO N'https://sa1qcisapdr.blob.core.windows.net/tcd-sql2014//test_log.ldf',  NOUNLOAD,  STATS = 5

GO

--- result ---

Msg 3634, Level 16, State 1, Line 2
The operating system returned the error '50(The request is not supported.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'https://sa1qcisapdr.blob.core.windows.net/tcd-sql2014//test.mdf'.
Msg 3156, Level 16, State 8, Line 2
File 'test' cannot be restored to 'https://sa1qcisapdr.blob.core.windows.net/tcd-sql2014//test.mdf'. Use WITH MOVE to identify a valid location for the file.
Msg 3634, Level 16, State 1, Line 2
The operating system returned the error '50(The request is not supported.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'https://sa1qcisapdr.blob.core.windows.net/tcd-sql2014//test_log.ldf'.
Msg 3156, Level 16, State 8, Line 2
File 'test_log' cannot be restored to 'https://sa1qcisapdr.blob.core.windows.net/tcd-sql2014//test_log.ldf'. Use WITH MOVE to identify a valid location for the file.
Msg 3119, Level 16, State 1, Line 2
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.


Backup job failed

$
0
0

Hi All,

Can anyone suggest to resolve this issue.

Executed as user: S233683-AD01\S233683NJ3SQL05. ...at file already exists.' [SQLSTATE 42000] (Error 22048)  ERROR -- Could not backup database: master - BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 50000)  xp_create_subdir() returned error 183, 'Cannot create a file when that file already exists.'

Thanks in Advance


Not getting Page from Prod server

$
0
0

Hi All,

I have set two pager email Id in my prod server
I have a job when this job succeed then it will send a page to both email ID
Job ran successfully and both Email ID did not get any single page about this
when I checked in operator history in Most recent notification it shows that page has been sent on expected time.

Same I have try with Dev server it's working fine Only difference in Pro and Dev job is: In prod job taking 4 hour and in Dev job taking 5 min.

 

 


TempDB Datafiles Autogrow Configuration?

$
0
0

We configure tempdb follow rules below:

  1. tempdb data files counts equals logical cpu counts
  2. tempdb file and log files initial size is 512mb
  3. the first data file and log file are configured for autogrowth by 521mb; other data files are not configure autogrowth

Is this configuration rule OK, especially for rule 3?

Many thanks. 

Change Data Capture (CDC) cleanup job only removes a few records at a time

$
0
0

Hi everyone, 

Summary of the problem: I'm a beginner with SQL Server. For a project I need CDC to be turned on. I copy the cdc data to another (archive) database and after that the CDC tables can be cleaned immediately. So the retention time doesn't need to be high, I just put it on 1 minute and when the cleanup job runs (after the retention time is already fulfilled) it appears that it only deleted a few records (the oldest ones). Why didn't it delete everything? Sometimes it doesn't delete anything at all. After running the job a few times, the other records get deleted. I find this strange because the retention time has long passed.

Entire explanation of what I did: I set the retention time at 1 minute (I actually wanted 0 but it was not possible) and didn't change the threshold (= 5000). I disabled the schedule since I want the cleanup job to run immediately after the CDC records are copied to my archive database and not particularly on a certain time.
My logic for this idea was that for example there will be updates in the afternoon. The task to copy CDC records to archive database should run at 2:00 AM, after this task the cleanup job gets called. So because of the minimum retention time, all the CDC records should be removed by the cleanup job. The retention time has passed after all?
After a suggestion I just tried to see what happened when I set up a schedule again in the job (with a retention time of an hour this time), like how CDC is meant to be used in general. I had 3 records in that table. I changed 2 records at the same time and a few minutes later another record. After the time has passed I checked the CDC table and turns out it also only deletes the oldest record. I set another schedule again and then it deleted another record (the 2nd record of the 2 that I updated at first). Why aren't they purged all at once? What am I doing wrong?

I made a workaround where I made a new job with the task to delete all records in the CDC tables (and disabled the entire default CDC cleanup job). This works better as it removes everything but it's bothering me because I want to work with the original cleanup job and I think it should be able to work in the way that I want it to.

Thanks,

Kim

PS. I made a tread like this in sql server 2014 yesterday, but it has like 10 views or so. I  thought that this subforum would be appropriate as well. If it's not allowed, I can delete the other thread ofcourse.  

Windows 2008 Standard 32bits PAE

$
0
0

Hi All. I am trying to turn on PAE on windows 2008 Standard 32bits.

i use bcdedit /set pae forceenable

to enable.

however after restart.

Still can't see 4GB memory on task manager.

ESX host has already add 4GB to that guest. .........Any idea..

default backup compression

$
0
0

Hello All,

I have backup compression problem for some db's on prod servers. for both servers enabled default backup compression option.

please help me regarding this.

1)db size is 235 GB after full backup, backup file size is 63.4 GB.

2)db size is 200 GB after full backup ,backup file size is 141 GB.


mastanvali shaik

Waits Statistics - PREEMPTIVE, HADR and THREADPOOL

$
0
0

Hi everyone,

first of all I'll briefly describe the enviroment:

no. 2 Windows 2008 R2 Servers (virtual) w/ 16vCpu and 64GB ram each

no. 5 SQL Server 2012 instances on each virtual server (w/ max memory and cpu affinity settings)

no. 5 Availability Group


This SQL Subsystem is used by no. 5 Sharepoint 2013 farms


Since almost one year we're experiencing some issues related to Availability Groups.

For example, during 24h we have more than once connection termination of all databases in AG, and immediate reconnection (eg. there's no failover)

AlwaysOn Availability Groups connection with secondary database terminated for primary database 'WordAutomationServices_e666ce2ffff24e6592f081cd755d3e9e' on the availability replica with Replica ID: {48f50542-dcad-493a-a2bb-f2b2a4d6ed73}. This is an informational message only. No user action is required.

[...]

While receiving such email alert

The recovery LSN (403:52:1) was identified for the database with ID 8. This is an informational message only. No user action is required.


Moreover, at least once per day we receive this alert email about Thread pool exaustion:

The thread pool for AlwaysOn Availability Groups was unable to start a new worker thread because there are not enough available worker threads. This may degrade AlwaysOn Availability Groups performance. Use the "max worker threads" configuration option to increase number of allowable threads.


Those events happens on every instance, obviously in different moments; btw Production instances are more affected than others (because of n. of databases in AG.

Recently this issues seems to have an impact on performances too.

Trying to drill down the bottleneck with waits stats analysis, I found that the culprit seems to be PREEMPTIVE, HADR and THREADPOOL waits:



It also seems not to show any evidence of I/O, memory or cpu pressure.

Any clue to pinpoint those issue and trying to isolate the problems?

Failed to initialize the Common Language Runtime (CLR) v2.0.50727 with HRESULT 0x80131522. You need to restart SQL server to use CLR integration features

$
0
0

Hi,

ISSUE:

We are having an .NET application which uses database hosted in another server.

We are able to browse the .NET application. But when we try to search the contents in the application(fetching data from the database that is hosted in another server) we are getting the below error.

ERROR:

An error occurred in the application. Please contact your system administrator.

Description: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Exception details: Failed to initialize the Common Language Runtime (CLR) v2.0.50727 with HRESULT 0x80131522. You need to restart SQL server to use CLR integration features.

Stack trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.pages_search_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6269c012\8546e139\App_Web_24ogqvca.3.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Steps Taken:

1)Restarted SQL services in the database server

2)Recycled the application pool and application

3)restarted IIS

4)Restarted the application server

5)Re-installed .NET 2.0 in the database server(according to Microsoft kb article 2003681)

6) Cleared files under the path c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files\root\6269c012\8546e139 and restarted IIS

None of the above options helped us.

The database server has SQL server 2005:Microsoft SQL Server 2005 - 9.00.4060.00 (X64)   Mar 17 2011 13:06:52   Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)

8 CPUs

and the CLR is enabled.

select * from assemblies

Output:

UserDefinedAggregates 1 65536 userdefinedaggregates, version=0.0.0.0, culture=neutral, publickeytoken=null, processorarchitecture=msil 1 SAFE_ACCESS 1 2007-10-23 11:10:38.597 2007-10-23 11:10:38.597

select * from sys.dm_clr_properties

OUTPUT:

directory 
version 
state CLR initialization permanently failed

When I right click and select Properties of the assembly I get below dialog box

with the below message

Failed to initialize the Common Language Runtime (CLR) v2.0.50727 with HRESULT 0x80131522. You need to restart SQL server to use CLR integration features(Microsoft SQL server,Error: 6512)

please help me in solving this issue.

Thanks,

Priyadarshini Sathiyamoorthy
















































































































































































 


SQL Server 2012 - RESOURCE MONITOR / PREEMPTIVE_XE_CALLBACKEXECUTE high CPU usage

$
0
0

Hello, 

  We are currently in the process of migrating an existing clustered SQL Server 2008 R2 instance over to a clustered SQL Server 2012 instance as we phase out the Windows Server 2008 with SQL Server 2008 R2.

  The setup is identical for the SQL Server 2012 instance as it is on the SQL Server 2008 R2 instance.  (meaning the RAM and CPU are both the same or better on the SQL Server 2012 instance)

  The process in which we are migrating is that we're moving a few databases over to the new SQL Server 2012 instance each night.  What we've noticed is that the CPU usage is much higher on the SQL Server 2012 instance than on the previous SQL Server 2008 R2 instance even though the there is only 1/2 of the databases migrated to the 2012 instance. 

  Running the following script:

;with cte ([totalCPU]) as (select sum(cpu) from   master.dbo.sysprocesses)
select 
	  tblSysprocess.spid
	, tblSysprocess.cpu
	, CONVERT(BIGINT,(tblSysprocess.cpu * CONVERT(BIGINT,100))) / CONVERT(BIGINT, cte.totalCPU) as [percentileCPU]
	, tblSysprocess.physical_io
	, tblSysprocess.memusage
	, tblSysprocess.cmd
	, tblSysProcess.lastwaittype
from   master.dbo.sysprocesses tblSysprocess
         cross apply cte
order by tblSysprocess.cpu desc
Produces the following results:

In a clustered environment, is this normal and if not, does anyone know what this means or how to reduce the CPU usage?

Thanks.

How to see total waits and/or stats for a specific session?

$
0
0

I've got an app server that's pulling 100's of gigbytes per hour from one of my DB servers. I'd like to find out the session(s) and the query(ies) that are responsible. I've confirmed the issue by consistently observing a high wait time for async_network_io waits over several 30 second periods of time. How do I find out the session/query that's responsible? Is there a DMV that shows the # of bytes returned to the client by session or by query? If so I have not yet found it. dm_exec_connections shows num_writes but not num_bytes_written. If I look at the top connections by num_writes I always see an idle session.


Chuck

Am using SQL Server 2008 Standard.. I just want to open .mdf File using SQL Server Management Studio Standard..

$
0
0

Am using SQL Server 2008 Standard.. I just want to open .mdf File using SQL Server Management Studio Standard..

Is that possible to open .MDF file in Sql server STANDARD rather then SQL SERVE Express(R2)...Because application uses SQL SERVE STANDARD If possible can any one explain me how to do it...
Thanks in Advance.....

Security Roles/Persmissions - SQL Server 2008 R2

$
0
0

I have 20 databases and when creating new user then assigning permissions on all db's to concern user. 

I  wants to create a role which will contain read/write permissions on all these 20-database. And after that I will assign this role to every newly created user rather than to assign one by one. Please suggest me to achieve this goal. Hopes you will support.

SQL alert blocked processes

$
0
0

Dear all,

 

 

I need to find a way of sending a text message preferably when any blocks occur in sql server. For example, is there a way that it could be set up in the Alerts section within SQL Server engine please?

 

 

 

Thank you in advance!

Viewing all 12554 articles
Browse latest View live


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