How can i check is my TempDB count set to No of Cores * or not in sql Server after installation? - sql-server

After installing a server using sql server 2019 edition.How can i know my TempDB count set to No of Cores * or not?
need a way to look whether the TempDB count set to No of Cores * or not?

Related

Facing slowness in database server after migrating from SSMS 2008 to SSMS 2016

We have a RDP server which is running in 2008 version of SSMS and OS. Recently we migrated this server to 2016 version, both the OS(2016) and SSMS(2016).
The configured new machine(with ssms2016) is same to the old one(with ssms2008) in terms of system configuration. It has a 64-bit OS with x64-based processor. RAM memory is 64.0 GB and 2.39 GHz (32 processor).
We are facing severe performance issue while running stored procedures in SSMS 2016 version, as the same code base has been migrated from sql server 2008.We are loading data to these servers using SSIS ETL tools.
For example if we are running a stored procedure in old server(with ssms2008) it is taking 1 hour of time to complete the execution but the same SP is taking 10 hours of time in new server(with ssms 2016) sometimes even more.
To identify the root cause we have tried below approaches but so far nothing worked.
• After migration we changed the compatibility level of sql server from 2008 to 2016.
• Restored the database once again from old server (ssms 2008) to new server (ssms 2016 ) without changing the compatibility level.
• Recompiled the stored procedures in new server(ssms2016).
• updated the statistics in new server(ssms2016).
• Done the disc reconfiguration/thickening of windows new server drives also.
• While running time consuming stored procedures in new server(ssms2016), parallely ran sql server
profiler to identify the issue, but couldn't find anything
• Ran parallelly same query in ssms 2008 and ssms 2016 servers at the same time, in old
server(ssms2008) execution got completed much faster than new server(ssms2016)
Note: Is there any solution we can try to get the same execution time in both servers.
Thanks in Advance
Bala Muraleedharan
I'm going to assume the SQL server version got updated too, as SSMS version would not make any difference.
It's impossible to tell of course, but query execution times can be drastically effected by the use of the new cardinality estimator in SQL Server 2014 and above. 99% of the time, things run faster, but once in a while, the new CE gets crushed. Add this line to the stored procedure to run with the old 2008 CE and see if it makes any difference.
OPTION(QUERYTRACEON 9481);
This problem may have two reasons:
1- Control the setting of your SQL server. Specifically limit maximum server memory to 60% of your RAM and increase the number of your tempdb(system database) files to reach to your CPU cores number.
2- Check your SP syntax. If you are using table type variable(#Table) change them to temp table(#Table).

how to release memory of SQL Server?

I have a server that saves 1000 record every minute, I wrote a trigger that does a series of jobs for every row and I used a lot of table and other variables in it. Now my SQL Server memory usage increases very fast and I can't manage it.
I set min server memory and max server memory but it can't help me, when I set max memory server my SQL Server performance decreased and save process interrupted.
I used these resources but these can't help me:
Great SQL Server Debates: Lock Pages in Memory
How to: Set a Fixed Amount of Memory (SQL Server Management)
I have to reset SQL Server Service every 4 hour but this is not a correct way.
How to release memory of SQL Server?

SQL Server 2014 standard edition slows the machine when Database size grows

I have a scenario where an application server saves 15k rows per second in SQL Server database. At first initial hours machine is still usable but whenever the database size increases ~20gig, it seems that machine is becoming unusable.
I saw some topics/forums/answers/blogs suggesting to limit the max memory usage of SQL Server. Any thoughts on this?
Btw, using SQL Bulkcopy to insert rows in the database.
I have two suggestions for you:
1 - Database settings:
When you create the database, try to use a large initial size, and consider to have a bigger autogrowth percentage/size.
You will want to minimize the times your filegroups need to grow.
2 - Server settings:
In your SQL Server settings I would recommend that you remove one logical processor from the SQL Server. The OS will use this processor when the SQL Server is busy with heavy loads on the other processors. In my experience, this usually gives a nice boost to the OS .

Execution plan and SQL goes to hung state

I am using a SQL server 2008, which has databases mirrored in Synchronized mode.
I am trying to run some update stored procedures, with some nested joins and it runs fine (Obviously with a reduced performance compared to a server which is not mirrored).
The problem I am facing is that if I select the "show detailed plan" option. The query starts running and it virtually goes to a hung state and doesnt recover. I finally end task the SQL.
I have a public role for the databases and I cant access any stats.
Can you tell me what exactly (or in general) should I ask the DBA to look at?
The details of the SQL server is mentioned below.
Product - SQL Server Enterprise Edtn- 64 bit.
OS - WIndows NT 6.0
Memory -6143 MB
Processor -2
Maximum Server memory - 3072 MB
Minimum server memory - 16 MB
Any help on guiding me to a right direction will be appreciated.
Regards,
Dasso
Because
1) You have activated [Include actual execution plan] option and because
2) There is a WHILE statement
SQL Server will send to client - Sql Server Management Studio the actual execution plan of every SQL statement executed by every iteration of WHILE statement. So, if WHILE includes a simple UPDATE and it executes 100 iterations then Sql Server will send the execution plan of UPDATE 100 times!
You should decrease the number of iterations for WHILE or you could use estimated plans.

Why SQL Express database is 4 times bigger than SQL CE counterpart?

I have been using SQL CE as my database system, but for further functionality I am now switching to SQL Express. While running the first test, I found that the SQL Express 2005 database reached 4GB within one day, whereas a SQL CE database with similar size of data is only around 1GB.
I later tested in another system with SQL Express 2008, where the database size was still bigger than the CE version, but not as much as the above.
I tried shrinking database using SQL Management Studio, but it only reduced from 4096mb to 4095.55mb. I have learned that SQL Express databases requires extra space for performing its operations, but I don't think that should be 4 times and in one day. What should I look for?
Check the the minimum size you specified when you create your databases.Check your database growth settings etc.minimum size of a database is specified when the database was originally created, or the last size set by using a file-size-changing operation, such as DBCC SHRINKFILE. For example, if a database was originally created with a size of 4GB and grew to 4.1 GB, the smallest size the database could be reduced to is 4GB, even if all the data in the database has been deleted.

Resources