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

Performance Related Stats Required

$
0
0
Dear Friends,
I am running 100 test/staging db's on 4 different vm's. I want to collect consolidated DB performance related information. Is their any option.

Regards.
Irfan Ahmad

remnants left after uninstalling 2012 enterprise

$
0
0

Hi.  Before I continue uninstalling things to overcome a data provider error I'm getting in vs2010, pls help me to understand what I should do about the remnants you see below under Notes.  These remained after I followed these steps to uninstall 2012.

  1. Stopping sql full text filter daemon,engine,server agent,ssas,ssis,ssrs, vss writer (server browser was already disabled)
  2. Uninstalling sql server browser for sql server 2012 (got a warning about other products depending on it but proceeded anyway)
  3. Using admin tools->computer mgt->local users and groups, saw one group called sqlservermsasusers$machine name$mssqlserver and deleted it. Seems to be the only grp specifically related to sql server.  Somehow related to being assigned the login acct for associated instance of ssas sql 2012 ssas according to description.
  4. Uninstalled ms sql server 2012 64 - a variety of prompts follow basically asking what you want uninstalled and what you don’t. I don’t see .net framework in the list.  Nor do I see vs 2010.  I chose all.

Notes: 

seeing lots of negative comments about uninstalling vs2010 at http://archive.msdn.microsoft.com/vs2010uninstall

after uninstalling sql server, getting out and coming back into progs and features, I still see2008 r2 mgt objects, 2012 data tier app framework, 2012 management objects, 2012 management objects x64, 2012 native client, 2012 t-sql language service, ms sql data tools – database projects – web installer entry point, ms sql server clr types, ms clr types for sql server 2012.

My SQL Server and SQL Agent services shutdown unexpectedly

$
0
0

My SQL Server and SQL Agent services shutdown unexpectedly. When I checked the event log, I found this error for database id = 26, but when I run the following sql, I don't see a database with id 26. I have databases up to id 25. What database could it be? I was able to restart both services successfully.

Error: SQL Server must shut down in order to recover a database (database ID 26). The database is either a user database that could not be shut down or a system database. Restart SQL Server. If the database fails to recover after another startup, repair or restore the database.

SQL: SELECT * FROM master..sysdatabases order by 2

Thanks.



SQL server 2012 Installation to put Data and Log on a separate drive

$
0
0

Anyone tell me how to separate the data and log files in separate drive.

Can I give separate path for them during the installation or I go ahead with default installation later I move the files to separate partitions. 

Please advise. 

Regards

Heap tables behaviour

$
0
0

Hi,

Can anyone explain the below behavior for HEAP tables? 

I have created a small heap table with 3 rows which can easily fit in 1 data page. Not sure why SQL Server is allocating 2 data pages. When I create a clustered index , I see only 1 data page which is expected. Not sure why 2 pages for Heaps ?


-- Heap table behaviour

CREATE TABLE Test
( c1 int IDENTITY(1,1) NOT NULL,
  c2  VARCHAR(2500)
)
GO

INSERT INTO Test( c2 ) SELECT REPLICATE('X', 2500)
GO 3
DBCC IND(0,N'Test',-1)
GO


-- Clusterred index behaviour
CREATE TABLE Test2
( c1 int IDENTITY(1,1) NOT NULL primary key,
  c2  VARCHAR(2500)
)
GO
INSERT INTO Test2( c2 ) SELECT REPLICATE('X', 2500)
GO 3
DBCC IND(0,N'Test2',-1)
GO

Thanks in Advance.


{set arithabort ON} not setting arithabort to ON

$
0
0

hi - when i run in ssms set arithabort ON it returns Command(s) completed successfully. however after i check the options tab under property the Arithmetic Abort Enabled is still set to OFF. I had to set it to ON on the GUI in order for it to stick. 

I have admin rights .

any ideas on why this might be happening ?

HOW SQL SERVER SUPPORT GLOBALIZATION-MULTIPLE LANGUAGES ?

$
0
0
   

Hi,

Our company, based in US , got a client in Japan and I am assigned a project to create a shell database ,with out data, (from existing database ) with Japanese_CI_AI collation on the SQL Server ,tables and each column level.. (where ever collation applicable ).I have dropped and recreated every object  and  I have also changed char, varchar and text to nchar, nvarchar and nvarchar(MAX)  respectively.
  These seems to work well. But, we just got two more clients with Spanish and French language users, as a result I am supposed to create another Shell databases for these two clients with French and Spanish collations.
My question is, is there any better way to handle such cases ?, it doesn't seem practical to add a separate environment with their respective collation  when ever we get new clients with new languages.
Thank you so much for your support.

Installing SAS on a SQL Server 2008 R2 machine

$
0
0

I don't know if this is the correct forum for this but here goes:

Someone is trying to install SAS on our Windows 2008 SQL Server 2008 R2 server.  I don't like installing miscellaneous stuff on the SQL Server machine, but there is no alternative.

So are there any known challenges in sharing a machine with SAS?  Are there any landmines that might affect SQL Server?  

Thanks,

Michael


Why Table buffer size is larger than its physical size?

$
0
0

Hi,

 I'm trying to troubleshoot database peformance and when I'm trying to look at table buffer sizes then I found that a table in the buffer consuming more than 5 GB of the memory. But the fact is, physical size of the table is actually only 2 GB.

 I didn't understand why buffer size of a table will be larger than the actual physical size of the table.

 Any great ideas?


If you feel that I have answered your question then please "Mark as Answer".

Log user access to file table

$
0
0

Hi Forum,

I am trying to log access and changes to files in a FILESTREAM share. Mostly I want to log who changed a file and when.

Can someone point me in the right direction?

(I tried Google and serached the forum, but didn't find anything useful)

TIA
Alex

Trying to Create Database on Windows Mount Point, Receive "Access is Denied"

$
0
0

I installed SQL Server 2012 Enterprise SP1 on Windows Server 2012 using mount points X:\user_data, X:\user_log, X:\system and X:\tempdb as my default locations and used integrated security (NT SERVICE\MSSQLSERVER).

The users want to keep some new configuration databases on separate mount points (X:\cfg_data, X:\cfg_log) however when I try to create the databases (my AD group is the instance sysadmin and Windows Administrator group member) I received OS error 5(Access is denied).  D'oh!  Okay, in Windows I added NT SERVICE\MSSQLSERVER to the mount point security with Full Control with no joy.  I rebooted the server, still no joy.

The ONLY way to get this to work is to add NT SERVICE\MSSQLSERVER to the Windows Administrators group which is not a proper security configuration, though it does give me hope that there is authority somewhere to something granted to someone needed.

If you have any ideas or experience, I would greatly appreciate your input :-)

Thank you.

SqlEngineConfigAction_install_confignonrc_Cpu64

$
0
0

Any advices or idea how to fix it. I am in the middle of installation of it and It is stuck on error code 32 with sqlEngineConfigAction_install_confignonrc_Cpu64. I have admin rights.

Please advice me soon.

Karthik M

Cannot see dm_db_index_physical_stats

$
0
0

Hi

I have a number of DB's set up on a SQL 2008 instance using 2005 compatability.

I would like to see the level of fragmentaion on the indexes however when I right click on index, slect properties then fragmentation, I'm getting a blank window.  I've checked under views \ system views and sys.dm_db_index_physical_stats is not showing on either the DB I am trying to review or the master DB.

I can however run DBCC SHOWCINTIG (table_name, Index_name) and get an output. 

Any ideas as to what may be the issue?

VMWare, SQL Server and NUMA Nodes

$
0
0

We are running VMware on BL660s with 4 sockets/8 cores, 512 GB of RAM with ESX 5.5 running 1 SQL Server environment. Questions:

1. How does VMware handle Hyper-threading in relation to NUMA?

2. What would be a proper breakout of CPUs to match the hardware NUMA? VMware suggested that you should not account for hyper-threading when determining your CPU/Core configuration in the VM, hence, do not exceed 32 cores. Based on the above, we were thinking just assigning the 4 socket/8 core to the VM, but VMware says we should leave physical cores aside for the hyper-visor to manage the resources. So we are down to 4 sockets/6 or 7 cores to stay within the hardware NUMA?


John M. Couch

Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "".

$
0
0

Hi,

We have just moved our primary SQL server to a new server (SQL 2012  Standard). I did this via log shipping and then failing over to the new server so it became the primary as due to the size of the database and time restiction of when the move could be made I chose log shipping to limit any down time.

Everything went to plan with one exception. One of the linked servers we use from the server to a SQL 2000 server using a ODBC connection is not working when being called upon in stored procedures. You can see the catalogs and run queries on it but we are getting the below error's. I have googled for 4 days and tried various things but to no avail. Part of me thinks this is due to double hop?

The DBA before me used synonyms and did not document any of the work he did when he first set up the original server so this has been a nightmare. I have ensured that all logins etc... have the same permissions as they did on the old server but I still cannot get this to work.

When we use a try catch in the stored procedures being called it brings back "Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "". Error Number 7303.

But when they are using the linked server from their end (they use a linked server on the SQL 2000 server, it is then executing part of the stored procedures on the SQL 2012 server but when it goes back out to reference the SQL 2000 linked server it brings the below error).

"Mail (Id: 1078) queued. OLE DB provider "MSDASQL" for linked server "Server" returned message "[Microsoft][ODBC SQL Server Driver][SQL Server] cannot open user default database. Login failed.". OLE DB provider "MSDASQL" for linked server "Server" returned message ""[Microsoft][ODBC SQL Server Driver][SQL Server] Cannot open user default databse. Login failed.". String data, right truncation, string data, right truncation"

Any help would be greatly appreciated as everything I have found so far has not helped.

Regards

Jordan


Is my SPN is correct or am I getting full spn?

$
0
0

I am getting cannot generate sspi context severity 11 error.

When I run setspn command in my sql server 2012 Enterprise edition then finding below result.

C:\Users\>setspn -l p8c\s-sqlcluster
Registered ServicePrincipalNames for CN=SQL Cluster Service Account,OU=Microsoft
 SQL,OU=Accounts - Service,OU=System,OU=BV,DC=pac,DC=bvcorp,DC=corp:

Is my SPN is correct or am I getting full spn?


Thanks

Does increase in number of secondary datafiles for tempdb helps in reducing io write waits(stalls) ?

$
0
0

All,

First of all thanks for taking a look on my ask.

Env. : SS2K8R2, Windows Server 2K8R2 SP1(Virtual Machine) & 4 core processor.

I see some high number of io write stalls for tempdb database through dmv - sys.dm_io_virtual_file_stats.

Currently, I have only one primary tempdb file and one tempdb log file. I read some of the blogs online that count of tempdb files(.mdf & .ndf) should be equal to CPU count. Hence, does increase in tempdb files here helps me in reducing the tempdb io write ? 

Appreciate your help here. Thanks in advance!

Capacity planning for sqlserver?

$
0
0

How can we partition drive space for Data.Log and TempDB files?

Is there any formaule used to calculate the drive space allocations?

Thanks,

Ron.

How to get rid of 'Worktable' in Statistics IO

$
0
0

Hi,

I'm using Windows Server 2008 R2 with SP1 and SQL Server 2008 with SP1, 64 bit OS, 32 GB RAM, 2.4 GHz (4 Processors).

I have a query in SSMS which has joins among 20 tables (all joins are LEFT OUTER JOINs).

I enabled statistics IO and Graphical Actual execution plan and ran the query. It took around 40 mins to give an output of around94 Lakh records.

When I observed the Statistics IO, I noticed that a Worktable got created which has lot of scan counts and logical reads as below:

Table 'Worktable'. Scan count370494, logical reads156848728, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

My question is, because ofwhich part in query this Worktable got created and how can I get rid of this? I'm not using any ORDER BY or GROUP BY in my query.

I've given the query and Statistics IO for refernce. I shall also post the Text Plan if needed. Please let me know.

Below is the query for reference:

SELECT <Columns List> FROM

Ext_BMX_vwrptopportunityproduct opr
LEFT OUTER JOIN OpportunityDim od
ON opr.OpportunityID = od.OpportunityID
LEFT OUTER JOIN Ext_BMX_VwrptOpportunity o
ON opr.OpportunityID = o.OpportunityID
LEFT OUTER JOIN AccountDim ad
ON od.CRMAccountID = ad.CRMAccountID
LEFT OUTER JOIN EAFSQLSG.DBO.Ext_BMX_VwrptOpportunityPartner op
ON opr.OpportunityID = op.OpportunityID
LEFT OUTER JOIN PartnerDim p
ON op.SiebelPartnerId = p.PartnerID
LEFT OUTER JOIN Ext_BMX_VwrptOpportunityProductAllocated opa
ON opr.OpportunityID = opa.OpportunityID
AND opr.revsumcategoryid = opa.revsumcategoryid
AND opr.ProductFamilyID = opa.ProductFamilyID
AND opr.versionname = opa.versionname
AND opr.productgroupid = opa.productgroupid
LEFT OUTER JOIN #vwEAFMALView_ATU mal
ON opr.TPOrgId = mal.TPAccountID
LEFT OUTER JOIN Ext_BMX_VwdAccountTeamUnit atu
ON mal.ATUName = atu.AccountTeamUnitName
LEFT OUTER JOIN Ext_BMX_VwdAccountByManagedTerritory mt
ON od.CRMAccountID = mt.AccountID
LEFT OUTER JOIN Ext_BMX_VwdAccount a
ON ad.CRMAccountID = a.AccountID
LEFT OUTER JOIN ProductVersionDim pvd
ON opa.VersionName = pvd.ProductVersionName
LEFT OUTER JOIN Ext_BMX_VwdLicenseSubType lst
ON o.LicenseSubTypeName = lst.LicenseSubTypeName
LEFT OUTER JOIN ext_MSSales_DetailPricingLevel dpl
ON lst.DetailPricingLevelName = dpl.DetailPricingLevelName
LEFT OUTER JOIN (SELECT DISTINCT
TPAccountID,
SubsidiaryID,
SubsidiaryName
FROM
Ext_BMX_VwdTPAccount tp
INNER JOIN ext_BMX_vwdcompensationperspectivehierarchy cph
ON tp.subsidiarycompensationperspectiveid = cph.subsidiaryid) tpsub
ON opr.TPOrgID = tpsub.TPAccountID
LEFT OUTER JOIN (SELECT
er.FiscalMonthID,
cp.compensationperspectivename AS SubsidiaryName,
er.constantdollarexchangerate,
er.exchangerate
FROM
Ext_BMX_vwsefexchangerate er
INNER JOIN Ext_BMX_VwdCompensationPerspective cp
ON er.CreditedSubsidiaryID = cp.SourceCompensationPerspectiveID
WHERE
CompensationPerspectiveLevelCode = 'SUB') exclosed
ON (tpsub.SubsidiaryName = exclosed.SubsidiaryName)
AND (o.ClosedFiscalMonthID = exclosed.FiscalMonthID)
LEFT OUTER JOIN (SELECT
er.FiscalMonthID,
cp.compensationperspectivename AS SubsidiaryName,
er.constantdollarexchangerate,
er.exchangerate
FROM
Ext_BMX_vwsefexchangerate er
INNER JOIN Ext_BMX_VwdCompensationPerspective cp
ON er.CreditedSubsidiaryID = cp.SourceCompensationPerspectiveID
WHERE
CompensationPerspectiveLevelCode = 'SUB') excurrent
ON (tpsub.SubsidiaryName = excurrent.SubsidiaryName)
AND (o.ClosedFiscalMonthID = 268)

Statistics IO for the above query is given below:

Table 'Ext_BMX_vwdAccountByManagedTerritory'. Scan count 9, logical reads 7966, physical reads 0, read-ahead reads 7, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwdCompensationPerspective'. Scan count 18, logical reads 38, physical reads 0, read-ahead reads 5, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwSEFExchangeRate'. Scan count 18, logical reads 944, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Worktable'. Scan count 370494, logical reads 156848728, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwdTPAccount'. Scan count 9, logical reads 1839, physical reads 38, read-ahead reads 1693, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwdCompensationPerspectiveHierarchy'. Scan count 9, logical reads 58, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwdLicenseSubType'. Scan count 1, logical reads 5, physical reads 0, read-ahead reads 7, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_MSSales_DetailPricingLevel'. Scan count 9, logical reads 13, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'ProductVersionDim'. Scan count 9, logical reads 1, physical reads 0, read-ahead reads 2, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwdAccount'. Scan count 9, logical reads 20783, physical reads 3, read-ahead reads 179, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwdAccountTeamUnit'. Scan count 9, logical reads 20, physical reads 0, read-ahead reads 4, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table '#vwEAFMALView_ATU___________________________________________________________________________________________________000000000EC0'. Scan count 9, logical reads 879, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwrptOpportunityProductAllocated'. Scan count 9, logical reads 22418, physical reads 0, read-ahead reads 44, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'PartnerDim'. Scan count 9, logical reads 1238, physical reads 0, read-ahead reads 14, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwrptOpportunityPartner'. Scan count 9, logical reads 5032, physical reads 0, read-ahead reads 8, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'AccountDim'. Scan count 9, logical reads 2928, physical reads 0, read-ahead reads 35, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'OpportunityDim'. Scan count 9, logical reads 6099, physical reads 0, read-ahead reads 22, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwrptOpportunityProduct'. Scan count 9, logical reads 29114, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Ext_BMX_vwrptOpportunity'. Scan count 9, logical reads 93491, physical reads 0, read-ahead reads 9, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Filter_Sector_MSSalesSubSegment'. Scan count 8, logical reads 16, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Please do reply. Thanks...

TPC-E test on SQL Server 2012 high runnable task count

$
0
0

I know I probably shouldn’t be replying to this old thread, but I’m crossing my fingers that Jonathan Kehayias will see activity on this old thread and respond…

I’m using Quest Benchmark Factory to run the TPC-E workload on some SQL instances, and comparing results. I’ve got 1 server built to our company’s standards (standard hardware, disk, etc.). It’s Windows 2008 R2.  I’ve installed SQL 2008, SQL 2008 R2, and SQL 2012. One by one, I’ve run the TPC-E workload against each SQL instance. I’m seeing much better throughput/response time on the SQL 2008 and R2 instances than what I’m seeing on SQL 2012. When I dig into it, the thing that stands out to me is that I’m seeing much higher numbers of tasks in the runnable queue (looking at sys.dm_os_schedulers, and sys.dm_exec_requests). For example, when running against SQL 2012 I see the total number of runnable tasks up around 40-70, yet the CPU is around 40%. 

Also, in looking at sys.dm_os_schedulers, the 2008 instances appear to have a much better distribution across the schedulers. I see more “active” schedulers (is_idle column).  On 2012, I see fewer schedulers active. It seems a small handful are hit pretty hard while the majority are inactive.

This is a 16 core machine with HT enabled, giving me 32 procs total. I’m running standard edition at the OS level, as well as SQL.  My initial thought was that SQL 2012 Standard wouldn’t use all 32 procs, but it seems to be. (I know SQL 2012 Standard is limited to 16 *physical* cores)

I’m hoping someone may have some insight.  I very clearly have tasks sitting in the runnable queue, yet my CPU is < 40%. Not sure where to look next.  Any help would be appreciated.

Viewing all 12963 articles
Browse latest View live


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