I have 2 similar SQL Server installations on 2 similar GCP projects.
Everything is the same - configuration, CPU, RAM, disk drive layout, similar (but not the same) database with similar data and workload.
When I run alter index index [IndexName] on dbo.Tablename rebuild with (online=on) on the 1st server it takes about 30 minutes to rebuild the whole index. On the 2nd server it ran for more than 3.5 hours before I stopped the rebuild.
All disk metrics (throughput, queue length, etc.) look reasonable. The rebuild is being performed during a night maintenance window with no significant transaction load on the server.
My question is: How can I "debug" the rebuild process to see what is going on, why two similar databases on two similar servers act very different? Is there any trace flag, extended event, etc. which may help to investigate the problem?
Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64)
Mar 18 2018 09:11:49
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Datacenter 10.0 (Build 14393: ) (Hypervisor)
26CPU/20GB of RAM
Index size before rebuilding: ~110Gb, after rebuilding: ~30Gb
Related
Microsoft® Access® for Microsoft 365 MSO (Version 2202 Build 16.0.14931.20888) 64-bit
Microsoft SQL Server 2019 - 15.0.4261.1 (X64) Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Datacenter 10.0
System Type 64 bit operating system, x64-based processor
I've created an ODBC 64-bit file DSN connection for a MS Access Pass-Through Query to a SQL Server database. I've got a large query that runs on the client side in around five minutes; the query appears to run and correctly return the requested records. The ODBC Timeout is set to 540 (seconds). The problem is that the server shows that the query ran for over forty-five minutes before I was contacted by a DBA. I terminated Access and that severed the connection.
Would anyone know why this might happen or how I could troubleshoot?
You can trace a query to see when different phases of the query complete.
Typically, when something impossible seems to be going on, when you look closer there's some easy explanation. Is there a transaction that's left open? Does running the query trigger updating statistics? Why does the DBA think the query keeps running? There's nothing unique about ODBC querying the database that would allow it to keep running without terminating. A first step might be to just run the query directly within SQL Studio and see if you can reproduce.
https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/performance/troubleshoot-never-ending-query?tabs=2008-2014
There are some performance issues on our SQL server. When we began to analyze, we found several problems, including that the plan cache is cleaned very often for no reason (5-10 times per hour).
We also used the "sp_BlitzFirst" script for analysis and it also showed that we have problem: "Plan Cache Erased Recently".
However, we do not have any jobs that can perform cleaning. And no one performs cleaning manually, too.
We would like to know what might be the reasons for this behavior?
Microsoft SQL Server 2012 - 11.0.2100.60 (X64) Feb 10 2012 19:39:15
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
Total RAM: 32GB
SQL Server RAM: 29GB
Average RPS (requests per second): ~250
I'm trying to process a cube on a development server which is processing data from a different server. The process took a long time to run the first time so I figured it was partially because the development server only had 4 GB of RAM on it. So, I bumped it up to 20 GB of RAM hoping to see some improvement in performance.
However, when I checked "perfmon" I noticed that total memory usage would not go beyond 4 GB of RAM even though I now have 20 GB.
How do I get SSAS do use more RAM?
Something else I should do after installing RAM? I know it's recognized and the computer as a whole is actually working better.
Some info:
SQL Server version: Microsoft SQL Server 2014 (SP2) (KB3171021) - 12.0.5000.0 (X64) Developer Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
Windows version: Windows 7 pro 64-bit
Visual Studio version: Community 2015
Here's a screen shot of the memory usage. At this time, the current step it's running is "Processing Partition 'MyCube' - In Progress - 450000 of 100."
Here's a screen shot of the SSAS Server settings:
I am not a network or server person and building window server 2012 R2 or whatever version to host MS SQL Server 2015/2016 is new to me. I don't even know where to start or how to begin but would like to learn and get into it.
Could someone point me in the right direction or provide some guildline on how I can approach this ? Also I was curious what does the R2 in window Server 2012 R2 mean or stand for ?
I saw window Server 2012 R2 and they go from as low as 45 bucks to as much as I guess couple of hundreds or thousands of dollars. Why is all these price range ?
Can I just buy a desktop computer and with my IP address do this from scratch, or what do I need ?
My goal is to host sql Server 2015/2016 on a Server so it can be access by many people or application or remote access.
Did it say 2012 R2? Usually that means a release number. But SQL Server 2015/16 will install just fine on Windows 2012. Please make sure that your machine (if its going to be used in production environment) is backed up on a very regular basis and has some form of RAID 5 or RAID 10.
SQL Server pricing is dependent on several factors including the edition of SQL Server (Enterprise,Standard) and the number of cores (CPUs) in the host machine. For an exact price you want to contact Microsoft but here is a list to get you started:
https://www.microsoft.com/en-us/sql-server/sql-server-2016-pricing
Here is a list of things you should do as you install SQL Server:
https://www.sqlshack.com/best-practices-after-installing-microsoft-sql-server/
If you want to restore the database to a specific point in time you should learn how to do log backups but at a minimum learn to set up a backup job. Many users do an incremental backup every night and a full backup every weekend but your needs will determine the backup schedule.
SQL Server is a very powerful and useful product. You should work through a book on SQL Server administration - Micrsoft SQL Server 2012 Management and Administration by Mistry is one of many wonderful books you can use.
We are updating several SQL Server 2008R2 instances to SQL Server 2012 SP3 CU2. I know that the database versions will be changed from 100 to 110 during this process (e.g. once finished, the databases can no longer be moved back to a 2008R2 instance).
Does this change to the databases occur during the upgrade itself or the first time that the databases are brought online when the server restarts?
SQL server keeps track of version in two ways. First, your SQL Server instance has a version (for example SQL Server 2008 R2 is 10, followed by some decimals to keep track of patches).
Your databases are a separate version, known as a Compatibility Level. If you upgrade your instance, your databases will not be upgraded until you choose to do so. That does not mean there will not be an impact, however it does mean those databases can remain in their old version. Your example of 100 and 110 are both Compatibility Level.
Please see changing Compatibility on MSDN here: https://msdn.microsoft.com/en-us/library/bb510680.aspx