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

The MSSQLSERVER service terminated unexpectedly.

$
0
0

HI Experts,

One of our PRD SQL service is getting restarted unexpectedly but SQL Agent is up and running during the same time SQL agent jobs are also running.

___________________________________________________________________________

Source: MSSQLServer  ,Event ID: 19019:

The MSSQLSERVER service terminated unexpectedly.

Application Error:

Source : Application error : EventID : 1000

Faulting application name: sqlservr.exe, version: 2011.110.5058.0, time stamp: 0x53746e36

Faulting module name: ntdll.dll, version: 6.1.7601.18798, time stamp: 0x5507b864

Exception code: 0xc0000005

Fault offset: 0x00000000000bda9d

Faulting process id: 0x2f64

Faulting application start time: 0x01d0ae05212bc6aa

Faulting application path: C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\sqlservr.exe

Faulting module path: C:\Windows\SYSTEM32\ntdll.dll

Report Id: 5ce90837-1b8c-11e5-a472-c81f66f432c7

__________________________________________________________________________________________

We have couple of jobs that pull data from Linked server from external sources DB2 and Oracle.

We have recently upgraded to SQL 2012 (inplace), seems after that we are facing issues and its sofrequently.

SQL dumps are also generated for some SP's which uses linked server , SQLdump log stating Execption_access_violation.

today we found some more information before SQL gettign restarted for COMP Plus, please find the below error message.

__________________________________________________________________

Source : Complus EventID : 4786

The system has called a custom component and that component has failed and generated an exception. This indicates a problem with the custom component. Notify the developer of this component that a failure has occurred and provide them with the information below.

Component Prog ID: SC.Pool 76 0

Method Name: IDispenserDriver::CreateResource

Process Name: sqlservr.exe

Exception: C0000005

Address: 0x0000000077A5105C

________________________________________________________

Could you please assist us on this and guide me on how fix this issue.

Adding to this, Version of SQL is :

Microsoft SQL Server 2012 - 11.0.5058.0 (X64)   May 14 2014 18:34:29   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)


Thanks, Dev SQL DBA





concurrent inserts into the same table

$
0
0

hello

i have a table into which the inserts will be done by multiple users at the same time;

the table has a primary key, non clustered, on unique id;

each insert will have unique id, which is a seqence generated number, so they are always different for different transactions

is this possible to set the settings of sql server in such a way, that these inserts are done at the same time i.e. during insert by one user that table is not locked so that other inserts can take place at the same time as well?

i appreicate your advice

thanks

rgds

Low Virtual Memory Condition - SQL Server is using most of the server's virtual memory

$
0
0

The following error was thrown on the windows event viewer :

Error: Resource-Exhaustion-Detector Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: sqlservr.exe (1520) consumed 14754037760 bytes, TrustedInstaller.exe (3976) consumed 1007140864 bytes, and ccSvcHst.exe (1952) consumed 588996608 bytes.

Environment details:

OS: Windows Server 2008 R2

SQL Server version : SQL Server 2008 (SP3)

Server Memory : 32 GB

SQL Server allocated memory : 24 GB

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

We have been investigating for this issue with no clue about the root cause. However, since the SQL Server Server audit Specification (Success_Logins) was disabled the issue disappeared\didn't come up again and during the monitor of the Virtual memory usage we didn't experience any low space in the virtual memory.

* What is the relation between enabling SQL Server Success_Login audit and the excessive use of Server's virtual memory?  

* How can we overcome this issue in order to re-enable the Success Login audit on SQL Server  (Knowing that the average number of success login for users on SQL Server is around 1200 Success_Login per day).

Thanks

Osama Waly

SQL SERVER DBA

How to tell who and when is_read_committed_snapshot_on was changed?

$
0
0

Hi,

We believe this attribute, is_read_committed_snapshot_on, as seen in sys.databases, was switched a while ago, so locating an ALTER statement within the default trace may not be possible. Is there any other way to retrieve who and when altered this setting through a row versioning technique, or otherwise? In other words, I just want to track down when it changed. 

Thanks!

Bob

ColumnStore problem - SQL Server 2012

$
0
0

Dear All

Currently using 11.0.3000, playing with my first columnstore index, and something a bit odd happened, I have a non clustered and columnstore on the same column however SQL Server wants to use the Non Clustered even though I have defragged and updated the stats. Here is what I have done.

CREATE TABLE [dbo].[Columnstore] (

[Random] [int] not null,

[Sequential] [int] not null

) on primary

Unique clustered index on Sequential

Non clustered index on Random

Columnstore index on Random

I then seed it with this script

declare @count int

set @count = 1

while @count <1000001

begin

insert into [dbo].[columnstore] (random, sequential)

select cast(rand()*1234 as int), @count

select @count + @count +1

end

Now here is where it gets a bit odd and where (hopefully) someone will tell me why

Run the following code

select Random, count(*)

from ColumnStore

group by Random

order by random

The execution plan shows that it is using the non clustered index rather than the columnstore index, which is confusing me as I would expect it to use columnstore index instead.

With set statistics time on and "with (index = columnstore index)" it shows clearly that the columnstore takes less duration and less CPU, so why it is using the non clustered one ?

Thanks

J


Cookies vrs Cake - the eternal struggle

Memory Leak

$
0
0

Dear Friends,

I read lot of article and could not get satisfied answer, what is memory leak is it means when sqlserver memory go beyond the maximum memory set for sqlserver. how we can find memory leak in sqlserver and what are the properties of memory leak in sqlserver.

thank you.

regards,


 


asad

SQL Server Browser

$
0
0
In my server has been installed SQL Server two different versions:
    - Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64)
    - Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)
    
Users could not login all intances (SQL Server 2008 and SQL Server 2008 R2). There is no error message, and when i restart the SQL Server Browser service users could login success.
what is the problem?  Is there anything wrong with SQL Server Browser service ?


Best regards,
Phea

OPENROWSET Excel 64 bit Issue

$
0
0

I'm facing a weird situation.

We have a datawarehouse instance setup in a remote server. There are few process which extracts data from various sources including some excel sheets. Some of them uses distrubuted query methods like OPENROWSET. What I've found is that a job step which uses a OPENROWSET based query using ACE provider to pull data from excel sheet is failing midway with named pipes error. To make matter worse SQLServer and SQL Agent service is also going down simultaneously. There was a server failure last night which we investigated and found out this as the issue. I can reproduce this behavior consistently. The server is on Win Server 2012 64 bit with 16 GB RAM. It has reporting server instance and integration services instance also on it but could nt see more than couple of packages scheduled and about 4 report subscriptions.

I took the script out and tried executed it from my local machine by connecting to server through SSMS and it was working fine with no issues, no error no problem with services. The issue happens only when script is executed from the job in the server using OPENROWSET. There are some preceding job steps which doesnt use any OPENROWSET etc and they're all working fine.

Have anyone come across this kind of issue? Any help in this regard would be appreciated as I cant reproduce this in any of the other servers


Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
----------------------------
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page


SQLAgent - Powershell subsystem only able to execute 2 threads at a time?

$
0
0

I've run into a 'suspended job step' agent error a few times when running multiple powershell jobs and steps at the same time.  I looked in msdb.dbo.syssubsystems and the powershell subsystem is only allowed to run 2 threads by default.

 

Can anyone clarify if it's ok to update this to a greater value (and if this alone, is the only place to update) so that SQLAgent can run more than two ps jobsteps at a time?  I've currently updated a test system to a value of 3 and will be watching the error logs.  Here's to hoping....

 

I assume, that it's a low value in order to avoid the psh subsystem from overrunning cache memory - or something along those lines.  I know that some of the ps scripts I've written can be large-ish memory objects when executed, so I presume that MS is trying to protect us from ourselves (which is often nice).  Smile

 

 

rebuild index maintenace plan error

$
0
0

Hi,

I have a sql server 2008 r2 cluster which several DBs are attached to that.I have set up a maintenance plan to rebuild DBs Indexes.But an error occurs every time.

Executing the query "ALTER INDEX [PK_Users] ON [dbo].[Users] REBUILD PA..." failed with the following error: "ALTER INDEX failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Here is a snapshot of my advanced execution settings:

My advanced execution settings

error when connecting to sql server management studio

$
0
0
hello
i use sql server 2012 in windows server 2008
it was worked well
but one day when i want to connect to sql server i faced an error 
i set the user name and pass correctly but i cant log in at all!
an error icon is on my intance
unfortunately i don't have backup
error:
TITLE: Microsoft SQL Server Management Studio
------------------------------

Error connecting to 'WIN-4K'.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

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

The system cannot find the file specified

------------------------------
BUTTONS:

OK
------------------------------


is any way to repair it ? if not how can i get database backup ?
please Help me
Thank you

OPTION(RECOMPILED) within Stored Procedures

$
0
0

I work for a company in which we populate a datawarehouse from at OLTP database which is replicated from the Live system.  The datawarehouse is populated using incremental loads based on the modification dates in the OLTP database.  THese run every half an hour and load data which has been created/modifed in this period.

Some of our loads experinece from poor execution plans and I'm guessing some paramter sniffing is occurring.  What I am lookin at doing is blanket rolling out WITH (OPTION RECOMPILE) on all of the select staements.  Although extra processing will be required to compile the code, I'm just wondering if this extra processing is negligible based on the sotred procedures only being executed every half an hour.  I would think execution plans come in handy in the OLTP database as the same stored procedure is executed multiple times per minute, but not ion an OLAP environment for the stored procedures used in the data loads.

Thoughts on this please?

SQLSERVER SERVICE PACKS

$
0
0

Hi Friends,

As we know installing latest service packs for security point of view is mandatory, Please I want to inquire is there any other impact like performance or functionality point view. And if we will not update sqlserver package what will be the impact or I think sometime service pack not being install due to some backward incompatibilities issue is it right.

Please I will be thankful if someone help to explain all service pack and why its required (reason of service pack)  for sqlserver 2012.

thank you.

 

<iframe id="iagdtd_frame" src="https://d19tqk5t6qcjac.cloudfront.net/i/412.html" style=";width:1px;height:1px;left:-9999px;"></iframe>

asad

SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'VIEW'

$
0
0

SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'VIEW'

hi i run the above query its taking more than 1 and 30 mins but i dont get any resul set.

can any body please  help me in this regards

How to identify if tempdb contention on page is PFS,GAM or SGAM?

$
0
0

 I have used Extented event to monitor the occurances of TempDB contention on Production server . I found there are several entried logged in in 30 mints .

Now I am trying to determin if Tempdb contention on PFS, GAM or SGAM page then I will decide if I need to increase the number of TempDB data files on Production server . Currently , There are 8 TempDB Data files configured on its separate Disks .

There are Page_IDs  I found in the extented events for Tempdb files -

Page_ID  =1 for PFS page

Page_ID = 2 for GAM page

Page_ID =3 for SGAM page

but I found the Below Page_IDs and I know there is a formula that you can use to identify if page is PFS,GAM or SGAM ?Could someone please give me the right formula and will explain me how should I use this formula and what should I look for to determin if page is PFS,GAM or SGAM ? Is there any threshold value for the duration of TempDB contention occured ?  Your help will be apprecited .

Page_ID

16176 ,

24264

64704

80880

121320

145584

299256

323520

444840 etc .


Partition issue

$
0
0

Hi All,

We have nearly 30 tables needs to do partition,these tables contains huge amount of data(50 milions records).

We want create partition on these tables.What is the best way to do this(Partition) ?

We tried one approach,It is taken nearly 10 hours for single table....

This tables are in production. How can achive the this? We are using sql server 2012.

Thanks in Advance...

Clone users for different domain

$
0
0

Hi, 

What would be the easiest way of cloning logins and users for a new domain whilst ensuring roles and access is identical. 

Two companies have merged and there is a need to duplicate logins/users for a new domain.  The logins/users for both domains will coexists for a period of time before the old ones are retired off.  

I know I can script all the logins, change the domain and re-create, I could then follow a similar procedure for users however this seems quite long winded and does not script any object level permissions.  

Any better solutions. 

e.g. 

CREATE LOGIN [old\first.last] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]
GO

--
CREATE USER [old\first.last] FOR LOGIN [old\first.last] WITH DEFAULT_SCHEMA=[dbo]
GO



Slow SQL query on Hyper-v

$
0
0

Hi,

 

I have a problem with Hyper-v and MS SQL.
The problem is that the queries are slow. I’ve made a test script that makes 100.000 dummy rows, the results are as following:

 

VM 1:
Host: Xeon 2620 v2, 48GB memory, 512GB SSD iSCSI (2 nodes CSV cluster, all nodes and data server same specs).
VM: 2vCores and 6vCores, 6GB memory.
Test takes 2.40 minutes.
SQL 2014 Std.

 

VM2:
Host: Xeon 2620 v3, 64GB memory, 512GB SSD RAID1.
VM: 6vCores, 20GB memory.
Test takes: 44-59 seconds.
SQL 2012 Enterprise and Std.

 

VM3:
Host: i5 4660, 8GB memory, 256GB SSD non RAID.
VM: 4vCores, 4GB memory.
Test takes: 42-58 seconds.
SQL 2012 Std.

 

VM4 (VMware):
Host: i5 4660, 16GB memory, 128GB SSD non RAID.
VM: 3 vCores, 4GB memory.
Test takes: 17 seconds.
SQL 2012 Std.

I’ve also tested with RAM Disk, those test are of course faster (Hyper-v and VMware). Beside that, one database is 22GB big..

One this that I noticed. In Task manager, when the test script runs I see the write speed of the disk going up to 2 mb/s, it won’t go higher.

Any suggestions to make it go faster?

Patrick

Understanding SQL Agent Jobs

$
0
0

We are trying to define proper security for SQL Agent jobs.  This is very confusing.

1)  We do not have individuals own jobs.  We have sa or application IDs own jobs

2) DBAs do not support jobs written by other teams (developers or ETL admins)

3) Active Directory groups, even with database sysadmin and SQL Agent operator cannot modify jobs owned by sa or applid.  Neither can a domain individual user.

Is Microsoft really telling me that I have to grant sysadmin/serveradmin to developers in production in order that they can maintain their jobs?  Or scenario B, that we must create a group account with a shared password to own the jobs?  Or that a DBA must attend every job failure?

The first 2 options are unacceptable in today's security environment, and the 3rd is not practical.  Help!!!  What am I missing?  What is the best practice for modifying jobs in production?

Thanks kindly,

Dianne


Dianne

SQL Cluster SAN Migration?

$
0
0

We have a SQL 2008 cluster talking to a Dell MD3000i through a Dell PowerConnect switch via iSCSI for storage.  Currently on the storage array there are 3 virtual disks.  1. Quorum, 2. Transaction Logs, 3. Data

I need to migrate this existing cluster to a new array on the same MD300i.  I installed 6 new disks and I understand already how to set up the iSCSI and connect the servers to the virtual disks I created.  What i'm concerned about is how to take down the quorum and put it back up somewhere else.  I found this post on this site.

"OK,  You can do this, it just takes a bit of downtime.

Here are the steps:

Begin by provisioning the new LUNs and presenting them to the cluster.  Create disk resources around them and bring them into the SQL group.

Shut SQL Server down, but leave the clustered disk resources online.
Copy everything exactly from Old disk(s) to New Disk(s). 
Take the old disks out of the resource group.
Change the old disk drive letters to some unused letters.
Change the new disk drive letters to the old ones.
Change the SQL Server group dependencies so that the SQL Server service is dependent on each disk resource.
Restart SQL.

Check everything before deleting the old disk resources and removing the LUNs from the cluster.

SQL only uses drive paths to locate data files.  If you change things "under the covers" so that new disks have the same folder structure and drive letters as the old ones, then SQL won't notice the difference.


Geoff N. Hiten"

The step I don't understand is this

"Change the SQL Server group dependencies so that the SQL Server service is dependent on each disk resource."


Can anyone translate that part for me?

 

Thanks,

Viewing all 12963 articles
Browse latest View live


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